blob: ca1feb1ce8e3c1df6370f48c9ccb24aa68ec266c (
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
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
|
" for long lines
set wrap
" tab position
set softtabstop=4
" autotab
set shiftwidth=4
" ditto
set autoindent
" syntax highlighting
syntax on
" try to detect filetypes
filetype on
" enable loading indent file for filetype
filetype plugin indent on
" line numbers
set number
" always show status
set laststatus=2
" enable mouse
set mouse=a
set statusline =
" Buffer number
set statusline +=[%n]
" File description
set statusline +=\ %f\ %h%m%r%w
" Filetype
set statusline +=%y
" Name of the current branch (needs fugitive.vim)
set statusline +=\ %{fugitive#statusline()}
" Total number of lines in the file
set statusline +=%=%-10L
" Line, column and percentage
set statusline +=%=%-14.(%l,%c%V%)\ %P
" syntastic
let g:syntastic_python_checkers = ['pyflakes']
let g:syntastic_go_checkers = ['go', 'golint', 'govet', 'errcheck']
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 0
let g:syntastic_loc_list_height = 5
" default to passive and manual checks
let g:syntastic_mode_map = { 'mode': 'passive' }
" make easy to perform a check
noremap <C-F6> :SyntasticCheck<CR>
"" vim-autoformat
noremap <C-F5> :Autoformat<CR>
" use local tags if found
set tags=./.tags;
let g:easytags_dynamic_files = 1
" build tags
map <C-F12> :!ctags -R -f ./.tags .<CR>
" enable omnicompletion
set omnifunc=syntaxcomplete#Complete
call pathogen#infect()
call pathogen#helptags()
" looks nice; apparently needs to go after pathogen
set termguicolors
set background=dark
colorscheme base16-monokai
" for tmux, screen, etc
set t_ut=
" default is too slow
set updatetime=500
" re-read the file if changed (if possible)
set autoread
au CursorHold,CursorHoldI * checktime
" make easier to open NERDTree
map <C-n> :NERDTreeToggle<CR>
let NERDTreeQuitOnOpen=1
" highlight end of line whitespace
highlight WhitespaceEOL ctermbg=red guibg=red
match WhitespaceEOL /\s\+$/
|