Javed
Comments
Reactions

Seven reasons why you should switch to Vim

By : Javed Khan

So you want a better IDE for developing django, huh? Why not give good old vim a try?

Use pathogen to maintain your vim plugins (and sanity). Using this, you can clone the repositories listed here to .vim/bundle/ and start using them right away.

Also, consider adding your .vimrc and .vim to a repository. Include .vimrc inside .vim and symlink .vim/.vimrc to ~/.vimrc to version control your .vimrc.

My vim files can be found here. Also, here's an imgur album demonstrating these plugins in action.

1. Syntax highlighting for django templates

Starting from vim 7.1, syntax highlight for django templates works out of the box. (Check your vim version using vim --version or :version within vim)

If you are on an older version, use this plugin

2. Django snippets with snipmate

SnipMate provides commonly used "snippets". This eliminates a lot of boiler plate code genreally required to start a django project from scratch.

Django specific snippets can be found at robhudson's repository

Its very easy to write custom snippets in case you need them.

3. On-the-fly error checking with pyflakes

This one is not django specific, but it can save a lot of time spent debugging typos or silly mistakes.

PyFlakes detects errors in your python code and highlights the offending lines so you can easily rectify them.

4. Git integration with fugitive

Fugitive is a git plugin for vim.

This one integrates seamlessly with my workflow. You can add/reset files, commit them, view diff, blame, logs all within vim!

5. Auto-completion using pysmell

Pysmell is great for autocompleting your django project code.

6. Browse code with taglist

Taglist allows you to view your code structure and jump between classes/functions.

7. Write faster html using sparkup

Sparkup allows you write zen code

Other tips:

  • set makeprg to python manage.py syncdb. Run :make from your vim to start syncdb

  • use nerdtree/lusty explorer for file management

  • use vimango for navigating your django project


Related Posts


Can we help you build amazing apps? Contact us today.

Topics : django vim
© Agiliq, 2009-2012