Custom syntax in VIM

From XDSwiki
Revision as of 15:16, 26 April 2017 by Docandreas (talk | contribs)
(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.

  • put
syntax match XDS_Comment /!.*$/
into ~/.vim/syntax/inp.vim (create file if it doesn't exist)
  • put
autocmd BufRead,BufNewFile *.INP set filetype=inp
into ~/.vim/ftdetect/inp.vim (create file if it doesn't exist)
  • put
highlight def link XDS_Comment Comment
into ~/.vimrc (create file if it doesn't exist)