sponsor Vim development Vim logo Vim Book Ad

djangojump : jump between template, view, url  in django project

 script karma  Rating 1/1, Downloaded by 1649  Comments, bugs, improvements  Vim wiki

created by
hello world
 
script type
ftplugin
 
description
description
=============

vim-djangojump plugin is used for
jumping between url, view function and
template immediately.

note: now open vim at django project\'s
root path where has settings.py file

email: itachi.akatuki.sh@gmail.com

tip:
1. url => view function
   :DUrltoview /app1/overview/

2. view function ==> template file
   :DViewtotpl (at line which contains
   template\'s name)

   example code:
      ....
   (*)   return render_to_response(\\\"index.html\\\")

   cursor at this line(*) and call command
   :DViewtotpl

3. template file ==> view function
   :DTpltoview

4. js which template includes ==> js source file
   css which template includes ==> css source file
   :DGotoscript

5. reload cache
   :DReloadCache

6. url ==> template file
   :DUrltotpl /xxx/yyy/

install details
=============

linux platform is ok,  it's not tested under windows platform, maybe it can work correctly.

1. copy djangojump.vim to ~/.vim/plugin/ folder
2. open vim at django project root folder, then you can use these commands

note: this plugin need python2.6+ support, at first opening vim, it would be slow, but after it would work normally.


hotkeys
===============
template ==> view function
nmap <c-d><c-t> :DTpltoview<CR>

view function ==> view
nmap <c-d><c-v> :DViewtotpl<CR>

url ==>  view function
nmap <c-d><c-u> :DUrltoview

template ==> script(js, css)
nmap <c-d><c-s> :DGotoscript<CR>

reload cache if add file or remove file
nmap <c-d><c-r> :DReloadCache<CR>

url ==> template file
nmap <c-d><c-i> :DUrltotpl<CR>
 
install details
linux platform is ok,  it\'s not tested under windows platform, maybe it can work correctly.

1. copy djangojump.vim to ~/.vim/plugin/ folder
2. open vim at django project root folder, then you can use these commands

note: this plugin need python2.6+ support
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-djangojump.zip 1.0 2012-10-06 7.2 hello world Initial upload
ip used for rating: 216.73.216.208

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github