Wikia

Vim Tips Wiki

Watchlist Recent changes

Completion using a syntax file

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

Pages on Vim Tips Wiki

Add a Page
1,586pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
71photos on this wiki
See more >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki