Commit 2cab8a49 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1302 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 6dd67908
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ micelle2d create a data file of small lipid chains in solvent
msi2lmp		       use Accelrys Insight code to setup LAMMPS input
pymol_asphere	       convert LAMMPS output of ellipsoids to PyMol format
restart2data	       convert a binary restart file to an input data file
vim		       add-ons to VIM editor for editing LAMMPS input scripts
xmovie		       a quick/simple viz package (2d projections of 3d)

For tools that are single C, C++, or Fortran files, a Makefile for

tools/vim/README.txt

0 → 100644
+20 −0
Original line number Diff line number Diff line
=== Vim Syntax Highlighting ===
===============================

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
in the syntax file (lammps.vim). You can easily add new ones.

=To enable the highlighting:
============================
(0)   Create a ~/.vimrc
      You can have a look in /usr/local/share/vim/current/vimrc.example
(1)   Insert in ~/.vimrc
         let mysyntaxfile = "~/.vim/mysyntax.vim"
      just before
         syntax on
(2)   Create directory ~/.vim and place mysyntax.vim and lammps.vim there

Gerolf Ziegenhain <gerolf@ziegenhain.com> 2007

tools/vim/lammps.vim

0 → 100644
+57 −0
Original line number Diff line number Diff line
" Vim syntax file
" Language:	         Lammps Simulation Script File
" Maintainer:	      Gerolf Ziegenhain <gerolf@ziegenhain.com>
" Latest Revision:   2007-11-19

syn clear

syn keyword lammpsOutput      log write_restart dump undump thermo thermo_modify thermo_style print 
syn keyword lammpsRead        include read read_restart read_data
syn keyword lammpsLattice     boundary units atom_style lattice region create_box create_atoms 
syn keyword lammpsLattice     delete_atoms change_box dimension
syn keyword lammpsParticle    pair_coeff pair_style mass angle_coeff angle_style atom_modify
syn keyword lammpsParticle    atom_style bond_coeff bond_style delete_bonds
syn keyword lammpsSetup       min_style fix_modify run_style timestep neighbor fix unfix
syn keyword lammpsRun         minimize run  
syn keyword lammpsDefine      variable

syn keyword lammpsRepeat      jump next loop

syn keyword lammpsOperator    equal add sub mult div 

syn keyword lammpsConditional if then else

syn region lammpsString			start=+'+ end=+'+	oneline
syn region lammpsString			start=+"+ end=+"+	oneline

syn match lammpsNumber		"\<[0-9]\+[ij]\=\>"
syn match lammpsFloat		"\<[0-9]\+\.[0-9]*\([edED][-+]\=[0-9]\+\)\=[ij]\=\>"
syn match lammpsFloat		"\.[0-9]\+\([edED][-+]\=[0-9]\+\)\=[ij]\=\>"
syn match lammpsFloat		"\<[0-9]\+[edED][-+]\=[0-9]\+[ij]\=\>"

syn match lammpsComment         "#.*$"

syn match lammpsVariable   "\$\({[a-zA-Z0-9]\+}\)"
syn match lammpsVariable   "\$[A-Za-z]"

if !exists("did_lammps_syntax_inits")
  let did_lammps_syntax_inits = 1
  hi link lammpsOutput        Function
  hi link lammpsRepeat        Repeat
  hi link lammpsRead          Include
  hi link lammpsLattice   		Typedef
  hi link lammpsParticle      Typedef
  hi link lammpsSetup         Typedef
  hi link lammpsDefine        Define
  hi link lammpsRun           Statement
  hi link lammpsNumber			Number
  hi link lammpsFloat			Float
  hi link lammpsString			String
  hi link lammpsComment			Comment
  hi link lammpsLoop          Repeat
  hi link lammpsVariable      Identifier
  hi link lammpsConditional   Conditional
  hi link lammpsOperator      Operator
endif

let b:current_syntax = "lammps"

tools/vim/mysyntax.vim

0 → 100644
+3 −0
Original line number Diff line number Diff line
augroup syntax
au  BufNewFile,BufReadPost *.lmp so ~/.vim/lammps.vim
augroup END

tools/vim/vimrc

0 → 100644
+2 −0
Original line number Diff line number Diff line
let mysyntaxfile = "~/.vim/mysyntax.vim"
syntax on