-2

The fortran namelist syntax is defined in a few places, like on the Intel website and at http://owen.sj.ca.us/~rk/howto/slides/f90model/slides/namelist.html. I'm not sure if these are complete or even consistent, but some syntax highlighting would be better than none. Is there any such syntax highlighter?

naught101
  • 18,687
  • 19
  • 90
  • 138
  • If this should be closed, then what about these? http://stackoverflow.com/questions/2564627/vim-syntax-highlighting-for-ruby-1-9, http://stackoverflow.com/questions/6558884/razor-cshtml-syntax-highlighting-for-vim – naught101 May 12 '14 at 04:11
  • You really should emphasize you care about ViM and do not ask for any random tool. The word `vi` or `vim` does not appear in your question at all. The question you referenced is written in a much clearer way. – Vladimir F Героям слава May 12 '14 at 11:20
  • @VladimirF: Whoa... I can't believe I missed that. I swear I put it in there somewhere, maybe I edited it out. Thanks for the pointer :) – naught101 May 13 '14 at 00:45

1 Answers1

2

Adding this to ~/.vimrc allowed vim to recognise namelist files as fortran files, and the syntax highlighting that is applied is adequate:

if has("autocmd")
  au BufNewFile,BufRead *.nml set filetype=fortran
  au BufNewFile,BufRead *.namelist set filetype=fortran
endif
naught101
  • 18,687
  • 19
  • 90
  • 138