tweekmonster / django-plus.vim

:guitar: Improvements to the handling of Django related files in Vim
MIT License
180 stars 15 forks source link

go to template definition #17

Open AdrienLemaire opened 5 years ago

AdrienLemaire commented 5 years ago

In a template with the code {% extends "base.html" %}, I would like to switch to the related base.html file by pressing CTRL-].

Can Django-plus add the configuration to auto-create the appropriate tags? Or can you suggest a proper way to get this done?

AdrienLemaire commented 5 years ago

Created an SO thread on this topic (more generally talking about ctags, but also mentioning goto def for django templates)

AdrienLemaire commented 5 years ago

@tweekmonster I wrotee another question on the vim SO and got a good hint: I'm not looking for tags but a better path to go to template extends/include file definition with `gf``. A good plugin that handles path is vim-apathy. But it feels like django-plus should be the one to set path searching options for django files :)

AdrienLemaire commented 5 years ago

For now, I'll manually set :se path+=** everytime I need to use gf on django templates, but we'd want to automate this with fine-tuned path selection (https://mobile.twitter.com/tpope/status/612991904897232898)