Vim-projectionist

When working on django projects, I need to switching among django’s model, view, url, admin and serializers files. I used to use fzf.vim to jump around until I found vim-projectionist.

With this plugin, you can create a “map” of your source code, with this map, you can just from for example, .c file to .h file.

Create a .projections.json under your django file as follows:

{
  "*/urls.py": { "type": "urls", "alternate": "{}/views.py" },
  "*/models.py": { "type": "models" },
  "*/serializers.py": { "type": "serializers" },
  "*/admin.py": { "type": "admin" },
  "*/views.py": { "type": "view" }
}

Now I have these command to jump around:

When I open urls.py, press :A will jump to the alternate file views.py

The plugin also supports auto complete so you don’t need to input all the characters.