|
Color Syntax Highlighting With Vim
Submitted by: Ki Yung Ahn
Vim can display colors to highlight your code when your terminal is properly set. Many terminal programs can show colors.
In csh shell or tcsh shell, try this:
$> set term=xterm-color
$> vim ~/.vimrc
In bash shell, try this:
$> export term=xterm-color
$> vim ~/.vimrc
You may see syntax highlighting with colors. Vim automatically
highlights syntax by filename suffixes. Vim distrution has syntax
highlighting support for many languages including c, c++, java, html,
and many others. This helps you to view your source code more easily.
If syntax highlight doesn't start you can use the command:
:syntax on
if you want to turn of the syntax highlighting use the following command:
:syntax off
You can also save terminal settings in the shell configureation
file. Ask the tutors for help with this if you want to make your
terminal show colors by default.
Some Vi Dotfile Settings
Submitted by Larry Leach
Vi is the visual frontend for the old ex editor. So the config file is.exrc
I set it up with the following lines...
set number
set noerrorbells
set showmode
Set number gives me line numbers on one side of the screen
Set noerrorbells shuts up the bell
Set showmode puts up a little "insert' tag at the bottom of the screenwhen I'm in VI's insert mode.
|