diff --git a/tools/vim/README.txt b/tools/vim/README.txt index 82f608db1b..eb040aa4cd 100644 --- a/tools/vim/README.txt +++ b/tools/vim/README.txt @@ -3,7 +3,8 @@ The files provided in this directory will enable syntax highlighting for the lammps script syntax in vim. The simulation scripts have to -end on .lmp (see mysyntax.vim). By far not all commands are included +end on *.lmp or start with in.* (see mysyntax.vim). +By far not all commands are included in the syntax file (lammps.vim). You can easily add new ones. =To enable the highlighting: @@ -31,11 +32,8 @@ if exists("did_load_filetypes") endif augroup filetypedetect - au! BufRead,BufNewFile *.pdb setfiletype none - au! BufRead,BufNewFile *.psf setfiletype none - - au! BufRead,BufNewFile *.cu setfiletype c au! BufRead,BufNewFile in.* setfiletype lammps + au! BufRead,BufNewFile *.lmp setfiletype lammps augroup END (4) the end diff --git a/tools/vim/mysyntax.vim b/tools/vim/mysyntax.vim index 7c2d46ef52..9fe9071b3a 100644 --- a/tools/vim/mysyntax.vim +++ b/tools/vim/mysyntax.vim @@ -1,3 +1,4 @@ augroup syntax au BufNewFile,BufReadPost *.lmp so ~/.vim/lammps.vim +au BufNewFile,BufReadPost in.* so ~/.vim/lammps.vim augroup END