Guest User

Untitled

a guest
Jan 20th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.55 KB | None | 0 0
  1. " <3 Vim
  2. " This is my .vimrc
  3. " I'm still working on it...
  4.  
  5. set nocompatible
  6.  
  7. " VUNDLE/PLUGINS
  8. set rtp+=~/.vim/bundle/Vundle.vim
  9. filetype off
  10.  
  11. call vundle#begin()
  12. Plugin 'VundleVim/Vundle.vim'
  13.  
  14. Plugin 'ctrlpvim/ctrlp.vim'
  15. Plugin 'lotabout/skim'
  16. Plugin 'sjl/gundo.vim'
  17. Plugin 'ntpeters/vim-better-whitespace'
  18. Plugin 'tpope/vim-surround'
  19. Plugin 'scrooloose/nerdcommenter'
  20. Plugin 'tpope/vim-vinegar'
  21. Plugin 'tpope/vim-fugitive'
  22. Plugin 'airblade/vim-gitgutter'
  23. Plugin 'easymotion/vim-easymotion'
  24. Plugin 'vim-scripts/SearchComplete'
  25.  
  26. Plugin 'rust-lang/rust.vim'
  27. Plugin 'davidzchen/vim-bazel'
  28. Plugin 'fatih/vim-go'
  29.  
  30. Plugin 'altercation/vim-colors-solarized'
  31. Plugin 'vim-airline/vim-airline'
  32. Plugin 'vim-airline/vim-airline-themes'
  33. call vundle#end()
  34. " END VUNDLE/PLUGINS
  35.  
  36. filetype indent on
  37. filetype plugin on
  38. filetype plugin indent on
  39.  
  40. set clipboard=unnamedplus
  41.  
  42. let g:airline_powerline_fonts = 1
  43. let g:airline_theme='jellybeans'
  44.  
  45. let g:EasyMotion_smartcase = 1
  46.  
  47. let g:netrw_banner = 0
  48.  
  49. set path+=**
  50.  
  51. hi Search term=underline ctermbg=LightBlue
  52.  
  53. set guifont=Menlo\ for\ Powerline
  54.  
  55. let g:gundo_close_on_revert = 1
  56.  
  57. let g:NERDDefaultAlign = 'left'
  58.  
  59. set completeopt-=preview
  60.  
  61. highlight Folded ctermbg=none
  62.  
  63.  
  64. syntax enable
  65. set background=dark
  66. let g:solarized_termtrans = 1
  67. colorscheme solarized
  68.  
  69. set hidden
  70. set wildmenu
  71. set showcmd
  72.  
  73. set incsearch
  74. set hlsearch
  75.  
  76. set scrolloff=1
  77.  
  78. set ignorecase
  79. set smartcase
  80. set scs
  81.  
  82. set backspace=indent,eol,start
  83.  
  84. " When opening a new line and no filetype-specific indenting is enabled, keep
  85. " the same indent as the line you're currently on. Useful for READMEs, etc.
  86. set autoindent
  87.  
  88. " Stop certain movements from always going to the first character of a line.
  89. " While this behaviour deviates from that of Vi, it does what most users
  90. " coming from other editors would expect.
  91. set nostartofline
  92.  
  93. " Statusbar stuff
  94. set ruler
  95. set laststatus=2
  96. set cmdheight=2
  97.  
  98. " Instead of failing a command because of unsaved changes, instead raise a
  99. " dialogue asking if you wish to save changed files.
  100. set confirm
  101.  
  102. " Use visual bell instead of beeping when doing something wrong
  103. set visualbell
  104. set t_vb=
  105.  
  106. " Enable use of the mouse for all modes
  107. " If you need this you are a failure to the way of Vim...
  108. set mouse=a
  109.  
  110.  
  111. " THE BEST OPTION
  112. set relativenumber
  113. set number
  114.  
  115. set updatetime=250
  116. let g:gitgutter_escape_grep = 1
  117.  
  118.  
  119. " Quickly time out on keycodes, but never time out on mappings
  120. set notimeout ttimeout ttimeoutlen=200
  121.  
  122. " Indentation options
  123. " Indentation settings for using 4 spaces instead of tabs.
  124. " Do not change 'tabstop' from its default value of 8 with this setup.
  125.  
  126. set nobackup
  127. set nowritebackup
  128.  
  129. " Mappings
  130. "
  131.  
  132. let mapleader = ","
  133. nnoremap ; :
  134. " Fuck you, Ex mode
  135. nnoremap Q <Nop>
  136.  
  137. nnoremap <F5> :GundoToggle<CR>
  138. nnoremap <Leader>s :SK<CR>
  139. nnoremap <Leader>p :CtrlP<cr>
  140. nnoremap <Leader>. :CtrlPTag<cr>
  141. nnoremap <Leader>b :CtrlPBuffer<cr>
  142. nmap <Leader>w <Plug>(easymotion-w)
  143. nmap <Leader>B <Plug>(easymotion-b)
  144. nmap <Leader>j <Plug>(easymotion-j)
  145. nmap <Leader>n <Plug>(easymotion-j)
  146. nmap <Leader>k <Plug>(easymotion-k)
  147. nmap <Leader>e <Plug>(easymotion-k)
  148.  
  149. nnoremap <Leader>oc :vsp %<.cpp<CR>
  150. nnoremap <Leader>oC :vsp %<.c<CR>
  151. nnoremap <Leader>oh :vsp %<.h<CR>
  152. nnoremap <Leader>oH :vsp %<.hpp<CR>
  153.  
  154. nnoremap <Leader>ig ggO<ESC>"%p0:s/\//_/g<CR>:s/\./_/g<CR>A_<ESC>0gUiwyyppkki#ifndef <ESC>j0i#define <ESC>j0i#endif // <ESC>ddGpggjj:nohl<CR>
  155. nnoremap <Leader>fd :!mkdir -p /tmp/%/<CR>:!clang-format % > /tmp/%/format<CR>:vert diffsplit /tmp/%/format<CR>
  156.  
  157. " Window movement
  158. nmap <silent> <c-k> :wincmd k<CR>
  159. nmap <silent> <c-j> :wincmd j<CR>
  160. nmap <silent> <c-h> :wincmd h<CR>
  161. nmap <silent> <c-l> :wincmd l<CR>
  162.  
  163. "setlocal fo+=aw
Add Comment
Please, Sign In to add comment