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