]>
Commit | Line | Data |
---|---|---|
08facb3b MT |
1 | if v:lang =~ "utf8$" || v:lang =~ "UTF-8$" |
2 | set fileencodings=ucs-bom,utf-8,latin1 | |
3 | endif | |
4 | ||
5 | set nocompatible | |
6 | set bs=indent,eol,start " allow backspacing over everything in insert mode | |
7 | set viminfo='20,\"50 " read/write a .viminfo file, don't store more | |
8 | " than 50 lines of registers | |
9 | set history=50 " keep 50 lines of command line history | |
10 | set ruler " show the cursor position all the time | |
11 | ||
12 | " Only do this part when compiled with support for autocommands | |
13 | if 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 | |
33 | endif | |
34 | ||
35 | syntax on | |
36 | if (&term == "iterm") || (&term == "putty") | |
37 | set background=dark | |
38 | endif | |
39 | ||
40 | " Don't wake up system with blinking cursor: | |
41 | " http://www.linuxpowertop.org/known.php | |
42 | let &guicursor = &guicursor . ",a:blinkon0" |