Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 5.08 KB | None | 0 0
  1. " Vundle Plugin Manager ------------------------------- {{{
  2. if !has('neovim')
  3.     " boilerplate ----------------------------------------- {{{
  4.     set nocompatible
  5.     filetype off
  6.     set rtp+=~/.vim/bundle/Vundle.vim
  7.     call vundle#begin()
  8.     Plugin 'gmarik/Vundle.vim'
  9.     " }}}
  10.  
  11.     " Navigation
  12.     Plugin 'scrooloose/nerdtree'
  13.     Plugin 'christoomey/vim-tmux-navigator'
  14.     Plugin 'majutsushi/tagbar'
  15.     Plugin 'kien/ctrlp.vim'
  16.  
  17.     " IDE-like features
  18.     Plugin 'jpalardy/vim-slime'
  19.     Plugin 'tpope/vim-surround'
  20.     Plugin 'tmux-plugins/vim-tmux'
  21.     Plugin 'davidhalter/jedi-vim'
  22.     Plugin 'scrooloose/syntastic'
  23.     Plugin 'osyo-manga/vim-brightest'
  24.     Plugin 'AutoComplPop'
  25.  
  26.     " Python
  27.     Plugin 'tmhedberg/SimpylFold'
  28.     ""Plugin 'hdima/python-syntax'
  29.     ""Plugin 'https://github.com/vim-scripts/python.vim--Vasiliev'
  30.     Plugin 'klen/python-mode'
  31.     ""Plugin 'python-rope/ropevim'
  32.  
  33.     " Snipmate and snipmate dependencies
  34.     Plugin 'MarcWeber/vim-addon-mw-utils'
  35.     Plugin 'tomtom/tlib_vim'
  36.     Plugin 'garbas/vim-snipmate'
  37.     Plugin 'honza/vim-snippets'
  38.  
  39.     " Appearance
  40.     Plugin 'slim-template/vim-slim'
  41.     Plugin 'thinca/vim-guicolorscheme'
  42.  
  43.     " Colorschemes
  44.     Plugin 'tomasr/molokai'
  45.     Plugin 'nanotech/jellybeans.vim'
  46.  
  47.     " boilerplate ----------------------------------------- {{{
  48.     call vundle#end()
  49.     filetype plugin indent on
  50.  
  51.     " Required for vim slime to work with ipython
  52.     let g:slime_target = "tmux"
  53.     let g:slime_paste_file = "$HOME/.slime_paste"
  54.     let g:slime_python_ipython = 1
  55.     " }}}
  56. endif
  57. " }}}
  58. if has('nvim')
  59. call plug#begin()
  60.  
  61.     Plug 'scrooloose/nerdtree'
  62.     Plug 'christoomey/vim-tmux-navigator'
  63.     Plug 'tmux-plugins/vim-tmux'
  64.     Plug 'jpalardy/vim-slime'
  65.     Plug 'tpope/vim-surround'
  66.     Plug 'tomasr/molokai'
  67.     "Plug 'kein/ctrlp' " fuzzy search for vim tags
  68.     Plug 'majutsushi/tagbar'
  69.  
  70.     " Autocomplete
  71.     "Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
  72.     Plug 'tmsvg/peartree'
  73.  
  74.     " Haskell
  75.     Plug 'neovimhaskell/haskell-vim'
  76.     Plug 'commercialhaskell/hindent'
  77.     Plug 'jaspervdj/stylish-haskell'
  78.     Plug 'eagletmt/neco-ghc'
  79.     Plug 'calebsmith/vim-lambdify'
  80.     Plug 'glittershark/vim-hare'
  81.     Plug 'vim-scripts/hlint'
  82.  
  83.     " Other stuff
  84.     Plug 'chrisbra/Colorizer'
  85.  
  86. call plug#end()
  87. endif
  88. " Set Default Appearance ------------------------------ {{{
  89.  
  90. set relativenumber
  91. set number
  92. colorscheme molokai
  93. set colorcolumn=50,65,80
  94. highlight ColorColumn ctermbg=Black
  95. highlight ColorColumn guibg=#222222
  96.  
  97. if exists('+termguicolors')
  98.   let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
  99.   let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
  100.   set termguicolors
  101. endif
  102.  
  103. " Allow transparent background.
  104. hi Normal guibg=NONE ctermbg=NONE
  105. " }}}
  106. " Set Default Vim Behavior ---------------------------- {{{
  107. " Hopefully this will stop that infernal beeping.
  108. set vb t_vb=
  109.  
  110. " More natural split direction.
  111. set splitbelow
  112. set splitright
  113.  
  114. " Make tabs 4 spaces, but still behave like tabs.
  115. set tabstop=8
  116. set expandtab
  117. set shiftwidth=4
  118. set softtabstop=4
  119.  
  120. " set formatting for comments
  121. set formatprg=par\ -w65jf
  122.  
  123. " }}}
  124. " Language-Specific Behavior -------------------------- {{{
  125. au BufNewFile,BufRead *.py let g:python_highlight_all = 1
  126.  
  127. au BufRead,BufNewFile *.plx set filetype=plx
  128. " }}}
  129. " Remappings ------------------------------------------ {{{
  130.  
  131. " These should already be in there by default
  132. nnoremap Y y$
  133. inoremap <S-CR> <esc>j
  134. inoremap <C-Tab> <esc>
  135.  
  136. " Sometimes I want to use arrows when in insert mode
  137. inoremap <C-H> <Left>
  138. inoremap <C-J> <Down>
  139. inoremap <C-K> <Up>
  140. inoremap <C-L> <Right>
  141. inoremap <C-BS> <Del>
  142.  
  143. " Just in case I still need those keybindings for whatever reason.
  144. inoremap <Left> <C-H>
  145. inoremap <Down> <C-J>
  146. inoremap <Up> <C-K>
  147. inoremap <Right> <C-L>
  148.  
  149. " move line down one
  150. nnoremap - ddp
  151. nnoremap _ ddkP
  152.  
  153. " Quicker switching between splits.
  154. nnoremap <C-j> <C-w>j
  155. nnoremap <C-k> <C-w>k
  156. nnoremap <C-h> <C-w>h
  157. nnoremap <C-l> <C-w>l
  158.  
  159. " Open specific files on the computer.
  160. nnoremap <leader>rc :split  ~/.vimrc<cr>
  161. nnoremap <leader>RC :vsplit ~/.vimrc<cr>
  162. nnoremap <leader>sn :split ~/.vim/bundle/vim-snippets/snippets/<CR>
  163. nnoremap <leader>SN :vsplit ~/.vim/bundle/vim-snippets/snippets/<CR>
  164.  
  165. " Use the tagbar plugin.
  166. nnoremap <silent> <Leader>b :TagbarToggle<CR>
  167.  
  168. " Use CtrlP
  169. nnoremap <silent> <Leader>B :CtrlP<CR>
  170.  
  171. " Ctrl+A interferes with tmux.
  172. nnoremap <Leader><C-x> <C-a>
  173. " }}}
  174. " Autocorrect ----------------------------------------- {{{
  175. iab retrun return
  176. iab improt import
  177. iab gloabl global
  178. iab import\ import impot
  179. iab ednl endl
  180. "  }}}
  181. " Allow manual folding in vim files ------------------- {{{
  182. augroup filetype_vim
  183.     autocmd!
  184.     autocmd FileType vim setlocal foldmethod=marker
  185. augroup END
  186. " }}}
  187. " Syntastic Settings ---------------------------------- {{{
  188. set statusline+=%#warningmsg#
  189. set statusline+=%{SyntasticStatuslineFlag()}
  190. set statusline+=%*
  191.  
  192. let g:syntastic_always_populate_loc_list = 1
  193. let g:syntastic_auto_loc_list = 1
  194. let g:syntastic_check_on_open = 1
  195. let g:syntastic_check_on_wq = 0
  196. "}}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement