Skip to content

Instantly share code, notes, and snippets.

@WesleyAC
Created January 11, 2018 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WesleyAC/f4ac4d09c9bd19ce9b8f3ca5591e73e2 to your computer and use it in GitHub Desktop.
Save WesleyAC/f4ac4d09c9bd19ce9b8f3ca5591e73e2 to your computer and use it in GitHub Desktop.
" <3 Vim
" This is my .vimrc
" I'm still working on it...
set nocompatible
" VUNDLE/PLUGINS
set rtp+=~/.vim/bundle/Vundle.vim
filetype off
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'lotabout/skim'
Plugin 'sjl/gundo.vim'
Plugin 'ntpeters/vim-better-whitespace'
Plugin 'tpope/vim-surround'
Plugin 'scrooloose/nerdcommenter'
Plugin 'tpope/vim-vinegar'
Plugin 'tpope/vim-fugitive'
Plugin 'airblade/vim-gitgutter'
Plugin 'easymotion/vim-easymotion'
Plugin 'vim-scripts/SearchComplete'
Plugin 'rust-lang/rust.vim'
Plugin 'davidzchen/vim-bazel'
Plugin 'fatih/vim-go'
Plugin 'altercation/vim-colors-solarized'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
call vundle#end()
" END VUNDLE/PLUGINS
filetype indent on
filetype plugin on
filetype plugin indent on
set clipboard=unnamedplus
let g:airline_powerline_fonts = 1
let g:airline_theme='jellybeans'
let g:EasyMotion_smartcase = 1
let g:netrw_banner = 0
set path+=**
hi Search term=underline ctermbg=LightBlue
set guifont=Menlo\ for\ Powerline
let g:gundo_close_on_revert = 1
let g:NERDDefaultAlign = 'left'
set completeopt-=preview
highlight Folded ctermbg=none
syntax enable
set background=dark
let g:solarized_termtrans = 1
colorscheme solarized
set hidden
set wildmenu
set showcmd
set incsearch
set hlsearch
set scrolloff=1
set ignorecase
set smartcase
set scs
set backspace=indent,eol,start
" When opening a new line and no filetype-specific indenting is enabled, keep
" the same indent as the line you're currently on. Useful for READMEs, etc.
set autoindent
" Stop certain movements from always going to the first character of a line.
" While this behaviour deviates from that of Vi, it does what most users
" coming from other editors would expect.
set nostartofline
" Statusbar stuff
set ruler
set laststatus=2
set cmdheight=2
" Instead of failing a command because of unsaved changes, instead raise a
" dialogue asking if you wish to save changed files.
set confirm
" Use visual bell instead of beeping when doing something wrong
set visualbell
set t_vb=
" Enable use of the mouse for all modes
" If you need this you are a failure to the way of Vim...
set mouse=a
" THE BEST OPTION
set relativenumber
set number
set updatetime=250
let g:gitgutter_escape_grep = 1
" Quickly time out on keycodes, but never time out on mappings
set notimeout ttimeout ttimeoutlen=200
" Indentation options
" Indentation settings for using 4 spaces instead of tabs.
" Do not change 'tabstop' from its default value of 8 with this setup.
set nobackup
set nowritebackup
" Mappings
"
let mapleader = ","
nnoremap ; :
" Fuck you, Ex mode
nnoremap Q <Nop>
nnoremap <F5> :GundoToggle<CR>
nnoremap <Leader>s :SK<CR>
nnoremap <Leader>p :CtrlP<cr>
nnoremap <Leader>. :CtrlPTag<cr>
nnoremap <Leader>b :CtrlPBuffer<cr>
nmap <Leader>w <Plug>(easymotion-w)
nmap <Leader>B <Plug>(easymotion-b)
nmap <Leader>j <Plug>(easymotion-j)
nmap <Leader>n <Plug>(easymotion-j)
nmap <Leader>k <Plug>(easymotion-k)
nmap <Leader>e <Plug>(easymotion-k)
nnoremap <Leader>oc :vsp %<.cpp<CR>
nnoremap <Leader>oC :vsp %<.c<CR>
nnoremap <Leader>oh :vsp %<.h<CR>
nnoremap <Leader>oH :vsp %<.hpp<CR>
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>
nnoremap <Leader>fd :!mkdir -p /tmp/%/<CR>:!clang-format % > /tmp/%/format<CR>:vert diffsplit /tmp/%/format<CR>
" Window movement
nmap <silent> <c-k> :wincmd k<CR>
nmap <silent> <c-j> :wincmd j<CR>
nmap <silent> <c-h> :wincmd h<CR>
nmap <silent> <c-l> :wincmd l<CR>
"setlocal fo+=aw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment