Skip to content

Instantly share code, notes, and snippets.

@littlebenlittle
Created January 6, 2019 19:44
Show Gist options
  • Save littlebenlittle/e90694386124928f18a407fcb3269ee8 to your computer and use it in GitHub Desktop.
Save littlebenlittle/e90694386124928f18a407fcb3269ee8 to your computer and use it in GitHub Desktop.
" set the active tmux pane for the current buffer
nnoremap <leader>0 :let b:activepane = 0<cr>
nnoremap <leader>1 :let b:activepane = 1<cr>
nnoremap <leader>2 :let b:activepane = 2<cr>
nnoremap <leader>3 :let b:activepane = 3<cr>
nnoremap <leader>4 :let b:activepane = 4<cr>
" send the current line to the active pane
nnoremap <leader><cr> :silent :execute ':.w !cat \| (read cmd; tmux send-keys -t' b:activepane ' "$cmd" enter)'<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment