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
makeprgtopython manage.py syncdb. Run:makefrom your vim to startsyncdb -
use nerdtree/lusty explorer for file management
-
use vimango for navigating your django project
Related Posts
- Easy client side form validations for Django: Django Parsley
- Two Scoops of Django: Review
- Serving static files in Django
- Logging in Django
- Common testing scenarios for Django app.
Can we help you build amazing apps? Contact us today.
Looking at your github CalVIM, there is one part that breaks. In the bundles submodules (in both .gitmodules and .git/config) the urls your two repos (django_snippets and vimango) tyr to use your private key. I needed to change git@github.com:tuxcanfly/snipmate_for_django.git to http://github.com/tuxcanfly/snipmate_for_django.
Other than that, thanks for sharing :) I just needed to add zenburn to the colors and it was perfect.