vim_django : Simplifies opening related files in Django projects
| script karma
Downloaded by 425
Comments, bugs, improvements
script versions (upload new version)
|Anders Schau Knatten|
|This script simplifies opening of related files in Django projects.
If you are editing a file in a Django project, vim_django will find the location of your template files and app files. In combination with the Command-T plugin: vimscript #3025, this makes it super-easy to open files related to the one you are currently editing.
Watch a demo on Viemo: http://vimeo.com/24394421 (1:24) (This only shows opening of template files, but files in the app itself can be opened in the same way)
map <Leader>dt :VimDjangoCommandTTemplate<CR>
map <Leader>da :VimDjangoCommandTApp<CR>
If you put that line in your .vimrc, hitting "<Leader>dt" while working on a Django application will start CommandT in the template directory corresponding to the application. Hitting "<Leader>da will start CommandT in the app directory. ("<Leader>" is usually mapped as "\" or "," so try "\dt" or ",dt".)
If you have any questions, please send me an email at anders AT knatten DOT org
|Unpack in your .vim directory:
tar zxf vim_django-<version>.tgz
The result should look like this:
You also need to install Command-T: http://www.vim.org/scripts/script.php?script_id=3025
(You can skip this if you don't want Command-T integration, but vim_django is pretty pointless without it. )
Click on the package to download.
ip used for rating: 184.108.40.206