/
.vimrc
executable file
·104 lines (66 loc) · 1.66 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
" .vimrc by Rafal Rawicki, rafal@rawicki.org
" Modified: 6th November 2009
" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" Fix for non xterm terminal
nmap ^[[5;5~ <C-PageUp>
nmap ^[[6;5~ <C-PageDown>
" Syntax highlighting and line numbering
syntax on
set bg=dark
set t_Co=256
colorscheme molokai
set nu
" For too long lines
highlight OverLength ctermbg=darkred ctermfg=white guibg=#FFD9D9
"match OverLength /\%81v.*/
" Auto indentation
set autoindent
set cindent
set tabstop=4
"set softtabstop=4
set shiftwidth=4
"set expandtab
" Smart scrolling (10 lines before viewport ends)
set so=10
" Search options
set hlsearch
set incsearch
" Backspace behaviour
" Yes, it seems to be uncomfortable, but enforces a good practices in working
" wth Vim
set backspace=eol,start
" Backup
set nobackup
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set autowrite
" Fixes for my common typos.
ab Q q
ab W w
ab Wq wq
ab Wqa wqa
ab Qa qa
" Default encoding
set enc=utf-8
set tenc=utf-8
" Autofolding
"set fdm=indent
"set fml=10
"set fdn=4
"set foldlevel=1
"set foldnestmax=3
au Filetype tex let g:tex_fold_enabled=1
au Filetype tex set fdm=syntax
au BufNewFile,BufRead *.nc set filetype=cpp
au Syntax def runtime! syntax/cpp.vim
set shortmess=atI
iab #i #include
filetype plugin indent on
" Highlight and remove extra whitespace
:highlight ExtraWhitespace ctermbg=red guibg=red
:autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
set laststatus=2
call pathogen#infect()