]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - config/vim/vimrc
nfs: Update to 2.3.3
[people/pmueller/ipfire-2.x.git] / config / vim / vimrc
CommitLineData
08facb3b
MT
1if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
2 set fileencodings=ucs-bom,utf-8,latin1
3endif
4
5set nocompatible
6set bs=indent,eol,start " allow backspacing over everything in insert mode
7set viminfo='20,\"50 " read/write a .viminfo file, don't store more
8 " than 50 lines of registers
9set history=50 " keep 50 lines of command line history
10set ruler " show the cursor position all the time
11
12" Only do this part when compiled with support for autocommands
13if has("autocmd")
14 augroup ipfire
15 autocmd!
16
17 " In text files, always limit the width of text to 78 characters
18 " autocmd BufRead *.txt set tw=78
19
20 " When editing a file, always jump to the last cursor position
21 autocmd BufReadPost *
22 \ if line("'\"") > 0 && line ("'\"") <= line("$") |
23 \ exe "normal! g'\"" |
24 \ endif
25
26 " don't write swapfile on most commonly used directories for NFS mounts or USB sticks
27 autocmd BufNewFile,BufReadPre /media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp
28
29 " start with spec file template
30 autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec
31
32 augroup END
33endif
34
35syntax on
36if (&term == "iterm") || (&term == "putty")
37 set background=dark
38endif
39
40" Don't wake up system with blinking cursor:
41" http://www.linuxpowertop.org/known.php
42let &guicursor = &guicursor . ",a:blinkon0"