This repository contains the files necessary for syntax highlighting
of cpptraj
input files.
vim
will look for *.in
files as use this syntax on them accordingly -- this
can be changed in ftdetect/cpptraj.vim
.
If you clone this into your ~/.vim
folder, you should be golden.
This ~/.vim
folder should look like this (at a minimum):
.
├── ftdetect
│ └── cpptraj.vim
└── syntax
└── cpptraj.vim
2 directories, 2 files
Otherwise, you can use these commands, in an internet-connected Terminal:
$ cd ~/.vim
$ mkdir ftdetect
$ mkdir syntax
$ cd ftdetect
$ wget "https://raw.githubusercontent.com/emleddin/vim-cpptraj/main/ftdetect/cpptraj.vim"
$ cd ../syntax
$ wget "https://raw.githubusercontent.com/emleddin/vim-cpptraj/main/syntax/cpptraj.vim"
This is where the actual rules for matches and keywords are contained.
This is where the file type autodetection rules are contained.
If you have vim
installed but don't see normally colors, even in shell
scripts, you may have to enable syntax highlighting by creating a ~/.vimrc
file that contains syntax on
.
The ftdetect/cpptraj.vim
file specifies that files with a *.in
extension
are should use the cpptraj
syntax.
If you typically name your cpptraj
files with something like .traj
, you
can modify this behavior by editing your ftdetect/cpptraj.vim
to:
au BufRead,BufNewFile *.traj set filetype=cpptraj
- More conditional highlighting (after this keyword, expect this)
- Verify
read
,write
,dataset
, andchange
commands have what they should - Check for unintended duplicates (outtraj and pairdist?)
cpptraj
: https://github.com/Amber-MD/cpptrajvsc-lang-cpptraj
(VS Code): https://github.com/emleddin/vsc-lang-cpptrajlanguage-cpptraj
(Atom Editor): https://github.com/emleddin/language-cpptraj