Advertisement
Guest User

Untitled

a guest
Mar 11th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 5.18 KB | None | 0 0
  1. set nocompatible
  2.  
  3. """""""""""""""""""""""""""""""""""""""""""
  4. " ---------------- VUNDLE --------------- "
  5. """""""""""""""""""""""""""""""""""""""""""
  6. filetype off
  7. set rtp+=~/.vim/bundle/Vundle.vim
  8. call vundle#begin()
  9.  
  10. " -- PLUGINS -- "
  11. Plugin 'VundleVim/Vundle.vim'
  12. Plugin 'tpope/vim-surround'
  13. Plugin 'vim-airline/vim-airline'
  14.     let g:airline#extisions#tabline#enabled = 1
  15.     let g:airline#extensions#tabline#left_sep = ''
  16.     let g:airline#extensions#tabline#left_alt_sep = ''
  17.     let g:airline#extensions#tabline#formatter = 'unique_tail'
  18. Plugin 'vim-airline/vim-airline-themes'
  19.     let g:airline_left_sep = ''
  20.     let g:airline_right_sep = ''
  21.     let g:airline_detect_modified=1
  22.     let g:airline_powerline_fonts=1
  23.     let g:airline_theme='angr'
  24. Plugin 'ervandew/supertab'
  25. Plugin 'nvie/vim-flake8'
  26. Plugin 'ctrlpvim/ctrlp.vim'
  27. Plugin 'davidhalter/jedi-vim'
  28.     let g:jedi#force_py_version = 3
  29. if !has('nvim')
  30.     Plugin 'valloric/youcompleteme'
  31.         " --- instalar o clang e recompilar  --- "
  32.         "  sudo apt-get install clang
  33.         "  cd ~/.vim/bundle/youcompleteme
  34.         "  python3 install.py --all
  35.         let g:ycm_autoclose_preview_window_after_completion=1
  36.         let g:ycm_python_binary_path='/usr/bin/python3'
  37.         map <leader>g :ycmcompleter gotodefinitionelsedeclaration<cr>
  38. endif
  39. if has('nvim')
  40.     Plugin 'shougo/deoplete.nvim'
  41.         let g:deoplete#eneble_at_startup = 1
  42.         let g:python3_host_prog = '/usr/bin/python3'
  43.         let g:loaded_python_provider = 1  " no python2
  44.         let g:python_host_skip_check = 1  " no python2 checker
  45. endif
  46. Plugin 'dracula/vim'
  47. Plugin 'rakr/vim-one'
  48. Plugin 'reewr/vim-monokai-phoenix'
  49. Plugin 'tmhedberg/SimpylFold'
  50.     let g:SimpylFold_docstrign_preview=1
  51. Plugin 'scrooloose/nerdtree'
  52. Plugin 'Xuyuanp/nerdtree-git-plugin'
  53. Plugin 'flazz/vim-colorschemes'
  54. "Plugin '' TAGBAR
  55. Plugin 'Yggdroot/indentLine'
  56.     let g:indentLine_char = '┆'  
  57. Plugin 'scrooloose/syntastic'
  58.     let g:syntastic_error_symbol='✗'
  59.     let g:syntastic_warning_symbol='⚠'
  60.     let g:syntastic_check_on_open=1
  61.     let g:syntastic_loc_list_height=3
  62.  
  63. call vundle#end()
  64. filetype plugin indent on
  65. """""""""""""""""""""""""""""""""""""""""""
  66. " --------------------------------------- "
  67. """""""""""""""""""""""""""""""""""""""""""
  68. colorscheme monokai-phoenix
  69.  
  70. " -------- MAPS ---------"
  71. nnoremap n nzz
  72. nnoremap N Nzz
  73. nnoremap * *zz
  74. nnoremap # #zz
  75. nnoremap g* g*zz
  76. nnoremap g# g#zz
  77. inoremap ( ()<left>
  78. inoremap { {}<left>
  79. inoremap [ []<left>
  80. inoremap " ""<left>
  81. inoremap ' ''<left>
  82. nnoremap <space> za  " folding
  83. noremap <c-n> :NERDTreeToggle<cr>
  84. noremap <c-j> ddp
  85. noremap <c-k> ddkP
  86. vnoremap <c-j> dkp
  87. vnoremap <c-k> dkP
  88. noremap <M-down> <esc>:resize +2<cr>
  89. noremap <M-up> <esc>:resize -2<cr>
  90. noremap <M-left> <c-w><
  91. noremap <M-right> <c-w>>
  92. noremap <c-right> <c-w>l
  93. noremap <c-left> <c-w>h
  94. noremap <c-down> <c-w>j
  95. noremap <c-up> <c-w>k
  96. nnoremap <leader>en :setlocal spell! spelllang=en<cr>
  97. nnoremap <leader>pt :setlocal spell! spelllang=pt<cr>
  98. nnoremap n nzzzv
  99. nnoremap N Nzzzv
  100. nnoremap <leader>v Yp$
  101. nnoremap <leader>s :noh<cr>
  102. nnoremap <leader>b i<cr>
  103. nnoremap <leader>sop :source $MYVIMRC<cr>
  104. nnoremap <pageUP> :tabNext<cr>
  105. nnoremap <pageDOWN> :tabprevious<cr>
  106. nnoremap <leader><tab> :tabnew<cr>
  107. nnoremap <leader>a :%y+
  108.  
  109.  
  110.  
  111. " ------- SETS ------ "
  112. set t_ut=
  113. set incsearch
  114. set hlsearch
  115. set ignorecase
  116. set smartcase
  117. set number
  118. set relativenumber
  119. set magic
  120. set autoindent
  121. set tabstop=4
  122. set expandtab
  123. set ruler
  124. set shiftwidth=4
  125. set showmode
  126. set showmatch
  127. set encoding=utf-8
  128. set cursorline
  129. set textwidth=79
  130. set synmaxcol=80
  131. set noswapfile
  132. set undolevels=1000
  133. set autoread
  134. set history=200
  135. set scrolloff=4
  136. set backspace=indent,eol,start
  137. set colorcolumn=+1
  138. set completeopt-=preview
  139. set showcmd
  140. set path+=**
  141. set wildmenu
  142. set hidden
  143. " set list lcs=tab:\┆\ "like indentLine plugin, but for tabs indentation
  144. syntax on
  145.  
  146.  
  147.  
  148. "
  149. " ----- PYTHON VIRTUALENV SUPPORT ----- "
  150. "
  151. "py3 << EOF
  152. "import os
  153. "import sys
  154. "if 'VIRTUAL_ENV' in os.environ:
  155. "    project_base_dir = os.environ['VIRTUAL_ENV']
  156. "    activate_this = os.path.join(project_base_dir, 'bin/activate_this.py')
  157. "    exec(compile(open(activate_this, 'rb').read(), activate_this, 'exec'),
  158. "                 dict(__file__=activate_this))
  159. "EOF
  160.  
  161.  
  162.  
  163. "
  164. " ----- last cursor position ----- "
  165. "
  166. autocmd BufReadPost *
  167.    \ if line("'\"") > 0 && line("'\"") <= line("$") |
  168.     \   exe "normal g`\"" |
  169.     \ endif
  170.  
  171.  
  172. """""""""""""""""""""""""""""
  173. "      VIM   SCREENCAST     "
  174. """""""""""""""""""""""""""""
  175.  
  176. "VimScreencast #65: moving lines vertically
  177. ""function! s:Visual()
  178. "    return visualmode() == 'V'
  179. "endfunction
  180. "
  181. "function! wincent#mappings#visual#mode_up() abort range
  182. "    let l:at_top=a:firstline == 1
  183. "    if s:Visual() && !l:at_top
  184. "        '<,'>move '<-2
  185. "        call feedkeys('gv=', 'n')
  186. "    endif
  187. "    call feedkeys('gv', 'n')
  188. "endfunction
  189. "
  190. "function! wincent#mappings#visual#move_down() abort range
  191. "    let l:at_bottom=a:lastline == line('$')
  192. "    if s:Visual && !l:at_bottom
  193. "        '<,'>move '>+1
  194. "        call feddkeys('gv=', 'n')
  195. "    endif
  196. "    call feedkeys('gv', 'n')
  197. "endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement