Skip to content

Instantly share code, notes, and snippets.

@mikeys
Created September 24, 2013 07:56
Show Gist options
  • Save mikeys/6681651 to your computer and use it in GitHub Desktop.
Save mikeys/6681651 to your computer and use it in GitHub Desktop.
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