VIM Syntaxelflord@pegasus.rutgers.edu |
Note that these require the more recent browsers. The error highlighting in particular seems to need Netscape 4.
sh.vim | Bugfixes for old sh.vim file note; these fixes have now been applied. This file therefore is only here for historical reasons (-; | About sh.vim/bash.vim | screenshot (2html) after
fix screenshot (2html) before fix |
bash.vim | Syntax file for the bash shell | About bash.vim | screenshot (2html) |
spec.vim | Syntax for RPM SPEC files | About spec.vim | screenshot (2html) |
The simplest way to use the syntax files is to put them somewhere on your machine, and source them
:so foo.spec
:so bash.spec
when you need to use them.
To use the spec syntax file, you can also try this to automate it:
put the following in your .vimrc file:
Using the bash.vim syntax file is a little trickier, because you want this to fire up whenever you have aaugroup syntax au! BufNewFile,BufReadPost *.spec so ~/vim/spec.vim au BufNewFile,BufReadPost *.spec so ~/vim/spec.vim augroup END
#!/bin/bash
in the first line. Here's how it's done (or how I do it anyway).I also recommend the following: Set your colours up so that "function", "conditional" and "repeat" are distinct from "statement". ( I usually use a black background, and set all three to white. ) By default, this is not enabled for gvim in black backgrounds. However, doing this will make your code more readable for this and for other files since it makes your function definitions and conditional blocks more visible. See my .vimrc file to find out how this is done.let X = getline(1) let y = match(X, "#!/bin/bash" ) if (y != -1) so ~/vim/bash.vim endif unlet X unlet y
echo $(echo hello)
hilights
incorrectly otherwise.
declare ${X}=0
and similar statements
(which are legal) get nasty hilighting otherwise.
awk -foo '{ }'
type
command blocks.