Skip to content

Instantly share code, notes, and snippets.

@michaeljkchoi
Created May 2, 2018 03:13
Show Gist options
  • Save michaeljkchoi/48005ea7d79a31510c966e888e98bdcf to your computer and use it in GitHub Desktop.
Save michaeljkchoi/48005ea7d79a31510c966e888e98bdcf to your computer and use it in GitHub Desktop.
syntax enable
set background=dark
colorscheme solarized
filetype on
filetype plugin indent on
set relativenumber
set number
set backspace=2
set tabstop=2
set shiftwidth=2
set expandtab
set viminfo='100,<100,s10,h
set colorcolumn=80
set ai
set si
map j gj
map k gk
set nobackup
set nowb
set noswapfile
autocmd BufWritePre * StripWhitespace
" The Silver Searcher
if executable('ag')
" Use ag over grep
set grepprg=ag\ --nogroup\ --nocolor
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
" ag is fast enough that CtrlP doesn't need to cache
let g:ctrlp_use_caching = 0
" bind K to grep word under cursor
nnoremap K :grep! "\b<C-R><C-W>\b"<CR>:cw<CR>
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment