192 |
- |
1 |
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
|
|
|
2 |
set fileencodings=ucs-bom,utf-8,latin1
|
|
|
3 |
endif
|
|
|
4 |
|
|
|
5 |
set nocompatible " Use Vim defaults (much better!)
|
|
|
6 |
set bs=indent,eol,start " allow backspacing over everything in insert mode
|
|
|
7 |
"set ai " always set autoindenting on
|
|
|
8 |
"set backup " keep a backup file
|
|
|
9 |
set history=50 " keep 50 lines of command line history
|
|
|
10 |
set ruler " show the cursor position all the time
|
|
|
11 |
|
|
|
12 |
" Only do this part when compiled with support for autocommands
|
|
|
13 |
if has("autocmd")
|
|
|
14 |
augroup redhat
|
|
|
15 |
autocmd!
|
|
|
16 |
" In text files, always limit the width of text to 78 characters
|
|
|
17 |
" autocmd BufRead *.txt set tw=78
|
|
|
18 |
" When editing a file, always jump to the last cursor position
|
|
|
19 |
autocmd BufReadPost *
|
|
|
20 |
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
|
|
|
21 |
\ exe "normal! g'\"" |
|
|
|
22 |
\ endif
|
|
|
23 |
" don't write swapfile on most commonly used directories for NFS mounts or USB sticks
|
|
|
24 |
autocmd BufNewFile,BufReadPre /media/*,/run/media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp
|
|
|
25 |
" start with spec file template
|
|
|
26 |
autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec
|
|
|
27 |
augroup END
|
|
|
28 |
endif
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
filetype plugin on
|
|
|
32 |
|
|
|
33 |
if &term=="xterm"
|
|
|
34 |
set t_Co=8
|
|
|
35 |
set t_Sb=[4%dm
|
|
|
36 |
set t_Sf=[3%dm
|
|
|
37 |
endif
|