سؤال

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?

هل كانت مفيدة؟

المحلول

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
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top