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