Created
September 24, 2013 07:56
-
-
Save mikeys/6681651 to your computer and use it in GitHub Desktop.
This file contains 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
set background=dark | |
" Disable mouse in vim | |
if has('mouse') | |
set mouse-=a | |
endif | |
" Beautify JSON (requires npm install jsonlint) | |
vnoremap <leader>jt :!jsonlint<CR> | |
nnoremap <leader>jt :%!jsonlint<CR> | |
" Dynamically set resize window keys to act intuitively | |
au! WinEnter * call SetWinAdjust() | |
fun! SetWinAdjust() | |
if winnr() == winnr('$') | |
nnoremap <C-w>> :vertical res -10<CR> | |
nnoremap <C-w>< :vertical res +10<CR> | |
else | |
nnoremap <C-w>> :vertical res +10<CR> | |
nnoremap <C-w>< :vertical res -10<CR> | |
endif | |
endfun | |
" Delete current buffer without closing window | |
nnoremap <leader>d :b#<bar>bd#<CR> | |
"""""""""""""""""""" | |
" Tmux Integration " | |
"""""""""""""""""""" | |
" Prompt for a command to run | |
nnoremap <leader>rp :VimuxPromptCommand<CR> | |
" Run last command executed by VimuxRunCommand | |
nnoremap <leader>rl :VimuxRunLastCommand<CR> | |
" Close tmux runner panes in current window | |
nnoremap <leader>rx :VimuxCloseRunner<CR> | |
" Shortcuts for running unit tests (vimux-ruby-test) | |
map <leader>t :RunAllRubyTests<CR> | |
map <leader>T :RunRubyFocusedContext<CR> | |
""""""""""""""""" | |
" Gist Settings " | |
""""""""""""""""" | |
let g:gist_open_browser_after_post=1 | |
"""""""""""""""""""""""" | |
" NERDComment Settings " | |
"""""""""""""""""""""""" | |
nnoremap <leader>/ :call NERDComment(0, "toggle")<cr> | |
vnoremap <leader>/ :call NERDComment(0, "toggle")<cr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment