— Shang Liang

Using Vim as Actionscript editor

After trying SEPY, SciTE 1.53, SciTE 1.61 (meychi website down) and FlashDevelop, now I’ve moved to Vim (Vi improved).

The nice thing about Vim is that it’s built for programmers and it can greatly improve your editing speed. You can do everything without touching your mouse or moving your hand to the arrow keys. And what I like most is that it has color schemes really friendly to your eyes.

The default installation doesn’t support Actionscript syntax. You need to download the syntax file here and put it in your syntax folder. One minor problem is that Atlas files use .as as extension and this conflict’s with Actionscript. You need to edit filetype.vim to solve the problem. Or you can download my filetype.vim.

To make vim more sexy, you need to edit the _vimrc file. _vimrc file holds a set of commands and run by vim when it’s launched. You can download my customized _vimrc file here.

Vim is easy to use but not easy to learn. You can check out their documentation online. The free book is very helpful.

Here’s a list of keys frequently used:

  • i: enter insert mode
  • a: enter append mode
  • h: move cursor left
  • j: move cursor down
  • k: move cursor up
  • l: move cursor right
  • v: enter hightlight mode, same function as pressing shift in other text editors
  • d: cut the highlighted code
  • y: copy the highlighted code
  • p: paste the text you copied or cut
  • Ctrl+p: autocomplete
  • 11 comments
    1. Fabian says: May 2, 20073:30 pm

      have you ever tried fdt?

    2. Dragos says: May 2, 20073:31 pm

      Yes, I use vim too! It’s great!

    3. Dragos says: May 2, 20073:34 pm

      No Actionscript 3.0 syntax though.

    4. 5566 says: May 2, 20074:37 pm

      Tried a bit last time. not a big fan of eclipse. I find it take up too much memory.

    5. Aand says: August 14, 20073:55 am

      I am a lover of VIm. but it does not support AS 3 .0 .. not suggested for Flex Developer

    6. void says: August 14, 20074:29 am

      i’m using vim too, that rocks!
      btw, a simple AS3 syntax can be found here:
      http://www.vim.org/scripts/script.php?script_id=1585

      cheers,

      V0id

    7. Sophia Jiang says: July 28, 200810:58 pm

      i have configured as.vim on my vim by ur help

    8. cygnl7 says: March 26, 200911:25 am

      There’s a new omnicompletion plug-in for vim now: http://www.vim.org/scripts/script.php?script_id=2478. I just downloaded it and have yet to try it, but it looks promising.

    9. djaffy says: June 21, 20108:40 am

      Very interesting, thanks!
      Could you describe a bit your usual workflow on actionscript project? What tools involved, how to compile and so on…

    10. My VIM Settings « geek.de.nz says: September 7, 20111:14 am
    11. Endel Dreyer says: March 9, 20125:34 am

      Hey guys, if you are interested check out the plugin that i’m developing. It aims to provide Flash Develop features into the VIM. I’ll be glad to hear your opinions and to see a fork / contribution.

      https://github.com/endel/flashdevelop.vim

    Submit comment

    For spam filtering purposes, please copy the number 7152 to the field below: