Vim operator to send text from one window to another.
Main use case is sending code to and from the REPL running inside
- Sending lines using motions
- Sending parts of a line using motions
- Sending paragraphs using text objects
- Sending text using visual selections
- Sending commands back - from REPL to script
With your favorite plugin manager. In my case it's vim-plug:
Or manually copy the contents of the plugin folder to your ./vim/plugin/ directory.
- Text can be defined by motions and text objects
- Tries to position the cursor in a convenient place after each call.
- Dot repeatable.
By default it uses the following maps:
<space>lsends to the right window
<space>ksends to the top window
<space>jsends to the bottom window
<space>hsends to the left window
In order to change the above key maps add the following to you vimrc:
let g:sendtowindow_use_defaults=0 nmap L <Plug>SendRight xmap L <Plug>SendRightV nmap H <Plug>SendLeft xmap H <Plug>SendLeftV nmap K <Plug>SendUp xmap K <Plug>SendUpV nmap J <Plug>SendDown xmap J <Plug>SendDownV
This would map all the commands to L, H, K and J respectively.