-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
61 lines (46 loc) · 1.59 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
set encoding=utf-8
" show line number
set nu
" set backspace
set backspace=indent,eol,start
" if directory name VimIDE is NOT .vim, we need to source pathogen.vim by
" absolute path
source ~/VimIDE/autoload/pathogen.vim
execute pathogen#infect()
syntax on
filetype plugin indent on
" NERD Tree
let NERDChristmasTree=0
let NERDTreeWinSize=30
map <C-n> :NERDTreeToggle<CR>
let NERDTreeWinPos="left"
" Automatically open a NERDTree if no files where specified
autocmd vimenter * if !argc() | NERDTree | endif
" Close vim if the only window left open is a NERDTree
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
" Tagbar
let g:tagbar_width=45
let g:tagbar_autofocus=1
nmap <F6> :TagbarToggle<CR>
map <C-t> :TagbarToggle<CR>
" Close vim if the only window left open is a NERDTree
autocmd bufenter * if (winnr("$") == 1 && exists("b:TagbarType") && b:TagbarType == "primary") | q | endif
" YouCompleteMe
let g:ycm_global_ycm_extra_conf='~/.vim/bundle/vim-YouCompleteMe/third_party/ycmd/cpp/.ycm_extra_conf.py'
let g:ycm_disable_for_files_larger_than_kb=1517475
" ctags
" generate ctags file
map <F5> :!ctags -R --languages=c++ --langmap=c++:+.inl -h +.inl --c++-kinds=+px --fields=+iaS --extra=+q .<CR><CR> :TagbarToggle<CR>
set tags=tags;
set autochdir
" airline
" indent set
set autoindent
" set expandtab "intention: whitespace instead of tab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set list " show Tab
set listchars=tab:\|\ , " use | to replace Tab
" C++ 11 syntax checking
let g:syntastic_cpp_compiler_options = '-std=c++11 -stdlib=libc++'