Created
May 2, 2018 03:13
-
-
Save michaeljkchoi/48005ea7d79a31510c966e888e98bdcf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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