When I used vim for programming I used cntrl+n/cntrl+p a lot for keyword completion. I switched from programming to reporting with vim and now I have some new needs, one of which is amazing LaTeX support (huzzah vim has this).
Now I would like to keep using completion of cntrl+n and cntrl+p but past semi-colons. As I create sections and chapters with labels so I can make references to these. But a chapter label is c:name and a section is s:name where a subsection is ss:name. If I could do c: to get the previous chapter that would be great.
Does stock Vim offer this, or should I create a plug-in for this?
Ctrl-n/Ctrl-p
if you add:
to the keyword characters::set iskeyword+=:
. Meaning just that, if you wrotec:blah
somewhere,c:
Ctrl-n
will autocomplete that later on.:h 'omnifunc'
(and similar help pages). As do other LaTeX plugins for Vim, such as LaTeX-Box.vimtex
plugin BTW.