|
cvsdist |
7a2237 |
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
|
|
cvsdist |
f6c999 |
set fileencodings=utf-8,latin1
|
|
cvsdist |
7a2237 |
endif
|
|
cvsdist |
7a2237 |
|
|
cvsdist |
e5ebff |
set nocompatible " Use Vim defaults (much better!)
|
|
cvsdist |
e5ebff |
set bs=2 " allow backspacing over everything in insert mode
|
|
cvsdist |
e5ebff |
"set ai " always set autoindenting on
|
|
cvsdist |
e5ebff |
"set backup " keep a backup file
|
|
cvsdist |
e5ebff |
set viminfo='20,\"50 " read/write a .viminfo file, don't store more
|
|
cvsdist |
e5ebff |
" than 50 lines of registers
|
|
cvsdist |
e5ebff |
set history=50 " keep 50 lines of command line history
|
|
cvsdist |
e5ebff |
set ruler " show the cursor position all the time
|
|
cvsdist |
e5ebff |
|
|
cvsdist |
e5ebff |
" Only do this part when compiled with support for autocommands
|
|
cvsdist |
e5ebff |
if has("autocmd")
|
|
cvsdist |
e5ebff |
" In text files, always limit the width of text to 78 characters
|
|
cvsdist |
e5ebff |
autocmd BufRead *.txt set tw=78
|
|
cvsdist |
e5ebff |
" When editing a file, always jump to the last cursor position
|
|
cvsdist |
7a2237 |
autocmd BufReadPost *
|
|
cvsdist |
7a2237 |
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
|
|
cvsdist |
7a2237 |
\ exe "normal g'\"" |
|
|
cvsdist |
7a2237 |
\ endif
|
|
cvsdist |
f1dd31 |
endif
|
|
cvsdist |
f1dd31 |
|
|
Karsten Hopp |
919746 |
if has("cscope")
|
|
Karsten Hopp |
919746 |
set csprg=/usr/bin/cscope
|
|
Karsten Hopp |
919746 |
set csto=0
|
|
Karsten Hopp |
919746 |
set cst
|
|
Karsten Hopp |
919746 |
set nocsverb
|
|
Karsten Hopp |
919746 |
" add any database in current directory
|
|
Karsten Hopp |
919746 |
if filereadable("cscope.out")
|
|
Karsten Hopp |
919746 |
cs add cscope.out
|
|
Karsten Hopp |
919746 |
" else add database pointed to by environment
|
|
Karsten Hopp |
919746 |
elseif $CSCOPE_DB != ""
|
|
Karsten Hopp |
919746 |
cs add $CSCOPE_DB
|
|
Karsten Hopp |
919746 |
endif
|
|
Karsten Hopp |
919746 |
set csverb
|
|
Karsten Hopp |
919746 |
endif
|
|
Karsten Hopp |
919746 |
|
|
cvsdist |
e5ebff |
" Switch syntax highlighting on, when the terminal has colors
|
|
cvsdist |
e5ebff |
" Also switch on highlighting the last used search pattern.
|
|
cvsdist |
e5ebff |
if &t_Co > 2 || has("gui_running")
|
|
cvsdist |
e5ebff |
syntax on
|
|
cvsdist |
e5ebff |
set hlsearch
|
|
cvsdist |
e5ebff |
endif
|
|
cvsdist |
e5ebff |
|
|
cvsdist |
e5ebff |
if &term=="xterm"
|
|
cvsdist |
e5ebff |
set t_Co=8
|
|
cvsdist |
409f8f |
set t_Sb=?[4%dm
|
|
cvsdist |
409f8f |
set t_Sf=?[3%dm
|
|
cvsdist |
e5ebff |
endif
|