|
cvsdist |
7a22376 |
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
|
|
|
8f344ab |
set fileencodings=ucs-bom,utf-8,latin1
|
|
cvsdist |
7a22376 |
endif
|
|
cvsdist |
7a22376 |
|
|
cvsdist |
e5ebffe |
set nocompatible " Use Vim defaults (much better!)
|
|
|
f62f534 |
set bs=indent,eol,start " allow backspacing over everything in insert mode
|
|
cvsdist |
e5ebffe |
"set ai " always set autoindenting on
|
|
cvsdist |
e5ebffe |
"set backup " keep a backup file
|
|
cvsdist |
e5ebffe |
set viminfo='20,\"50 " read/write a .viminfo file, don't store more
|
|
cvsdist |
e5ebffe |
" than 50 lines of registers
|
|
cvsdist |
e5ebffe |
set history=50 " keep 50 lines of command line history
|
|
cvsdist |
e5ebffe |
set ruler " show the cursor position all the time
|
|
cvsdist |
e5ebffe |
|
|
cvsdist |
e5ebffe |
" Only do this part when compiled with support for autocommands
|
|
cvsdist |
e5ebffe |
if has("autocmd")
|
|
|
422c1ab |
augroup fedora
|
|
|
422c1ab |
autocmd!
|
|
cvsdist |
e5ebffe |
" In text files, always limit the width of text to 78 characters
|
|
|
55682ce |
" autocmd BufRead *.txt set tw=78
|
|
cvsdist |
e5ebffe |
" When editing a file, always jump to the last cursor position
|
|
cvsdist |
7a22376 |
autocmd BufReadPost *
|
|
cvsdist |
7a22376 |
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
|
|
|
d086bea |
\ exe "normal! g'\"" |
|
|
cvsdist |
7a22376 |
\ endif
|
|
|
3109f84 |
" don't write swapfile on most commonly used directories for NFS mounts or USB sticks
|
|
|
3109f84 |
autocmd BufNewFile,BufReadPre /media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp
|
|
|
8889ac5 |
" start with spec file template
|
|
|
8889ac5 |
autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec
|
|
|
422c1ab |
augroup END
|
|
cvsdist |
f1dd315 |
endif
|
|
cvsdist |
f1dd315 |
|
|
|
44e8cdf |
if has("cscope") && filereadable("/usr/bin/cscope")
|
|
|
9197463 |
set csprg=/usr/bin/cscope
|
|
|
9197463 |
set csto=0
|
|
|
9197463 |
set cst
|
|
|
9197463 |
set nocsverb
|
|
|
9197463 |
" add any database in current directory
|
|
|
9197463 |
if filereadable("cscope.out")
|
|
|
9197463 |
cs add cscope.out
|
|
|
9197463 |
" else add database pointed to by environment
|
|
|
9197463 |
elseif $CSCOPE_DB != ""
|
|
|
9197463 |
cs add $CSCOPE_DB
|
|
|
9197463 |
endif
|
|
|
9197463 |
set csverb
|
|
|
9197463 |
endif
|
|
|
9197463 |
|
|
cvsdist |
e5ebffe |
" Switch syntax highlighting on, when the terminal has colors
|
|
cvsdist |
e5ebffe |
" Also switch on highlighting the last used search pattern.
|
|
cvsdist |
e5ebffe |
if &t_Co > 2 || has("gui_running")
|
|
cvsdist |
e5ebffe |
syntax on
|
|
cvsdist |
e5ebffe |
set hlsearch
|
|
cvsdist |
e5ebffe |
endif
|
|
cvsdist |
e5ebffe |
|
|
|
cc9923c |
filetype plugin on
|
|
|
cc9923c |
|
|
cvsdist |
e5ebffe |
if &term=="xterm"
|
|
cvsdist |
e5ebffe |
set t_Co=8
|
|
cvsdist |
409f8fc |
set t_Sb=?[4%dm
|
|
cvsdist |
409f8fc |
set t_Sf=?[3%dm
|
|
cvsdist |
e5ebffe |
endif
|
|
|
44a6bac |
|
|
|
44a6bac |
" Don't wake up system with blinking cursor:
|
|
|
44a6bac |
" http://www.linuxpowertop.org/known.php
|
|
|
44a6bac |
let &guicursor = &guicursor . ",a:blinkon0"
|