René Nyffenegger's collection of things on the web | |
René Nyffenegger on Oracle - Most wanted - Feedback
- Follow @renenyffenegger
|
syntax [VIM] | ||
:syntax on:syntax on basically sources the file syntax.vim .
syntax.vim has a line with
runtime syntax/synload.vim
which sources the file
syntax/synload.vim
Then, a
filetype on on
is executed (which loads filetype.vim)
Finally, there's a line
au! FileType * exe "set syntax=" . expand("<amatch>")
which sets up the connection between FileType and Syntax autocommands.
synload.vimsynload.vim does a
runtime! syntax/syncolor.vim
which loads
syntax/syncolor.vim
syncolor.vimsyncolor.vim defines highlights and some links to these highlights:
syntax enable/on/manual/off
The
syntax on , syntax on , syntax on and syntax on do actually source a file.
:syntax on and syntax enable source $VIMRUNTIME/syntax/syntax.vim.
:syntax manual sources $VIMRUNTIME/syntax/manual.vim.
:syntax off sources $VIMRUNTIME/syntax/nosyntax.vim.
syntax_cmd
This variable is set in syncolor.vim to one of
|