Vim configuration file (my favorite style)
In the/etc/vimrc File
If v: lang = ~ "Utf8 $" | v: lang = ~ UTF-8 $"
Set fileencodings = UTF-8, latin1
Endif
Set nu
Set tabstop = 4
Set nocompatible "Use Vim defaults (much better !)
Set bs = indent, eol, start "allow backspacing over everything in insert mode
"Set ai" always set autoindenting on
"Set backup" keep a backup file
Set viminfo = '20, \ "50" read/write a. viminfo file, don't store more
"Than 50 lines of registers
Set history = 50 "keep 50 lines of command line history
Set rsor "show the cursor position all the time
"Only do this part when compiled with support for autocommands
If has ("autocmd ")
Augroup redhat
"In text files, always limit the width of text to 78 characters
Autocmd BufRead *. txt set tw = 78
"When editing a file, always jump to the last cursor position
Autocmd BufReadPost *
\ If line ("'\" ")> 0 & line ("' \ "") <= line ("$") |
\ Exe "normal! G' \ "" |
\ Endif
Augroup END
Endif
If has ("CSAs") & filereadable ("/usr/bin/csable ")
Set csprg =/usr/bin/cs.pdf
Set csto = 0
Set cst
Set nocsverb
"Add any database in current directory
If filereadable ("cscope. out ")
Cs add cscope. out
"Else add database pointed to by environment
Elseif $ CSCOPE_DB! = ""
Cs add $ CSCOPE_DB
Endif
Set csverb
Endif
"Switch syntax highlighting on, when the terminal has colors
"Also switch on highlighting the last used search pattern.
If & t_Co> 2 | has ("gui_running ")
Syntax on
Set hlsearch
Endif
If & term = "xterm"
Set t_Co = 8
Set t_Sb = [4% dm
Set t_Sf = [3% dm
Endif
Highlight Comment ctermfg = green guifg = green