django-plus.vim icon indicating copy to clipboard operation
django-plus.vim copied to clipboard

go to template definition

Open AdrienLemaire opened this issue 5 years ago • 3 comments

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 avatar Apr 18 '19 08:04 AdrienLemaire

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

AdrienLemaire avatar Apr 19 '19 05:04 AdrienLemaire

@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 avatar Jun 06 '19 00:06 AdrienLemaire

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)

AdrienLemaire avatar Jun 06 '19 00:06 AdrienLemaire