Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 10 days 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 (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-09-03T19:06:52.000Z (about 3 years ago)
- Last Synced: 2024-10-11T18:48:43.738Z (26 days ago)
- Topics: neovim, repl, send-code, vim
- Language: Vim script
- Homepage:
- Size: 16.6 KB
- Stars: 87
- 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
![demo1](https://i.imgur.com/qsB11um.gif)
2. Sending parts of a line using motions
![demo2](https://i.imgur.com/wSzV7nV.gif)
3. Sending paragraphs using text objects
![demo3](https://i.imgur.com/gmJ6mow.gif)
4. Sending text using visual selections
![demo4](https://i.imgur.com/mp6F160.gif)
5. Sending commands back - from REPL to script
![demo5](https://i.imgur.com/jhEcq7g.gif)
## 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 windowIn 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)