Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting VIM to be efficient in Actionscript like Flex

I'm trying to setup VIM for editing Actionscript 3 for some upcoming Flash projects. I dislike working in an IDE and prefer VIM. Right now, I know that I want:

  • Omnicomplete (with tab completion)
  • Syntax highlighting (there is an actionscript.vim file on vim.org but the highlighting is not as good as other syntax files)
  • AS3 compiler accessible from bash/terminal

I've tried setting up Omnicomplete but was running into issues.

How can I set up Omnicomplete with tab completion properly?

Where can I find a good AS3 syntax file?

What is a good AS3 compiler for terminal/bash?

Are there any other plugins you can suggest?

Any advice is appreciated.

Thanks!

like image 747
ground5hark Avatar asked Nov 04 '09 00:11

ground5hark


4 Answers

Back in my ActionScripting days I did okay using a javascript syntax file -- as both are based on ECMAScript, the syntax is mostly the same. There also seem to be some syntax files out there that do both, like this one.

I don't know if you'll get very far with an AS3 compiler, as you pretty much need to build the source from within the Flash editor itself as there are dependencies on the various assets (movies, images etc).

like image 23
Ether Avatar answered Nov 10 '22 22:11

Ether


I used to use this as3 syntax file: http://www.vim.org/scripts/script.php?script_id=1061 If you want to interpret ActionScript, you must do it through the Adobe software. It is a proprietary language so unless Adobe comes up with a command line interpreter, your not going to find one. (Edit: In fact Adobe Labs does have this FCSH, I have not tried it but it may be what your looking for). Check out http://bitbucket.org/kuy/dotfiles-x40/src/tip/vimfiles/dict/actionscript.dict for a dictionary file for ActionScript. Once you copy that file to your dict folder, add the following to your .vimrc:

autocmd FileType actionscript set omnifunc=actionscriptcomplete#CompleteAS
autocmd FileType actionscript :set dictionary=$HOME/vimfiles/dict/actionscript.dict

like image 92
Pierre-Antoine LaFayette Avatar answered Nov 10 '22 22:11

Pierre-Antoine LaFayette


I don't know about setting up VIM, but i've used FCSH successfully as a terminal/bash shell compiler for AS3:

like image 1
Reuben Avatar answered Nov 10 '22 22:11

Reuben


Turns out this syntax file works pretty well for me in MacVim.

like image 1
Luke Bayes Avatar answered Nov 10 '22 22:11

Luke Bayes