Changeset 979


Ignore:
Timestamp:
Feb 13, 2009, 11:51:55 PM (15 years ago)
Author:
geofft
Message:
er, Fedora has a nontrivial vimrc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/fedora/config/etc/vimrc

    r977 r979  
    1 :set viminfo=
     1if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
     2   set fileencodings=ucs-bom,utf-8,latin1
     3endif
     4
     5set nocompatible        " Use Vim defaults (much better!)
     6set bs=indent,eol,start         " allow backspacing over everything in insert mode
     7"set ai                 " always set autoindenting on
     8"set backup             " keep a backup file
     9set viminfo=            " don't keep a viminfo file
     10set history=50          " keep 50 lines of command line history
     11set ruler               " show the cursor position all the time
     12
     13" Only do this part when compiled with support for autocommands
     14if has("autocmd")
     15  " In text files, always limit the width of text to 78 characters
     16  autocmd BufRead *.txt set tw=78
     17  " When editing a file, always jump to the last cursor position
     18  autocmd BufReadPost *
     19  \ if line("'\"") > 0 && line ("'\"") <= line("$") |
     20  \   exe "normal! g'\"" |
     21  \ endif
     22  " don't write swapfile on most commonly used directories for NFS mounts or USB sticks
     23  autocmd BufNewFile,BufReadPre /media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp
     24  " start with spec file template
     25  autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec
     26endif
     27
     28if has("cscope") && filereadable("/usr/bin/cscope")
     29   set csprg=/usr/bin/cscope
     30   set csto=0
     31   set cst
     32   set nocsverb
     33   " add any database in current directory
     34   if filereadable("cscope.out")
     35      cs add cscope.out
     36   " else add database pointed to by environment
     37   elseif $CSCOPE_DB != ""
     38      cs add $CSCOPE_DB
     39   endif
     40   set csverb
     41endif
     42
     43" Switch syntax highlighting on, when the terminal has colors
     44" Also switch on highlighting the last used search pattern.
     45if &t_Co > 2 || has("gui_running")
     46  syntax on
     47  set hlsearch
     48endif
     49
     50filetype plugin on
     51
     52if &term=="xterm"
     53     set t_Co=8
     54     set t_Sb=[4%dm
     55     set t_Sf=[3%dm
     56endif
     57
     58" Don't wake up system with blinking cursor:
     59" http://www.linuxpowertop.org/known.php
     60let &guicursor = &guicursor . ",a:blinkon0"
Note: See TracChangeset for help on using the changeset viewer.