|
|
6646c7 |
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
|
|
|
6646c7 |
set fileencodings=ucs-bom,utf-8,latin1
|
|
|
6646c7 |
endif
|
|
|
6646c7 |
|
|
|
6646c7 |
set nocompatible " Use Vim defaults (much better!)
|
|
|
6646c7 |
set bs=indent,eol,start " allow backspacing over everything in insert mode
|
|
|
6646c7 |
"set ai " always set autoindenting on
|
|
|
6646c7 |
"set backup " keep a backup file
|
|
|
6646c7 |
set history=50 " keep 50 lines of command line history
|
|
|
6646c7 |
set ruler " show the cursor position all the time
|
|
|
6646c7 |
|
|
|
6646c7 |
" Only do this part when compiled with support for autocommands
|
|
|
6646c7 |
if has("autocmd")
|
|
|
6646c7 |
augroup fedora
|
|
|
6646c7 |
autocmd!
|
|
|
6646c7 |
" In text files, always limit the width of text to 78 characters
|
|
|
6646c7 |
" autocmd BufRead *.txt set tw=78
|
|
|
6646c7 |
" When editing a file, always jump to the last cursor position
|
|
|
6646c7 |
autocmd BufReadPost *
|
|
|
6646c7 |
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
|
|
|
6646c7 |
\ exe "normal! g'\"" |
|
|
|
6646c7 |
\ endif
|
|
|
6646c7 |
" don't write swapfile on most commonly used directories for NFS mounts or USB sticks
|
|
|
6646c7 |
autocmd BufNewFile,BufReadPre /media/*,/run/media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp
|
|
|
6646c7 |
" start with spec file template
|
|
|
6646c7 |
autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec
|
|
|
6646c7 |
augroup END
|
|
|
6646c7 |
endif
|
|
|
6646c7 |
|
|
|
6646c7 |
|
|
|
6646c7 |
filetype plugin on
|
|
|
6646c7 |
|
|
|
6646c7 |
if &term=="xterm"
|
|
|
6646c7 |
set t_Co=8
|
|
|
6646c7 |
set t_Sb=?[4%dm
|
|
|
6646c7 |
set t_Sf=?[3%dm
|
|
|
6646c7 |
endif
|