Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kidpixo
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kidpixo/770d8f44b47fbafcf049 to your computer and use it in GitHub Desktop.
Save kidpixo/770d8f44b47fbafcf049 to your computer and use it in GitHub Desktop.
This is my IDL (from exelis http://www.exelisvis.com/ProductsServices/IDL.aspx). Put it in ~/.vim/ftplugin/idllang.vim and it will be loaded for idlang (*.pro) files. It implement send visually selected text from one panel to the other (names are hardcoded, it is on the todo list). This is my workaround to use a code interpreter having state mem…
"mostly cosmetic make-up
set foldnestmax=1
set foldmethod=indent
set foldlevel=99
function! YankToTmuxPane()
" silently put the selected text in the tmux buffer 0
silent '<,'>w !tmux load-buffer -b 0 -
" put the tmux buffer 0 in the session_name:window_name.0
" assuming we are in the window 1, see pic http://bit.ly/1stWOe2
call system("tmux paste-buffer -t session_name:window_name.0 &> /dev/null")
endfunction
" add CTRL-S binding in Visual mode
vnoremap <c-s> :call YankToTmuxPane()<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment