Custom syntax in VIM

From XDSwiki
Revision as of 14:11, 26 April 2017 by Docandreas (talk | contribs) (Created page with "In VIM, you can define a custom syntax to display comments differently from XDS parameters. This aids legibility. * create file ~/.vim/syntax/inp.vim syntax match XDS_Commen...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In VIM, you can define a custom syntax to display comments differently from XDS parameters. This aids legibility.

  • create file ~/.vim/syntax/inp.vim
syntax match XDS_Comment /!.*$/
  • create file ~/.vim/ftdetect/inp.vim
autocmd BufRead,BufNewFile *.INP set filetype=inp
  • create file ~/.vimrc
highlight def link XDS_Comment Comment