-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
96 lines (91 loc) · 2.94 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
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
call plug#begin('~/.vim/plugged')
Plug 'liuchengxu/vim-better-default'
"Plug 'junegunn/fzf.vim'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
Plug 'ervandew/supertab'
Plug 'w0rp/ale'
Plug 'tmhedberg/SimpylFold'
Plug 'pangloss/vim-javascript'
Plug 'mzlogin/vim-markdown-toc'
Plug 'plasticboy/vim-markdown'
Plug 'iamcco/markdown-preview.vim'
Plug 'airblade/vim-gitgutter'
Plug 'skywind3000/asyncrun.vim'
Plug 'luochen1990/rainbow'
Plug 'junegunn/rainbow_parentheses.vim'
Plug 'Raimondi/delimitMate'
Plug 'majutsushi/tagbar'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'Chiel92/vim-autoformat'
Plug 'Yggdroot/indentLine'
Plug 'nathanaelkane/vim-indent-guides'
Plug 'skywind3000/asyncrun.vim'
Plug 'scrooloose/nerdcommenter'
Plug 'scrooloose/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'tpope/vim-surround'
Plug 'jistr/vim-nerdtree-tabs'
Plug 'tyrannicaltoucan/vim-deep-space'
Plug 'othree/html5.vim'
Plug 'Valloric/YouCompleteMe'
call plug#end()
let NERDTreeMinimalUI = 1
let NERDTreeShowHidden=1
let g:nerdtree_tabs_autofind = 1
map <C-z> :NERDTreeToggle<CR>
let g:rainbow_active = 1
set undodir=/tmp
autocmd FileType python nnoremap <LocalLeader>= :0,$!yapf --style='{based_on_style: pep8, indent_width: 4}'<CR>
let g:ultisnips_python_style='google'
" make YCM compatible with UltiSnips (using supertab)
let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
let g:SuperTabDefaultCompletionType = '<C-n>'
" better key bindings for UltiSnipsExpandTrigger
let g:UltiSnipsExpandTrigger = "<tab>"
let g:UltiSnipsJumpForwardTrigger = "<tab>"
let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"
let g:UltiSnipsListSnippets = "<c-l>"
"asyncrun
" Quick run via <F5>
nnoremap <F5> :call <SID>compile_and_run()<CR>
augroup SPACEVIM_ASYNCRUN
autocmd!
" Automatically open the quickfix window
autocmd User AsyncRunStart call asyncrun#quickfix_toggle(15, 1)
augroup END
function! s:compile_and_run()
exec 'w'
if &filetype == 'c'
exec "AsyncRun! gcc % -o %<; time ./%<"
elseif &filetype == 'cpp'
exec "AsyncRun! g++ -std=c++11 % -o %<; time ./%<"
elseif &filetype == 'java'
exec "AsyncRun! javac %; time java %<"
elseif &filetype == 'sh'
exec "AsyncRun! time bash %"
elseif &filetype == 'python'
exec "AsyncRun! time python %"
endif
endfunction
call airline#parts#define_function('ALE', 'ALEGetStatusLine')
call airline#parts#define_condition('ALE', 'exists("*ALEGetStatusLine")')
let g:airline_section_error = airline#section#create_right(['ALE'])
nmap <silent> <C-k> <Plug>(ale_previous_wrap)
nmap <silent> <C-j> <Plug>(ale_next_wrap)
"tabs
nnoremap <A-F1> 1gt
nnoremap <A-F2> 2gt
nnoremap <A-F3> 3gt
nnoremap <A-F4> 4gt
nnoremap <A-F5> 5gt
nnoremap <A-F6> 6gt
nnoremap <A-F7> 7gt
nnoremap <A-F8> 8gt
nnoremap <A-F9> 9gt
nnoremap <A-F0> 10gt
"tagbar
nmap <C-t> :TagbarToggle<CR>