We love designing and developing websites, but what really drives us is solving problems and cultivating strong relationships with our clients
Seven reasons why you should switch to Vim
By : Javed
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
Comments
Nice article, also it will be good have your .vim folder available for the download
Reactions
Seven reaons why you should switch to Vim http://agiliq.com/blog/2010/11/seven-reasons-why-you-should-switch-to-vim-for-dja/
RT@samirmamude: Seven reasons why you should switch to Vim http://bit.ly/9OxAb5
Seven reasons why you should switch to Vim - The Agiliq Blog http://bit.ly/aarbxt
RT@samirmamude: Seven reaons why you should switch to Vim http://agiliq.com/blog/2010/11/seven-reasons-why-you-should-switch-to-vim-for-dja/
RT@samirmamude: Seven reaons why you should switch to Vim http://agiliq.com/blog/2010/11/seven-reasons-why-you-should-switch-to-vim-for-dja/
RT@samirmamude: Seven reaons why you should switch to Vim http://bit.ly/bYf2kF
RT@samirmamude: Seven reaons why you should switch to Vim http://agiliq.com/blog/2010/11/seven-reasons-why-you-should-switch-to-vim-for-dja/
I'll do it for you here, following their format 1. syntax highlighting for just about every language known to mankind. 2. multiple snippets packages to choose from 3. on the fly error checking with pyflakes, as a bonus integration with pep8.py, pylint, nosetests, ipython, pdb 4. integrated with every version control system - autodetects when a file is under version control and gives you an abstracted set of commands that is consistent for all of them. or choose from magit, mercurial.el or other third party vc systems. 5. auto-completion using your choice of Ropemacs, pysmell, ipython and other backends that haven't been invented yet via generic auto-complete frameworks like AutoComplete and Anything 6. comes with tags integration, or use etags or gtags if you feel like 7. write faster html using nxhtml mode, validate your xhtml and html5 using a parser written by xml co-creator James Clark via nxml mode, view svg files inline then C-c C-c to see their source 8. BONUS - look up documentation for python from within emacs using pylookup (or eldoc mode) and the browser built into emacs. run an ipython shell from within emacs and send highlighted regions of code or entire buffers to it for evaluation, etc. etc.
I find that an IDE is usually bloated and overkill, but that's just me. Vim can take a bit of getting used to, but there are very few things you need to know for using it daily; and you can continually add new plugins and tricks as you become more comfortable, similar to a chef adding new recipes to a cookbook.
Or I can do this exact same thing with just about any other text editor. Cool, you like Vim, enjoy it. I don't like vim, I want a mouse on the rare occasion to be useful to me. I primarily use TextMate, but I also use Vim for quick edits and hacking on servers. When it comes to actual development, Vim just gets in my way too much.
If you stick 2 full days with it (and look up whatever you need), you will have overcome the worst part.
The gazillion plugins are all chosen individually to maximize comfortability and speed. Totally worth it.
I read alot about Python + Vim, also Django + Vim. I installed Vim, tweaked it, but the learning curve still feels huge after a few weeks of sporadic, non-exclusive use. I still feel more productive with gedit and a few open terminals.
The title is inaccurate; this is not a comparison. Also, these features are not unique.
@swaroopch I prefer NERDTree, pathogen and taglist. My .vimrc - http://t.co/1Vqww6T. Also, my post on django dev in vim http://t.co/aBZCntc
RT@tuxcanfly:@swaroopch I prefer NERDTree, pathogen and taglist. My .vimrc - http://t.co/1Vqww6T. Also, my post on django dev in vim http://t.co/aBZCntc
#django, Seven reasons why you should switch to Vim http://is.gd/jIpzp /lleva tremenda pincha, pero me gustaria probar
- Test Driven Development in Python
- Deploying Django apps on Heroku
- Developing android applications from command line
- Deploy Django App in 5 Easy Steps
- Project Management Tools for Start-Ups
- Generating a pdf from an image using PIL and django
- Dynamically attaching SITE_ID to Django Caching
- Screencast: How to deploy Django on Heroku
- Deploying Django apps on Heroku
- How to use pep8.py to write better Django code
- rails
- django
- linkroundup
- django opinion
- opinion
- business
- API
- appengine
- python
- satire
- startup
- Uncategorized
- marketing
- personal
- rambling
- search
- interviews
- seo-interviews
- 5startupideas
- ideas
- seo
- tips
- forms
- paypal
- utilities
- datetime
- web2.0
- Amazon
- algorithms
- presentations
- products
- pinax
- satchmo
- ecommerce
- microsoft
- yahoo
- book
- tutorial
- models
- aggreagtion
- meta
- India
- apps
- about
- CSS
- Design
- wordpress
- test slug
- vim
- urls
- reviews
- javascript
- xmpp
- emacs
- Typography
- Grid Theory
- Color Theory
- iphone
- android
- titanium
- mobile applications
- CSS3
- Browser Compatibility
- mobile
- jobs
- lamson
- django setup
- files
- upload
- jsTree
- hierarchical view
- web page
- Treeview
- coffeescript
- request
- response
- South
- django south
- django migration
- --fake
- screencasts
- django caching
- SITE_ID prefix
- review
- code hosting
- comparison
- unfuddle
- fogbugz
- assembla
- github
- project management
- ticketing system
- gunicorn
- deploy
- nginx
- ubuntu
- vps
- android terminal
- terminal
- programming
- TDD
- Test Driven
- Development
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- October 2011
- September 2011
- July 2011
- June 2011
- April 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- June 2010
- April 2010
- March 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- April 2009
- March 2009
- February 2009
- November 2008
- October 2008
- June 2008
- May 2008
- April 2008
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.