# Send lines to REPL in Tmux

**URL:** <https://discourse.julialang.org/t/send-lines-to-repl-in-tmux/43772>\
**Category:** Tooling\
**Created:** [July 27, 2020, 4:54pm UTC](https://discourse.julialang.org/t/send-lines-to-repl-in-tmux/43772 "2020-07-27T16:54:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![natema](https://avatars.discourse-cdn.com/v4/letter/n/ba9def/32.png) [@natema](https://discourse.julialang.org/u/natema)\
**Post date:** [July 27, 2020, 4:54pm UTC](https://discourse.julialang.org/t/send-lines-to-repl-in-tmux/43772/1 "2020-07-27T16:54:18Z")

</div>

I’d like to share one way to get the _evaluate line_ behavior of Juno/VSCode in Tmux.

Just a bit of context on why I’m trying to do that: today I found myself with three weeks to go without my laptop and very limited internet connection, but equipped with an Android tablet and a bluetooth keyboard, and I really don’t want to give up playing with Julia.

I normally use VSCode with its convenient _evaluate cell_ shortcut and its Remte SSH extension that allows me to work directly on a remote server.  
To reproduce a bit such setting, I installed Termux on the tablet, with which I can connect via ssh on the server. I can then attach to a Tmux session, where I have a splitted window: Neovim on the left to edit Julia files, and the Julia REPL on the right (see pic).

 ![Screenshot_20200727-183915_Termux](https://global.discourse-cdn.com/julialang/original/3X/1/8/18c13814a01b47e17533643638b3ba548fb05f0b.jpeg)

By adding the lines `bind j pasteb -t right` in my `.tmux.conf` and `set clipboard+=unnamedplus` in my `init.vim` (`.vimrc` for Vim), I can now copy some code in the Neovim pane on the left and send it to the REPL on the right by typing `C+b` and `j`.

---

<div class="post-metadata">

**Author:** ![jbrea](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jbrea/32/3879_2.png) [@jbrea](https://discourse.julialang.org/u/jbrea)\
**Post date:** [July 28, 2020, 8:31am UTC](https://discourse.julialang.org/t/send-lines-to-repl-in-tmux/43772/2 "2020-07-28T08:31:03Z")

</div>

Cool! There is also [vim-slime](https://github.com/jpalardy/vim-slime).

---

<div class="post-metadata">

**Author:** ![natema](https://avatars.discourse-cdn.com/v4/letter/n/ba9def/32.png) [@natema](https://discourse.julialang.org/u/natema)\
**Post date:** [July 28, 2020, 8:33am UTC](https://discourse.julialang.org/t/send-lines-to-repl-in-tmux/43772/3 "2020-07-28T08:33:44Z")

</div>

I updated the last paragraph of the original post, since I misunderstood why my solution was working.

Also, I modified a bit my setting, since I was experiencing a very annoying delay when typing and editing files directly on the server. Now I open tmux locally, with neovim on the left pane to edit files in my local repository, while on the right pane I nest another tmux instance which run julia on the server.
