Use vim-projectionist to jump around in django projects

·

1 min read

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:

The plugin also supports auto complete so you don't need to input too many characters.