8b9a1c
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
8b9a1c
   set fileencodings=ucs-bom,utf-8,latin1
8b9a1c
endif
8b9a1c
8b9a1c
set nocompatible	" Use Vim defaults (much better!)
8b9a1c
set bs=indent,eol,start		" allow backspacing over everything in insert mode
8b9a1c
"set ai			" always set autoindenting on
8b9a1c
"set backup		" keep a backup file
8b9a1c
set viminfo='20,\"50	" read/write a .viminfo file, don't store more
8b9a1c
			" than 50 lines of registers
8b9a1c
set history=50		" keep 50 lines of command line history
8b9a1c
set ruler		" show the cursor position all the time
8b9a1c
8b9a1c
" Only do this part when compiled with support for autocommands
8b9a1c
if has("autocmd")
8b9a1c
  augroup fedora
8b9a1c
  autocmd!
8b9a1c
  " In text files, always limit the width of text to 78 characters
8b9a1c
  " autocmd BufRead *.txt set tw=78
8b9a1c
  " When editing a file, always jump to the last cursor position
8b9a1c
  autocmd BufReadPost *
8b9a1c
  \ if line("'\"") > 0 && line ("'\"") <= line("$") |
8b9a1c
  \   exe "normal! g'\"" |
8b9a1c
  \ endif
8b9a1c
  " don't write swapfile on most commonly used directories for NFS mounts or USB sticks
8b9a1c
  autocmd BufNewFile,BufReadPre /media/*,/run/media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp
8b9a1c
  " start with spec file template
8b9a1c
  autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec
8b9a1c
  augroup END
8b9a1c
endif
8b9a1c
8b9a1c
if has("cscope") && filereadable("/usr/bin/cscope")
8b9a1c
   set csprg=/usr/bin/cscope
8b9a1c
   set csto=0
8b9a1c
   set cst
8b9a1c
   set nocsverb
8b9a1c
   " add any database in current directory
8b9a1c
   if filereadable("cscope.out")
8b9a1c
      cs add $PWD/cscope.out
8b9a1c
   " else add database pointed to by environment
8b9a1c
   elseif $CSCOPE_DB != ""
8b9a1c
      cs add $CSCOPE_DB
8b9a1c
   endif
8b9a1c
   set csverb
8b9a1c
endif
8b9a1c
8b9a1c
" Switch syntax highlighting on, when the terminal has colors
8b9a1c
" Also switch on highlighting the last used search pattern.
8b9a1c
if &t_Co > 2 || has("gui_running")
8b9a1c
  syntax on
8b9a1c
  set hlsearch
8b9a1c
endif
8b9a1c
8b9a1c
filetype plugin on
8b9a1c
8b9a1c
if &term=="xterm"
8b9a1c
     set t_Co=8
8b9a1c
     set t_Sb=?[4%dm
8b9a1c
     set t_Sf=?[3%dm
8b9a1c
endif
8b9a1c
8b9a1c
" Don't wake up system with blinking cursor:
8b9a1c
" http://www.linuxpowertop.org/known.php
8b9a1c
let &guicursor = &guicursor . ",a:blinkon0"