aboutsummaryrefslogtreecommitdiff
path: root/init.vim
blob: 0c48a685921b81e6f71969c9b1c755e39b1520ba (plain) (blame)
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
104
105
106
107
108
set encoding=utf-8
set fileencoding=utf-8
set nu
set rnu
set listchars=tab:▸\ ,eol:¬,trail:•
" set listchars=tab:\|\  " Alternative listchars w/o special chars.
set tw=80
set colorcolumn=80
set ic
set hls
set updatecount=0
set nocompatible
set tabstop=4
set shiftwidth=4
set noexpandtab
set mouse+=a
syntax on
"if &term =~ '^screen'
"	" tmux knows the extended mouse mode
"	set ttymouse=xterm2
"endif


" I know how to setup my editor, I don't need your changes to my vim
" configuration.
set nomodeline

" Use \-n in normal mode to toggle line numbers
nmap <leader>n :set invnu<CR>
nmap <leader>r :set invrnu<CR>
" Use \-l in normal mode to toggle listchars
nmap <leader>l :set list!<CR>

" Use \-s to pop open a spelling menu. use ]s to search forwards and [s to go
" backwards.
" Apparently this also doesn't work if spell checking isn't enabled
" at the time you enable it.
set spell
nnoremap \s ea<C-X><C-S>
set nospell

" set hidden			" This will allow you to change buffers w/o saving

" Omni completion, c-x c-o in insert/append mode
filetype plugin on
set omnifunc=syntaxcomplete#Complete

" Stolen from the help page:
" 
" One typical way to use the netrw tree display is to: >
" 
" 	vim .
" 	(use i until a tree display shows)
" 	navigate to a file
" 	v  (edit as desired in vertically split window)
" 	ctrl-w h  (to return to the netrw listing)
" 	P (edit newly selected file in the previous window)
" 	ctrl-w h  (to return to the netrw listing)
" 	P (edit newly selected file in the previous window)
let g:netrw_liststyle=3

" Useful on some terminals, not always supported in old tmux versions
" set termguicolors
" let g:airline_theme="monochrome"
let g:airline_theme="distinguished"

colorscheme 256_noir
" colorscheme distinguished
" colorscheme sane

set guifont=ProFontOTB\ 11

if has("gui_running")
	colorscheme 256_noir
	set background=light
endif


" let g:hardtime_default_on = 1

" For syntastic it's worth running 
" SyntasticInfo : to see what's available for the given open file
" SyntasticCheck yamllint : if you want to say manually run the `yamllint`
" checker

let g:syntastic_yaml_checkers = ['yamllint']
let g:syntastic_go_checkers = [ 'go', 'gofmt', 'golangci_lint' ]

" This lets :lopen / :lwindow always be populated work
let g:syntastic_always_populate_loc_list = 1

" some info on the Tabular plugin:
" http://vimcasts.org/episodes/aligning-text-with-tabular-vim/

" Commenting in and out blocks can be done with `gc`
" https://github.com/tpope/vim-commentary

nmap <F8> :TagbarToggle<CR>
let g:tagbar_ctags_bin='uctags'

" For clang complete
" path to directory where library can be found
let g:clang_library_path='/usr/local/lib'
" package clang-tools-extra on OpenBSD provides the library


" For info on fugitive
" https://github.com/tpope/vim-fugitive