@@ -13,15 +13,16 @@ silent! if plug#begin('~/.vim/plugged')
1313" Colors
1414Plug ' altercation/vim-colors-solarized'
1515Plug ' tomasr/molokai'
16+ Plug ' colepeters/spacemacs-theme.vim'
1617Plug ' sheerun/vim-polyglot'
1718
1819" Edit
1920Plug ' SirVer/ultisnips'
20- Plug ' terryma/vim-multiple-cursors'
2121Plug ' matze/vim-move'
2222Plug ' jiangmiao/auto-pairs'
2323Plug ' kana/vim-operator-user'
2424Plug ' gcmt/wildfire.vim'
25+ Plug ' lilydjwg/fcitx.vim'
2526
2627" Browsing
2728Plug ' Yggdroot/indentLine'
@@ -30,19 +31,29 @@ Plug 'derekwyatt/vim-fswitch', { 'for': ['c', 'cpp', 'objc'] }
3031Plug ' derekwyatt/vim-protodef' , { ' for' : [' c' , ' cpp' , ' objc' ] }
3132Plug ' scrooloose/nerdcommenter'
3233Plug ' 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
3741Plug ' fholgado/minibufexpl.vim'
3842Plug ' sjl/gundo.vim'
3943Plug ' dyng/ctrlsf.vim'
4044Plug ' 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
4354function ! BuildYCM (info)
4455if a: info .status == ' installed' || a: info .force
45- ! ./install.py -- clang- completer -- system - libclang
56+ ! ./install.py -- clang- completer
4657endif
4758endfunction
4859
5465" <<<<
5566" >>>>
5667" BASIC SETTINGS
57-
68+
5869let mapleader = ' ;'
5970
6071set encoding = utf- 8
@@ -111,9 +122,9 @@ set visualbell
111122
112123" Indent using four spaces
113124set 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
118129set gcr = a: block- blinkon0
119130
@@ -139,11 +150,6 @@ set ruler
139150set cursorline
140151set 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@g mail.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
157174inoremap <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
215228let g: molokai_original = 1
216229colorschem molokai
217230
218231function ! 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
232241endfunction
233242
234243nnoremap <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
359367let 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,* ~,._*
408442set wildignore += * /tmp/ * ,* .so ,* .swp,* .zip " MacOSX/Linux
409443
410444let 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>
436459nnoremap <leader> jd :YcmCompleter GoToDefinition<CR>
437460inoremap <leader> ; <C-x><C-o>
438461
439- highlight Pmenu ctermfg= 2 ctermbg= 3 guifg= #005 f87 guibg= #EEE8D5
440- highlight PmenuSel ctermfg= 2 ctermbg= 3 guifg= #AFD700 guibg= #106900
441-
442462let g: ycm_complete_in_comments= 1
443463let g: ycm_confirm_extra_conf= 0
444464let g: ycm_collect_identifiers_from_tags_files= 0
0 commit comments