-
Notifications
You must be signed in to change notification settings - Fork 1
/
.vimrc
72 lines (55 loc) · 2.02 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
"-----------------------------------------------------------------------------
" General
"-----------------------------------------------------------------------------
source ~/dotfiles/vimrc-base.vim
"-----------------------------------------------------------------------------
" NeoBundle (Plugins)
"-----------------------------------------------------------------------------
source ~/dotfiles/bundles.vim
"-----------------------------------------------------------------------------
" Custom mappings for plugins
"-----------------------------------------------------------------------------
" Bubble single lines
nmap <C-Up> [e
nmap <C-Down> ]e
" Bubble multiple lines
vmap <C-Up> [egv
vmap <C-Down> ]egv
" opens nerd tree in project root dir
map <silent> <F6> :ToggleNERDTree<CR>
map <silent> <F7> :TagbarToggle<CR>
" Get Stack Overflow code snippets
map <leader>so <Plug>Howdoi
" Switch between complementary filetypes
" mnemonic: Go Switch
nnoremap gs :A<CR>
"-----------------------------------------------------------------------------
" Plugin preferences
"-----------------------------------------------------------------------------
" Colorscheme
colorscheme xoria256
" ultisnips snippet location
let g:UltiSnipsSnippetsDir="~/.vim/bundle/ultisnips/UltiSnips"
" Autocomplete menu options
set completeopt=longest,menuone
"-----------------------------------------------------------------------------
" Tagbar
"-----------------------------------------------------------------------------
source ~/dotfiles/tagbar-rc.vim
if has("autocmd")
function! TurnOffTaxingFeaturesIfLargeFile()
let numLines = line('$')
if numLines > 3000
setlocal foldmethod=manual
endif
if numLines > 6000
let b:tagbar_ignore = 1
endif
endfunction
" disable plugins/features that fail on large files
autocmd BufNewFile,BufReadPost *.h call TurnOffTaxingFeaturesIfLargeFile()
endif
" extra custom vim settings for current dir
if filereadable(".custom.vim")
so .custom.vim
endif