Advertisement
Guest User

Untitled

a guest
Feb 17th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.12 KB | None | 0 0
  1. "" commentry Plugin
  2. "" kana/vim-textobj-entire
  3. :set nocompatible
  4. filetype off
  5. set rtp+=~/.vim/bundle/Vundle.vim
  6. call vundle#begin()
  7. Plugin 'liuchengxu/space-vim-dark'
  8. Plugin 'VundleVim/Vundle.vim'
  9. Plugin 'scrooloose/nerdtree'
  10. Plugin 'bling/vim-airline'
  11. Plugin 'vim-airline/vim-airline-themes'
  12. Plugin 'tpope/vim-fugitive'
  13. Plugin 'airblade/vim-gitgutter'
  14. Plugin 'ervandew/supertab'
  15. Plugin 'tmhedberg/SimpylFold'
  16. Plugin 'majutsushi/tagbar'
  17. Plugin 'terryma/vim-multiple-cursors'
  18. Plugin 'Shougo/neocomplete'
  19. Plugin 'Yggdroot/indentLine'
  20. Plugin 'vim-scripts/AutoComplPop'
  21. Plugin 'tpope/vim-surround'
  22. Plugin 'mattn/emmet-vim'
  23. Plugin 'lepture/vim-jinja'
  24. Plugin 'tpope/vim-markdown'
  25. Plugin 'w0rp/ale'
  26. Plugin 'nvie/vim-flake8'
  27. Plugin 'vim-syntastic/syntastic'
  28. Plugin 'plytophogy/vim-virtualenv'
  29. Plugin 'junegunn/goyo.vim'
  30. Plugin 'junegunn/limelight.vim'
  31. Plugin 'tpope/vim-unimpaired'
  32. Plugin 'vim-latex/vim-latex'
  33. "Plugin 'maxbrunsfeld/vim-yankstack'
  34. "Plugin 'glench/vim-jinja2-syntax'
  35. "Plugin 'fatih/vim-go'
  36. "Plugin 'mileszs/ack.vim' "Ack [options] {pattern} [{directories}]
  37. "Plugin 'nginx.vim'
  38. "Plugin 'scrooloose/nerdcommenter'
  39. "Plugin 'peterhoeg/vim-qml'
  40. "Plugin 'kien/ctrlp.vim'
  41. call vundle#end()
  42.  
  43. :colorscheme space-vim-dark
  44. :set number
  45. :set ls=2
  46. :filetype plugin on
  47. :set tabstop=2
  48. :set expandtab
  49. :set softtabstop=2
  50. :set shiftwidth=2
  51. :setlocal foldmethod=indent
  52. :set foldlevel=99
  53. :set nowrap
  54. :set nocp
  55. :set clipboard=unnamed
  56. :set clipboard=unnamedplus
  57. :set autoindent
  58. :set cindent
  59. :set si
  60. :syntax enable
  61. :set showmatch
  62. :set hlsearch
  63. :set ignorecase
  64. :set noswapfile
  65. :set mouse=a
  66. :set t_Co=256
  67. :set wildmenu
  68. :set cursorline
  69. :set lazyredraw
  70. :set encoding=utf-8
  71.  
  72. " tab stop
  73. " for html files, 2 spaces
  74. autocmd Filetype html setlocal ts=2 sw=2 expandtab
  75. "for js/python/go
  76. autocmd Filetype javascript setlocal ts=4 sw=4 sts=0 expandtab
  77. autocmd Filetype python setlocal ts=4 sw=4 expandtab
  78. autocmd Filetype go setlocal ts=4 sw=4 expandtab
  79.  
  80. "enable folding with the spacebar
  81. noremap <space> za
  82.  
  83. " auto complete for ( , ", ' [ , {
  84. :inoremap ( ()<Left>
  85. :inoremap " ""<Left>
  86. :inoremap ` ``<Left>
  87. :inoremap ' ''<Left>
  88. :inoremap [ []<Left>
  89. :inoremap { {}<Left>
  90.  
  91. " auto comment and uncooment with F6 and F7 key
  92. :autocmd FileType c,cpp,java,scala let b:comment_leader = '// '
  93. :autocmd FileType sh,ruby,python let b:comment_leader = '# '
  94. :noremap <silent> #6 :<C-B>silent <C-E>s/^/<C-R>=escape(b:comment_leader,'\/')<CR>/<CR>:nohlsearch<CR>
  95. :noremap <silent> #5 :<C-B>silent <C-E>s/^\V<C-R>=escape(b:comment_leader,'\/')<CR>//e<CR>:nohlsearch<CR>
  96.  
  97. " tab switch
  98. " F2 nxt F3 prev
  99. :noremap <silent> #3 :bp<CR>
  100. :noremap <silent> #4 :bn<CR>
  101.  
  102. " Paste mode toggle with F2 Pastemode disable auto-indent and bracket auto-compelation and it helps you to paste code fro elsewhere .
  103. :set pastetoggle=<F2>
  104.  
  105. " clear the search with C-l
  106. :noremap <silent> <C-l> :<C-u>nohlsearch<CR><C-l>
  107.  
  108. " spell
  109. :noremap <silent> <F12> :setlocal spell spelllang=en_us<CR>
  110. :noremap <silent> <F10> :set nospell<CR>
  111.  
  112. "Plugin
  113.  
  114. " NERDTree plugin setting
  115. :map <F9> :NERDTreeToggle<CR> " toggle showing NERDTree
  116. "open a NERDTree automatically when vim starts up if no files were specified
  117. :autocmd StdinReadPre * let s:std_in=1
  118. :autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
  119. :autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif " close vim if the only window left open is a NERDTree
  120. "ignore files on NERDTree
  121. let NERDTreeIgnore=['\.pyc$', '\~$']
  122.  
  123. "airline
  124. " airline plugin setting
  125. :let g:airline_theme='minimalist'
  126. :let g:airline#extensions#tabline#enabled = 1 " showing tabs
  127. :let g:airline_powerline_fonts = 1
  128. if !exists('g:airline_symbols')
  129. let g:airline_symbols = {}
  130. endif
  131. " unicode symbols
  132. let g:airline_left_sep = '»'
  133. let g:airline_left_sep = '▶'
  134. let g:airline_right_sep = '«'
  135. let g:airline_right_sep = '◀'
  136.  
  137. "neocompl
  138. "tag bar
  139. nmap <F8> :TagbarToggle<CR>
  140.  
  141. "markdown
  142. autocmd BufNewFile,BufReadPost *.md set filetype=markdown
  143. let g:markdown_fenced_languages = ['html', 'python', 'bash=sh']
  144. let g:markdown_syntax_conceal = 0
  145.  
  146. "multiple cursors
  147. let g:multi_cursor_use_default_mapping=0
  148. "Default mapping
  149. let g:multi_cursor_next_key='<C-n>'
  150. let g:multi_cursor_prev_key='<C-p>'
  151. let g:multi_cursor_skip_key='<C-x>'
  152. let g:multi_cursor_quit_key='<Esc>'
  153. " Map start key separately from next key
  154. let g:multi_cursor_start_key='<C-n>'
  155. let g:multi_cursor_start_word_key='g<C-n>'
  156. let g:multi_cursor_quit_key='<C-c>'
  157.  
  158. " supertab
  159. let g:SuperTabDefaultCompletionType='<C-n>'
  160.  
  161. " indent
  162. let g:indentLine_char = '┆'
  163.  
  164. highlight ColorColumn ctermbg=white
  165. call matchadd("ColorColumn", '\%81v', 100)
  166. nnoremap <C-c> :call multiple_cursors#quit()<CR>
  167.  
  168. " jinja
  169. au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm set ft=jinja
  170.  
  171. " emmet
  172. " only for html and css
  173. let g:user_emmet_install_global = 0
  174. autocmd FileType html,css,md EmmetInstall
  175.  
  176. "syntastic
  177. let python_highlight_all=1
  178. syntax on
  179. "SimpylFold
  180. let g:SimpylFold_docstring_preview=1
  181.  
  182. " split nav
  183.  
  184. " split pos
  185. set splitbelow
  186. set splitright
  187.  
  188. " resize panes
  189. nnoremap <silent> <Leader>+ :exe "resize " . (winheight(0) * 3/2)<CR>
  190. nnoremap <silent> <Leader>- :exe "resize " . (winheight(0) * 2/3)<CR>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement