-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
47 lines (33 loc) · 1.08 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
" vimrc from Colm MacCárthaigh
" Tell vim that my terminal background is dark
set bg=dark
" Turn on syntax highlighting
syntax on
" Use UTF-8, since even my name needs this
set encoding=utf-8
" Enabled digraphs, so that ctrl-k a ' produces á
set digraph
" Backups have saved me more than once
set backup
" Highlight matching brackets
set showmatch
" never beep
set visualbell
" Never use real tabs
set expandtab
" Keep indentation reasonable
set tabstop=4
" Automation group for coding
augroup cprog
" Remove all autocommands
au!
" When starting to edit a file:
" For *.c and *.h files set formatting of comments and set C-indenting on.
" For other files switch it off.
" Don't change the order, it's important that the line with * comes first.
autocmd BufRead * set formatoptions=tcql nocindent comments&
autocmd BufRead *.c,*.h set formatoptions=croql nocindent comments=sr:/*,mb:**,el:*/,:// number
augroup END
" highlight extra whitespace at the end of lines
highlight ExtraWhitespace ctermbg=darkgreen guibg=lightgreen
match ExtraWhitespace /\s\+$/