- Write a ~/.vim/syntax/mytype.vim file with the description of the syntax highlighting rules.
- New file type ('mytype') is detected by adding its description into: ~/.vim/filetype.vim:
Example of description added to filetype.vim:
" VHDL
au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst setf vhdl
au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl')
If syntax highlighting is not enabled by default, it can be enabled with: :set syntax=mytype
No comments:
Post a Comment