summaryrefslogtreecommitdiffstats
path: root/.vimrc
blob: f97a2d6bcfcb36bab988aa74b8d01b68094e4c80 (plain)
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
" Hide intro message
set shortmess+=I

" Don't pause after leaving insert mode
set timeoutlen=0

" Show line and column ruler at bottom right
set ruler

" Show line numbers
set number

" Tabs are 8 spaces
set tabstop=8
set shiftwidth=8

" Set line length and warning column
set textwidth=80
au BufNewFile,BufRead COMMIT_EDITMSG set textwidth=72
if &textwidth != 0
	set colorcolumn=+1
endif

" Make tabs and trailing spaces visible
set list
set listchars=tab:>\ ,trail:~

" Set file types based on file names
autocmd BufNewFile,BufRead README,TODO  setf markdown
autocmd BufNewFile,BufRead *.txt        setf markdown
autocmd BufNewFile,BufRead *.mdwn       setf ikiwiki
autocmd BufNewFile,BufRead ChangeLog    setf changelog
autocmd BufNewFile,BufRead changelog    setf debchangelog
autocmd BufNewFile,BufRead *.esh        setf sh

" Shell scripts are POSIX-compliant
let g:is_posix = 1

" Highlight ikiwiki syntax in markdown syntax
let g:ikiwiki_render_filetype = 'markdown'

" Enable syntax highlighting
if &t_Co > 1
	syntax enable
	colorscheme pehjota
endif

" Automatically indent lines
filetype plugin indent on

" Display command-line completion matches
set wildmenu

" Disable bell
set visualbell
set t_vb=

" Disable mouse
set mouse=