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