My Vim configuration

Posted on Tuesday, January 26th, 2010 under , ,

Vim is the editor of the Gods. The Elder Gods. It’s by far the best text editor I’ve ever encountered. Although I’m not a “vim purist” (no hjkl ;) ), I’m fascinated with its power. And there are always new things one can learn about it. It never gets old.

For instance, today the head of my company’s IT department showed me the following cool trick: if you have an XML file loaded in a buffer and you want to have it properly indented, you just hit Escape in your Vim editor and type

:% !xmllint --format %

… and…Magic!

Anyway, lately I’ve spent some time puting together a list of very useful plugins for PHP/Zend Framework and python/django development in order to speed things up and become more productive. My (g)Vim configuration currently uses:

And a custom gvimrc file. If you want to give it a try, check out my GitHub repository at http://github.com/motanelu/GVim-configuration. Installation is very simple, just follow the instructions below (PS: I’m using GVim. If you’re using Vim replace gvimrc with vimrc):

cd ~/
mv .vim .vim.bak
mv .gvimrc .gvimrc.bak
git clone git://github.com/motanelu/GVim-configuration.git
mv GVim-configuration .vim
ln -s ~/.vim/gvimrc ~/.gvimrc

Post a comment and tell me if you find it useful. If you’re a Zend Framework user, have a look over the snippets.

Related posts

6 Responses to “My Vim configuration”

  1. OriginalCopy

    I’ve been trying out many IDEs, but at the end of the day I find myself using (g)vim.

    +1

  2. Thanks for the post! I’ve been using snippets_emu for a while, but never been happy with it. I’ve given snipMate a try, and find it much more intuitive, simple, and well-constructed; it’ll be a part of my vim toolbox now. :)

    I’d also recommend the Project and vimoutliner plugins; I find them indispensable in my daily work for keeping track of project files and TODO items, respectively.

  3. Tudor

    Wow, Matthew O’Phinney posts a comment on my blog :)

    Well, I’m glad you’ve found it useful. Vim is my editor of choice and now I find it hard to work without it. Project didn’t cut it for me, I prefer NERDTree. But I will give vimoutliner a try, see how things go.

  4. I use NERDTree quite a bit, but I like the fact that Project allows me to define how I want to organize my project _separate_ from the filesystem — which is particularly useful when I have deep directory structures. Additionally, the ability to filter what is displayed (e.g., limit to only php or html, or a combination of files) can be really useful; there may be only a handful of files in a given directory I need to work with as a developer. I probably find Project more useful in large part due to having found it before I found NERDTree, though.

  5. Tudor

    It’s more a matter of personal choice in the end. I’ve tried Project and NERDTree side by side and I chose NERDTree because it’s more…familiar, so to speak.
    I gave vimoutliner a look, but the help file is massive. It will take me few days to see if it works for me.

  6. Joey

    I recommend marvim. It lets you save both templates and macros

    http://www.vim.org/scripts/script.php?script_id=2154

Leave a Reply