Skip to content

Commit efe07ff

Browse files
committed
add plugins
1 parent 9d74672 commit efe07ff

File tree

2 files changed

+73
-53
lines changed

2 files changed

+73
-53
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ Requirements
5757
- `cmake` Compile the ycm_core library
5858
- `ctags` For plugin tarbar
5959
- `ack-grep` For plugin ctrlsf
60-
- `libclang-dev` For plugin YouCompleteMe
6160

6261
Installation
6362
-----
@@ -245,6 +244,7 @@ LINKS
245244
246245
- [vim](https://github.com/vim/vim)
247246
- [use_vim_as_ide](https://github.com/yangyangwithgnu/use_vim_as_ide)
247+
- [dotfiles](https://github.com/junegunn/dotfiles)
248248
249249
Contact
250250
-----

vimrc

Lines changed: 72 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ silent! if plug#begin('~/.vim/plugged')
1313
" Colors
1414
Plug 'altercation/vim-colors-solarized'
1515
Plug 'tomasr/molokai'
16+
Plug 'colepeters/spacemacs-theme.vim'
1617
Plug 'sheerun/vim-polyglot'
1718

1819
" Edit
1920
Plug 'SirVer/ultisnips'
20-
Plug 'terryma/vim-multiple-cursors'
2121
Plug 'matze/vim-move'
2222
Plug 'jiangmiao/auto-pairs'
2323
Plug 'kana/vim-operator-user'
2424
Plug 'gcmt/wildfire.vim'
25+
Plug 'lilydjwg/fcitx.vim'
2526

2627
" Browsing
2728
Plug 'Yggdroot/indentLine'
@@ -30,19 +31,29 @@ Plug 'derekwyatt/vim-fswitch', { 'for': ['c', 'cpp', 'objc'] }
3031
Plug 'derekwyatt/vim-protodef', { 'for': ['c', 'cpp', 'objc'] }
3132
Plug 'scrooloose/nerdcommenter'
3233
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
34+
Plug 'suan/vim-instant-markdown', { 'for': 'markdown' }
35+
Plug 'tpope/vim-fugitive'
36+
Plug 'airblade/vim-gitgutter'
3337

3438
" Lint
35-
Plug 'scrooloose/syntastic', { 'on': 'SyntasticCheck' }
39+
Plug 'w0rp/ale'
3640

3741
Plug 'fholgado/minibufexpl.vim'
3842
Plug 'sjl/gundo.vim'
3943
Plug 'dyng/ctrlsf.vim'
4044
Plug 'ctrlpvim/ctrlp.vim'
41-
Plug 'suan/vim-instant-markdown', { 'for': 'markdown' }
45+
46+
"cd ~
47+
"mkdir ycm_build
48+
"cd ycm_build/
49+
"cmake -G "Unix Makefiles" -DPATH_TO_LLVM_ROOT=~/Downloads/clang+llvm-3.9.1-x86_64-linux-gnu-ubuntu-16.04 . ~/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp
50+
"cmake --build . --target ycm_core
51+
52+
"Plug 'Valloric/YouCompleteMe'
4253

4354
function! BuildYCM(info)
4455
if a:info.status == 'installed' || a:info.force
45-
!./install.py --clang-completer --system-libclang
56+
!./install.py --clang-completer
4657
endif
4758
endfunction
4859

@@ -54,7 +65,7 @@ endif
5465
" <<<<
5566
" >>>>
5667
" BASIC SETTINGS
57-
68+
5869
let mapleader = ';'
5970

6071
set encoding=utf-8
@@ -111,9 +122,9 @@ set visualbell
111122

112123
" Indent using four spaces
113124
set expandtab smarttab
114-
set tabstop=4
115-
set shiftwidth=4
116-
set softtabstop=4
125+
set tabstop=2
126+
set shiftwidth=2
127+
set softtabstop=2
117128

118129
set gcr=a:block-blinkon0
119130

@@ -139,11 +150,6 @@ set ruler
139150
set cursorline
140151
set cursorcolumn
141152

142-
" Disable output, vcs, archive, rails, temp and backup files
143-
set wildignore+=*.o,*.out,*.obj,.git,*.pyc,*.class
144-
set wildignore+=*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz
145-
set wildignore+=*.swp,*~,._*
146-
147153

148154
" <<<<
149155
" >>>>
@@ -152,6 +158,17 @@ set wildignore+=*.swp,*~,._*
152158
" ----------------------------------------------------------------------------
153159
" Basic mappings
154160
" ----------------------------------------------------------------------------
161+
162+
" Profile
163+
iabbrev @@ hmybmny@gmail.com
164+
iabbrev @b hmybmny.com
165+
166+
" Edit myvimrc
167+
nnoremap <leader>ev :vsplit $MYVIMRC<cr>
168+
nnoremap <leader>sv :source $MYVIMRC<cr>
169+
170+
" Edit
171+
nnoremap <leader>" viw<esc>a"<esc>hbi"<esc>lel
155172
156173
" Save
157174
inoremap <C-s> <C-O>:w<cr>
@@ -206,29 +223,21 @@ endfunction
206223
" <F8> | Color scheme selector
207224
" ----------------------------------------------------------------------------
208225
"
209-
if has('gui_running')
210-
set background=dark
211-
else
212-
set background=light
213-
endif
226+
set background=dark
214227

215228
let g:molokai_original = 1
216229
colorschem molokai
217230

218231
function! s:rotate_colors()
219-
if !exists('s:colors')
220-
let s:colors = s:colors()
221-
endif
222-
let name = remove(s:colors, 0)
223-
call add(s:colors, name)
224-
if has('gui_running')
225-
set background=dark
226-
else
227-
set background=light
228-
endif
229-
execute 'colorscheme' name
230-
redraw
231-
echo name
232+
if !exists('s:colors')
233+
let s:colors = s:colors()
234+
endif
235+
let name = remove(s:colors, 0)
236+
call add(s:colors, name)
237+
set background=dark
238+
execute 'colorscheme' name
239+
redraw
240+
echo name
232241
endfunction
233242

234243
nnoremap <silent> <F8> :call <SID>rotate_colors()<cr>
@@ -278,9 +287,8 @@ vmap <C-SPACE> <Plug>(wildfire-water)
278287
" ----------------------------------------------------------------------------
279288
" indentLine
280289
" ----------------------------------------------------------------------------
281-
282-
let g:indentLine_setColors = 0
283-
let g:indentLine_char = '¦'
290+
291+
let g:indentLine_char = ''
284292

285293
" ----------------------------------------------------------------------------
286294
" tarbar
@@ -359,12 +367,34 @@ let NERDTreeMinimalUI=1
359367
let NERDTreeAutoDeleteBuffer=1
360368

361369
" ----------------------------------------------------------------------------
362-
" syntastic
370+
" vim-instant-markdown
371+
" ----------------------------------------------------------------------------
372+
373+
autocmd BufNewFile,BufReadPost *.md set filetype=markdown
374+
375+
let g:instant_markdown_slow = 1
376+
let g:instant_markdown_autostart = 0
377+
378+
nnoremap <Leader>md :InstantMarkdownPreview<CR>
379+
380+
381+
" ----------------------------------------------------------------------------
382+
" vim-fugitive
383+
" ----------------------------------------------------------------------------
384+
385+
386+
" ----------------------------------------------------------------------------
387+
" vim-gitgutter
388+
" ----------------------------------------------------------------------------
389+
390+
set updatetime=250
391+
392+
let g:gitgutter_sign_column_always = 1
393+
394+
" ----------------------------------------------------------------------------
395+
" ale
363396
" ----------------------------------------------------------------------------
364397

365-
let g:syntastic_javascript_checkers = ['standard']
366-
let g:syntastic_always_populate_loc_list = 1
367-
let g:syntastic_auto_loc_list = 1
368398

369399
" ----------------------------------------------------------------------------
370400
" minibufexpl
@@ -405,6 +435,10 @@ nnoremap <c-f> :CtrlSF<CR>
405435
" ctrlp.vim
406436
" ----------------------------------------------------------------------------
407437

438+
" Disable output, vcs, archive, rails, temp and backup files
439+
set wildignore+=*.o,*.out,*.obj,.git,*.pyc,*.class
440+
set wildignore+=*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz
441+
set wildignore+=*.swp,*~,._*
408442
set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux
409443

410444
let g:ctrlp_map = '<s-p>'
@@ -415,17 +449,6 @@ let g:ctrlp_custom_ignore = {
415449
\ 'file': '\v\.(exe|so|dll|swp|log|jpg|png|json)$',
416450
\ }
417451

418-
" ----------------------------------------------------------------------------
419-
" vim-instant-markdown
420-
" ----------------------------------------------------------------------------
421-
422-
autocmd BufNewFile,BufReadPost *.md set filetype=markdown
423-
424-
let g:instant_markdown_slow = 1
425-
let g:instant_markdown_autostart = 0
426-
427-
nnoremap <Leader>md :InstantMarkdownPreview<CR>
428-
429452
" ----------------------------------------------------------------------------
430453
" YouCompleteMe
431454
" ----------------------------------------------------------------------------
@@ -436,9 +459,6 @@ nnoremap <leader>jc :YcmCompleter GoToDeclaration<CR>
436459
nnoremap <leader>jd :YcmCompleter GoToDefinition<CR>
437460
inoremap <leader>; <C-x><C-o>
438461
439-
highlight Pmenu ctermfg=2 ctermbg=3 guifg=#005f87 guibg=#EEE8D5
440-
highlight PmenuSel ctermfg=2 ctermbg=3 guifg=#AFD700 guibg=#106900
441-
442462
let g:ycm_complete_in_comments=1
443463
let g:ycm_confirm_extra_conf=0
444464
let g:ycm_collect_identifiers_from_tags_files=0

0 commit comments

Comments
 (0)