VIMelflord@panix.com |
This is my vim page. Currently, it's main purpose is as a showcase for my work on vim syntax files . I am currently working on making improvements to the sh.vim syntax, as well as writing a syntax file for RPM spec files.
Vim is a text editor which is based on vi. It is better than emacs (-: It has many features including replayable macros, syntax colouring (which is user-definable) , user definable keybindings, and access to powerful text manipulation commands. The syntax colouring in particular is very cool. See for yourself ! Here's a bash script (note that vim can do this for just about any other programming language. There are over 100 syntax files) Check out (screenshot) or (html rendition of vim session) Once you have done some editing with something that has syntax colouring for every type of file in existence , you will never look back.
:syntax on
:set showmatch
qa
start recording
q
stop recording
@a
play back keystrokes
v
start highlighting text. Move cursor to highlight text.
y
copy highlighted text
x
cut highlighted text
p
paste text that has been cut/copied
v
and then use
gq
hi link Foo Bar
assign the colouring scheme of bar to foo
hi Bar term=bold ctermfg=darkcyan guifg=blue
Defines the colouring scheme for syntax group Bar.
To see a list of the syntax group names, use
:help group-name
Note that for the GUI settings, you can also use 6 digit hex numbers ( #rrggbb ) to specify a colour. See my .vimrc for examples.
To set your own definitions, put them in your .vimrc file.
See $VIM/syntax/syntax.vim
for a starting point,
as this is where the defaults are defined. Then hack at it.
(note that
$VIM is usually /usr/local/share )
Go to my syntax section to browse my syntax files.
Go here to see my html key mappings.