1. Edit the filetype.vim file by
Open vi
:cd $VIMRUNTIME/
Quit vi, goto that directory with cd
sudo vi filetype.vim
add these lines:
" VASP INCAR
au BufNewFile,BufRead INCAR setf fortran
Then whenever we open the INCAR file, fortran syntax highlighting is applied.
2. Setting for free form fortran
However, the default setting for the fortran seems to be fixed-form. To chage it to free-form,
open ~/.vimrc,
add
:let fortran_free_source=1
Note that this setting will make your vi regard any fortran file as free form.
That's all.