Guest User

Untitled

a guest
Dec 17th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.80 KB | None | 0 0
  1. set nu
  2. set nobackup
  3. set noswapfile
  4. set nowritebackup
  5. set showmatch
  6. set showcmd
  7. set title
  8. set exrc
  9. set secure
  10. set ruler
  11.  
  12. set encoding=utf-8
  13. set fileencoding=utf-8
  14.  
  15. " Search hightligth
  16. set hlsearch
  17. nohlsearch
  18. set incsearch
  19.  
  20. " Show vertical line of cursor
  21. "set cursorline
  22.  
  23. let mapleader = " "
  24. let localleader = "\\"
  25.  
  26. set nocompatible " be iMproved, required
  27. filetype off " required
  28.  
  29. " set the runtime path to include Vundle and initialize
  30. set rtp+=~/.vim/bundle/Vundle.vim
  31. call vundle#begin()
  32. " alternatively, pass a path where Vundle should install plugins
  33. "call vundle#begin('~/some/path/here')
  34.  
  35. " let Vundle manage Vundle, required
  36. Plugin 'VundleVim/Vundle.vim'
  37. Plugin 'Vimjas/vim-python-pep8-indent'
  38. Plugin 'scrooloose/nerdtree'
  39. Plugin 'vim-syntastic/syntastic'
  40. Plugin 'altercation/vim-colors-solarized'
  41. Plugin 'vim-airline/vim-airline'
  42. Plugin 'vim-airline/vim-airline-themes'
  43. Plugin 'ctrlpvim/ctrlp.vim'
  44. Plugin 'nanotech/jellybeans.vim'
  45. Plugin 'davidhalter/jedi-vim'
  46. Plugin 'rip-rip/clang_complete'
  47.  
  48. " YCM is not working in this vim
  49. "Plugin 'Valloric/YouCompleteMe'
  50.  
  51. " All of your Plugins must be added before the following line
  52. call vundle#end() " required
  53. filetype plugin indent on " required
  54.  
  55. " To ignore plugin indent changes, instead use:
  56. "filetype plugin on
  57.  
  58. " Put your non-Plugin stuff after this line
  59.  
  60. " YCM setting {{{
  61.  
  62. "let g:ycm_disable_for_files_larger_than_kb = 1000
  63. "let g:ycm_python_binary_path = '/usr/bin/python'
  64.  
  65. "let g:ycm_global_ycm_extra_conf = '~/.vim/.ycm_extra_conf.py'
  66. "let g:ycm_confirm_extra_conf = 0
  67.  
  68. "To avoid conflict snippets
  69. "let g:ycm_key_list_select_completion = ['<C-j>', '<Down>']
  70. "let g:ycm_key_list_previous_completion = ['<C-k>', '<Up>']
  71. "let g:ycm_autoclose_preview_window_after_completion = 1
  72.  
  73. "let g:ycm_use_ultisnips_completer = 1
  74. "let g:ycm_seed_identifiers_with_syntax = 1
  75. "let g:ycm_complete_in_comments = 1
  76. "let g:ycm_complete_in_strings = 1
  77. "let g:ycm_auto_trigger = 1
  78.  
  79. "nnoremap <leader>g :YcmCompleter GoTo<CR>
  80. nnoremap <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
  81. nnoremap <leader>gg :YcmCompleter GoToImprecise<CR>
  82. nnoremap <leader>d :YcmCompleter GoToDeclaration<CR>
  83. nnoremap <leader>t :YcmCompleter GetType<CR>
  84. nnoremap <leader>p :YcmCompleter GetParent<CR>
  85.  
  86. " }}}
  87.  
  88. " Key mapping {{{
  89.  
  90. " Fast save, exit
  91. nnoremap <leader><leader> :w<cr>
  92. nnoremap <leader>q :q!<cr>
  93. nnoremap <leader>w :wq<cr>
  94.  
  95. " Fast splitting
  96. " move to splitted vim is Ctrl+w
  97. nnoremap <leader>% <C-w><C-v><C-w>l
  98. nnoremap <leader>" <C-w>s
  99. inoremap <C-@> <Esc>
  100.  
  101. " }}}
  102.  
  103.  
  104. " Development setting {{{
  105. let g:ctrlp_custom_ignore = {
  106. \ 'dir': '\.git$\|public$\|log$\|tmp$\|vendor$',
  107. \ 'file': '\v\.(exe|so|dll)$'
  108. \ }
  109.  
  110. set statusline+=%#warningmsg#
  111. set statusline+=%{SyntasticStatuslineFlag()}
  112. set statusline+=%*
  113.  
  114. let g:syntastic_always_populate_loc_list = 1
  115. let g:syntastic_auto_loc_list = 1
  116. let g:syntastic_check_on_open = 1
  117. let g:syntastic_check_on_wq = 0
  118.  
  119. set cindent
  120. set autoindent
  121. set smartindent
  122. set tabstop=4
  123. set shiftwidth=4 " controls the depth of autoindentation
  124. set expandtab " converts tabs to spaces
  125. set laststatus=2 " show status line always
  126.  
  127. autocmd Filetype cpp setlocal expandtab tabstop=2 shiftwidth=2
  128. autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4
  129.  
  130. let g:syntastic_python_checkers = ['python']
  131.  
  132. "@seso : pylint is too slow and shows invalid error
  133. "let g:syntastic_python_checkers = ['python', 'pylint']
  134. "let g:syntastic_python_pylint_args = '-E'
  135.  
  136. let g:clang_library_path='/usr/lib/llvm-3.4/lib'
  137.  
  138. " }}}
  139.  
  140. " color/theme setting {{{
  141.  
  142. syntax enable
  143. "set background=light
  144. "colorscheme solarized
  145. "color jellybeans
  146.  
  147. let g:airline_theme='wombat'
  148. let g:airline#extensions#tabline#enabled = 1
  149.  
  150. hi Comment ctermfg=DarkGrey guifg=DarkGrey
  151.  
  152. " }}}
  153.  
  154.  
  155. " Other setting
  156. autocmd BufReadPost *
  157. \ if line("'\"") > 0 && line("'\"") <= line("$") |
  158. \ exe "normal! g`\"" |
  159. \ endif
Add Comment
Please, Sign In to add comment