Skip to content
Small vim plugin implementing a send-to-window operator.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
plugin added keepjumps to preserve jumplist Mar 4, 2019 fixed readme mistake about left and right keys (thanks to dutch_gecko… Feb 25, 2019


Vim operator to send text from one window to another.

Main use case is sending code to and from the REPL running inside :terminal buffer.


  1. Sending lines using motions


  1. Sending parts of a line using motions


  1. Sending paragraphs using text objects


  1. Sending text using visual selections


  1. Sending commands back - from REPL to script



With your favorite plugin manager. In my case it's vim-plug:

Plug 'KKPMW/vim-sendtowindow'

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>l sends to the right window
  • <space>k sends to the top window
  • <space>j sends to the bottom window
  • <space>h sends 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.

You can’t perform that action at this time.