-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc.deprecated
More file actions
201 lines (166 loc) · 5.92 KB
/
Copy pathvimrc.deprecated
File metadata and controls
201 lines (166 loc) · 5.92 KB
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
" ---------------------------- Modeline and Notes ---------------------------- {
" vim: foldlevel=0 foldmarker={,} foldmethod=marker
" vim: foldtext=deisufunc#DotVimsFoldText()
" ____ _ ____ _ _
" | _ \ ___(_) ___| _ _ __| |_ _(_)_ __ ___ _ __ ___
" | | | |/ _ \ \___ \| | | |_____ / _` \ \ / / | '_ ` _ \| '__/ __|
" | |_| | __/ |___) | |_| |_____| (_| |\ V /| | | | | | | | | (__
" |____/ \___|_|____/ \__,_| \__,_| \_/ |_|_| |_| |_|_| \___|
"
" DeiSu's deprecated vimrc, vimrc.plugins, vimrc.plugin.conf and vimrc.mappings
" Copyright © 2014-2015 DeiSu. All Rights Reserved.
" }
" ----------------------------- deprecated vimrc ----------------------------- {
" status line
" use airline instead
set statusline=%<[%n]\ %F\ %m%r%y\ %{exists('g:loaded_fugitive')?fugitive#statusline():''}\ %=%-14.(%l,%c%V%)\ %P
" box cursor in normal mode, vertical bar cursor in insert mode
if deisufunc#IsiTerm2()
if deisufunc#Istmux()
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
else
let &t_SI = "\<Esc>]50;CursorShape=1\x7" " vertical bar in insert mode
let &t_EI = "\<Esc>]50;CursorShape=0\x7" " block in normal mode
endif
endif
" }
" ------------------------- deprecated vimrc.plugins ------------------------- {
" Completion
" slow, worse performance than YCM
autocmd FileType java setlocal omnifunc=javacomplete#Complete
Plug 'artur-shaik/vim-javacomplete2', { 'for': 'java' } " {
" }
" Editing
" bind tmux prefix to <C-a>
" never used
Plug 'tpope/vim-speeddating'
" Front End Web Development
" CSS
" take 300ms to load a css file
Plug 'hail2u/vim-css3-syntax', { 'for': 'css' }
" take 100ms to load and cause lag while scrolling
Plug 'ap/vim-css-color', { 'for': 'css' }
" IDE
" almost never used
" not main stream
" python: use python-mode to run python code
" c++/c: use make file
" everything else: use code runner
Plug 'xuhdev/SingleCompile'
" Utilities
" use VimShell instead
Plug 'chilicuil/conque'
" can do everything
" but nothing will be done perfectly
Plug 'Shougo/neomru.vim'
Plug 'Shougo/neoyank.vim'
Plug 'Shougo/unite-outline'
Plug 'Shougo/unite.vim'
" Colors
" only use solarized
" sorry to these awesome color schemes
Plug 'sickill/vim-monokai'
Plug 'tomasr/molokai'
Plug 'nelstrom/vim-mac-classic-theme'
Plug 'noahfrederick/vim-hemisu'
Plug 'rickharris/vim-blackboard'
Plug 'junegunn/seoul256.vim'
" }
" ---------------------- deprecated vimrc.plugins.conf ----------------------- {
" YouCompleteMe
" don't really need preview window
let g:ycm_add_preview_to_completeopt = 1
let g:ycm_autoclose_preview_window_after_completion = 1
let g:ycm_autoclose_preview_window_after_insertion = 1
" Syntastic
" special characters cause ruler and colorcolumn twisted
" just stick to default signs
let g:syntastic_error_symbol = '✗'
let g:syntastic_warning_symbol = '⚠'
let g:syntastic_style_error_symbol = '✠'
let g:syntastic_style_warning_symbol = '≈'
" SingleCompile
nnoremap <F3> :SCCompileRun<CR>
inoremap <F3> <esc>:SCCompileRun<CR>
nnoremap <F4> :SCCompile<CR>
inoremap <F4> :<esc>:SCCompile<CR>
" conque
nnoremap <Leader>tb :ConqueTermVSplit bash<CR>
nnoremap <Leader>tz :ConqueTermVSplit zsh<CR>
" unite.vim
call unite#filters#matcher_default#use(['matcher_fuzzy'])
call unite#filters#sorter_default#use(['sorter_rank'])
call unite#custom#profile('default', 'context', {
\ 'start_insert': 1
\ })
" custom ignores
" .a files are static libraries generated by the archive tool
call unite#custom#source('file_rec,file_rec/async,file_mru,file,buffer,grep', 'ignore_pattern', join([
\ '\.git/', 'tmp/', 'RECYCLE\.BIN/', 'plugins/',
\ '\.DS_Store$', '\.localized$',
\ '\.pdf$', '\.zip$',
\ '\.png$', '\.jpg$', '\.gif$',
\ '\.mp4$',
\ '\.o$', '\.a$', '\.so$', '\.obj$', '\.swp$', '\.pyc$', '\.pyo$', '\.class$',
\ 'a\.out$',
\ ], '\|'))
let g:unite_prompt = '> '
let g:unite_data_directory = '~/.vim/tmp/unite'
let g:unite_source_rec_max_cache_files = 5000
let g:unite_source_grep_max_candidates = 200
" ag is the first choice
if executable('ag')
let g:unite_source_grep_command = 'ag'
let g:unite_source_grep_default_opts = '--nocolor --line-numbers --nogroup -S -C4'
let g:unite_source_grep_recursive_opt = ''
elseif executable('ack')
let g:unite_source_grep_command = 'ack'
let g:unite_source_grep_default_opts = '--no-heading --no-color -C4'
let g:unite_source_grep_recursive_opt = ''
endif
" map space to the prefix for Unite
nnoremap [unite] <Nop>
nmap <Space> [unite]
" general fuzzy search
nnoremap <silent> [unite]<Space> :<C-u>Unite -buffer-name=general buffer file_mru bookmark file_rec/async:!<CR><C-u>
" search buffers
nnoremap <silent> [unite]b :<C-u>Unite -auto-resize -buffer-name=buffers buffer<CR>
" search files
nnoremap <silent> [unite]f :<C-u>Unite -buffer-name=files file_rec/async:!<CR>
" yank history
nnoremap <silent> [unite]y :Unite history/yank<CR>
" search lines
nnoremap <silent> [unite]l :<C-u>Unite -auto-resize -buffer-name=line line<CR>
" search mappings
nnoremap <silent> [unite]m :<C-u>Unite -auto-resize -buffer-name=mappings mapping<CR>
" registers
nnoremap <silent> [unite]r :<C-u>Unite -buffer-name=register register<CR>
" outline (tags)
nnoremap <silent> [unite]o :<C-u>Unite -buffer-name=outline -vertical outline<CR>
" }
" ------------------------ deprecated vimrc.mappings ------------------------- {
" Buffer
" arrow keys are used for window navigation
nnoremap <Left> :bprev<CR>
nnoremap <Right> :bnext<CR>
" Tab
" use these maps for airline commands
" navigate
nnoremap <Leader>1 1gt
nnoremap <Leader>2 2gt
nnoremap <Leader>3 3gt
nnoremap <Leader>4 4gt
nnoremap <Leader>5 5gt
nnoremap <Leader>6 6gt
nnoremap <Leader>7 7gt
nnoremap <Leader>8 8gt
nnoremap <Leader>9 9gt
nnoremap <Leader>0 :tablast<CR>
" <Up> and <Down> are used for window navigation
" almost never use tabs
nnoremap <Up> :tabprev<CR>
nnoremap <Down> :tabnext<CR>
" jk to <Esc>
inoremap jk <Esc>
" }