https://github.com/karoliskoncevicius/vim-sendtowindow
Small vim plugin implementing a send-to-window operator.
https://github.com/karoliskoncevicius/vim-sendtowindow
neovim repl send-code vim
Last synced: over 1 year ago
JSON representation
Small vim plugin implementing a send-to-window operator.
- Host: GitHub
- URL: https://github.com/karoliskoncevicius/vim-sendtowindow
- Owner: karoliskoncevicius
- Created: 2016-09-11T22:04:28.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2021-09-03T19:06:52.000Z (almost 5 years ago)
- Last Synced: 2025-02-27T09:43:47.986Z (over 1 year ago)
- Topics: neovim, repl, send-code, vim
- Language: Vim script
- Homepage:
- Size: 16.6 KB
- Stars: 90
- Watchers: 4
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vim-sendtowindow
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.
## Demo ##
1. Sending lines using motions

2. Sending parts of a line using motions

3. Sending paragraphs using text objects

4. Sending text using visual selections

5. Sending commands back - from REPL to script

## Installation ##
With your favorite plugin manager. In my case it's vim-plug:
`Plug 'karoliskoncevicius/vim-sendtowindow'`
Or manually copy the contents of the **plugin** folder to your
**./vim/plugin/** directory.
## Features ##
* Can send text between any two adjacent vim windows.
* Text can be defined by visual selection, motions and text objects.
* Tries to position the cursor in a convenient place after each call.
* Dot repeatable.
## Maps ##
By default it uses the following maps:
* `l` sends to the right window
* `k` sends to the top window
* `j` sends to the bottom window
* `h` sends to the left window
In order to change the above key maps add the following to your *vimrc*:
let g:sendtowindow_use_defaults=0
And then remap the commands as you see fit.
For example this would map all the commands to L, H, K and J respectively:
nmap L SendRight
xmap L SendRightV
nmap H SendLeft
xmap H SendLeftV
nmap K SendUp
xmap K SendUpV
nmap J SendDown
xmap J SendDownV
## See Also ##
If instead you are looking for a plugin with more features and auto-magic, here is a list to choose from:
- [jpalardy/vim-slime](https://github.com/jpalardy/vim-slime)
- [jgdavey/tslime.vim](https://github.com/jgdavey/tslime.vim)
- [Vigemus/iron.nvim](https://github.com/Vigemus/iron.nvim)
- [kassio/neoterm](https://github.com/kassio/neoterm)
- [benmills/vimux](https://github.com/benmills/vimux)
- [esamattis/slimux](https://github.com/esamattis/slimux)
- [jebaum/vim-tmuxify](https://github.com/jebaum/vim-tmuxify)
- [ervandew/screen](https://github.com/ervandew/screen)
- [sillybun/vim-repl](https://github.com/sillybun/vim-repl)
- [khorser/vim-repl](https://github.com/khorser/vim-repl)
- [rhysd/reply.vim](https://github.com/rhysd/reply.vim)
- [habamax/vim-sendtoterm](https://github.com/habamax/vim-sendtoterm)
- [urbainvaes/vim-ripple](https://github.com/urbainvaes/vim-ripple)
- [axvr/zepl.vim](https://github.com/axvr/zepl.vim)