Wikia

Vim Tips Wiki

Completion using a syntax file

Talk0
1,610pages on
this wiki

Redirected from VimTip498

Tip 498 Printable Monobook Previous Next

created 2003 · complexity intermediate · author Daniel Molina · version 6.0


To use the Vim completion a user can use a dictionary like so:

:set complete=k

With a dictionary the user can use a syntax file (which are commonly stored in the /syntax/ directory), so that the user can complete reserved words for a particular language. If the user would like to automatically load a syntax file from the /syntax/ directory for the particular filetype they are working on, the following line can be inserted into the .vimrc file:

au FileType * exe('setl dict+='.$VIMRUNTIME.'/syntax/'.&filetype.'.vim')

See AlsoEdit

CommentsEdit

Advertisement | Your ad here

Around Wikia's network

Random Wiki