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