-
Notifications
You must be signed in to change notification settings - Fork 2
/
after.vimrc
136 lines (111 loc) · 3.75 KB
/
after.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
set relativenumber
set number
set cursorline
" Change leader
let mapleader = "\<space>"
" Search and filtering (vimified messes with this stuff and it's not my
" preference)
nnoremap / /
vnoremap / /
" Needed because vim 7.4 yaml syntax is really slow and cpu intensive. This is a
" more simple and faster syntaxer.
Bundle 'stephpy/vim-yaml'
" Jinja
Bundle 'Glench/Vim-Jinja2-Syntax'
" Flog (git log magic)
Bundle 'rbong/vim-flog'
" fugitive for git stuff
"Bundle 'tpope/vim-fugitive'
" Indent-guides
Bundle 'nathanaelkane/vim-indent-guides'
let g:indent_guides_enable_on_vim_startup = 1
let g:indent_guides_exclude_filetypes = ['help', 'nerdtree']
let g:indent_guides_start_level=2
let g:indent_guides_guide_size=1
let g:indent_guides_auto_colors = 0
autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd ctermbg=238
autocmd VimEnter,Colorscheme * :hi IndentGuidesEven ctermbg=236
" Jedi because I'm lazy
Bundle 'davidhalter/jedi-vim'
let g:jedi#goto_command = "<leader>d"
let g:jedi#goto_assignments_command = "<leader>g"
let g:jedi#goto_definitions_command = ""
let g:jedi#documentation_command = "K"
let g:jedi#usages_command = "<leader>n"
let g:jedi#completions_command = "<C-Space>"
let g:jedi#rename_command = "<leader>r"
colorscheme badwolf
" For sanity
let g:syntastic_check_on_wq = 0
let g:syntastic_mode_map = { 'mode': 'passive', 'active_filetypes': [], 'passive_filetypes': [] }
" For sphinx, the default is something else and it drives me nuts
let g:syntastic_rst_checkers = ['sphinx']
" Random filetypes
"
" asciidoc - *.adoc
au BufRead,BufNewFile *.adoc set filetype=asciidoc
" Set python just to be sure (in case vimified defaults change)
autocmd FileType python setlocal expandtab sw=4 sts=4 ts=8
" Set yaml to be 2 space tab width
autocmd FileType yaml setlocal expandtab sw=2 sts=2 ts=4
" Set ruby to be 2 space tab width
autocmd FileType ruby setlocal expandtab sw=2 sts=2 ts=4
" Set golang stuff
autocmd FileType go setlocal ts=4 sts=4 sw=4 noexpandtab
" Set jinja highlighting for sanity
autocmd BufNewFile,BufRead *.j2,*.jinja,*.jinja2 set ft=jinja
" various bits of pymode are slow, turn off things we don't use
let g:pymode = 1
let g:pymode_indent = 1
let g:pymode_folding = 0
let g:pymode_motion = 1
let g:pymode_doc = 1
let g:pymode_virtualenv = 1
let g:pymode_breakpoint = 1
let g:pymode_run = 1
let g:pymode_syntax = 1
let g:pymode_syntax_slow_sync = 1
let g:pymode_rope = 0
let g:pymode_lint = 0
let g:pymode_lint_checkers = ['pyflakes', 'pep8']
let g:pymode_trim_whitespaces = 1
" Golang stuffs
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_fields = 1
let g:go_highlight_types = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
let g:go_fmt_autosave = 1
" shortcuts because I'm lazy
cnoreabbrev SC w <bar> SyntasticCheck
cnoreabbrev SR SyntasticReset
cnoreabbrev AR AirlineRefresh
cnoreabbrev TT TagbarToggle
cnoreabbrev SP set paste
" Set airline to use not use powerline fancy font symbols
let g:airline_powerline_fonts = 0
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
let g:airline_left_sep = ''
let g:airline_right_sep = ''
let g:airline_symbols.crypt = '🔒'
let g:airline_symbols.linenr = '¶'
let g:airline_symbols.branch = '⑂'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.spell = 'Ꞩ'
let g:airline_symbols.notexists = '∄'
let g:airline_symbols.whitespace = 'Ξ'
" Some webfonts don't handle this well which screws up ssh (hterm) on ChromeOS
set showbreak=>
set listchars=tab:+\ ,eol:¬,extends:>,precedes:<,trail:_
" Trailing whitespace override
" Only shown when not in insert mode so I don't go insane.
augroup trailing
au!
au InsertEnter * :set listchars-=trail:_
au InsertLeave * :set listchars+=trail:_
augroup END
" Set this because reasons
set eol