Unverified Commit bb0240d8 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #1501 from uihsnv/vim_files

Simplify and update vim syntax highlighting files
parents 42b0cb5e fd55d7d3
Loading
Loading
Loading
Loading
+12 −14
Original line number Original line Diff line number Diff line
@@ -7,10 +7,10 @@ end on *.lmp or start with in.* (see mysyntax.vim).
By far not all commands are included
By far not all commands are included
in the syntax file (lammps.vim). You can easily add new ones.
in the syntax file (lammps.vim). You can easily add new ones.


=To enable the highlighting:
=To enable the highlighting (compatible with old versions of VIM):
============================
============================
(0)   Create a ~/.vimrc
(0)   Create a ~/.vimrc
      You can have a look in /usr/local/share/vim/current/vimrc.example
      You can have a look in /usr/share/vim/vim*/vimrc_example.vim
(1)   Insert in ~/.vimrc
(1)   Insert in ~/.vimrc
         let mysyntaxfile = "~/.vim/mysyntax.vim"
         let mysyntaxfile = "~/.vim/mysyntax.vim"
      just before
      just before
@@ -22,23 +22,21 @@ in the syntax file (lammps.vim). You can easily add new ones.


(0) Create/edit ~/.vimrc to contain:
(0) Create/edit ~/.vimrc to contain:
         syntax on
         syntax on
(1) Create directories ~/.vim and ~/.vim/syntax
(1) Create directories ~/.vim/syntax and ~/.vim/ftdetect
(2) Copy lammps.vim to ~/.vim/syntax/lammps.vim
(2) Copy lammps.vim to ~/.vim/syntax/lammps.vim
(3) Create/edit ~/.vim/filetype.vim to contain
(3) Copy filetype.vim to ~/.vim/ftdetect/lammps.vim


" vim syntax highlight customizations
if exists("did_load_filetypes")
 finish
endif


augroup filetypedetect
Gerolf Ziegenhain <gerolf@ziegenhain.com> 2007
 au! BufRead,BufNewFile in.*           setfiletype lammps
 au! BufRead,BufNewFile *.lmp          setfiletype lammps
augroup END
(4) the end


Distribution Packaging guidelines:
==================================


Gerolf Ziegenhain <gerolf@ziegenhain.com> 2007
(0) Copy lammps.vim to ${VIMFILES}/syntax/lammps.vim
(1) Copy filetype.vim as ${VIMFILES}/ftdetect/lammps.vim

${VIMFILES} is typically /usr/share/vim/vimfiles
Consult your packaging guidlines for exact location.


---------------
---------------


tools/vim/filetype.vim

0 → 100644
+4 −0
Original line number Original line Diff line number Diff line
augroup filetypedetect
 au! BufRead,BufNewFile in.*           setfiletype lammps
 au! BufRead,BufNewFile *.lmp          setfiletype lammps
augroup END
+12 −11
Original line number Original line Diff line number Diff line
@@ -2,21 +2,22 @@
" Language:	         Lammps Simulation Script File
" Language:	         Lammps Simulation Script File
" Maintainer:        Gerolf Ziegenhain <gerolf@ziegenhain.com>
" Maintainer:        Gerolf Ziegenhain <gerolf@ziegenhain.com>
" Updates:           Axel Kohlmeyer <akohlmey@gmail.com>, Sam Bateman <sam.bateman@nrlssc.navy.mil>, Daniel Möller Montull <d.moller.m@gmail.com>
" Updates:           Axel Kohlmeyer <akohlmey@gmail.com>, Sam Bateman <sam.bateman@nrlssc.navy.mil>, Daniel Möller Montull <d.moller.m@gmail.com>
" Latest Revision:   2012-06-19
" Latest Revision:   2019-06-11


syn clear
syn clear


syn keyword	lammpsOutput	log write_restart restart dump undump thermo thermo_modify thermo_style print 
syn keyword	lammpsOutput	log write_data write_dump info shell write_restart restart dump undump thermo thermo_modify thermo_style print timer
syn keyword	lammpsRead	include read read_restart read_data
syn keyword	lammpsRead	include read_restart read_data read_dump molecule
syn keyword	lammpsLattice	boundary units atom_style lattice region create_box create_atoms dielectric
syn keyword	lammpsLattice	boundary units atom_style lattice region create_box create_atoms dielectric
syn keyword	lammpsLattice	delete_atoms change_box dimension replicate
syn keyword	lammpsLattice	delete_atoms displace_atoms change_box dimension replicate
syn keyword	lammpsParticle	pair_coeff pair_style pair_modify mass velocity angle_coeff angle_style
syn keyword	lammpsParticle	pair_coeff pair_style pair_modify pair_write mass velocity angle_coeff angle_style
syn keyword	lammpsParticle	atom_modify atom_style bond_coeff bond_style delete_bonds kspace_style
syn keyword	lammpsParticle	atom_modify atom_style bond_coeff bond_style bond_write create_bonds delete_bonds kspace_style
syn keyword	lammpsParticle	kspace_modify dihedral_style dihedral_coeff improper_style improper_coeff
syn keyword	lammpsParticle	kspace_modify dihedral_style dihedral_coeff improper_style improper_coeff
syn keyword	lammpsSetup	min_style fix_modify run_style timestep neighbor neigh_modify fix unfix
syn keyword	lammpsSetup	min_style fix_modify run_style timestep neighbor neigh_modify fix unfix suffix special_bonds
syn keyword	lammpsSetup	communicate newton nthreads processors reset_timestep
syn keyword	lammpsSetup	balance box clear comm_modify comm_style newton package processors reset_ids reset_timestep
syn keyword	lammpsRun	minimize run  
syn keyword	lammpsRun	minimize run rerun tad neb prd quit server temper temper/grem temper/npt
syn keyword	lammpsDefine	variable group compute
syn keyword	lammpsRun	min/spin message hyper dynamical_matrix
syn keyword	lammpsDefine	variable group compute python set uncompute kim_query


syn keyword	lammpsRepeat	jump next loop
syn keyword	lammpsRepeat	jump next loop