# How to attach the result of Julia REPL? (using vim & tmux)

**URL:** <https://discourse.julialang.org/t/how-to-attach-the-result-of-julia-repl-using-vim-tmux/47466>\
**Category:** New to Julia\
**Tags:** question, editors\
**Created:** [September 29, 2020, 5:05am UTC](https://discourse.julialang.org/t/how-to-attach-the-result-of-julia-repl-using-vim-tmux/47466 "2020-09-29T05:05:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![iHany](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ihany/32/18151_2.png) [@iHany](https://discourse.julialang.org/u/iHany)\
**Post date:** [September 29, 2020, 5:05am UTC](https://discourse.julialang.org/t/how-to-attach-the-result-of-julia-repl-using-vim-tmux/47466/1 "2020-09-29T05:05:35Z")

</div>

Hi, I’m a beginner of Julia.

I always don’t find out how to attach the result of Julia REPL.

How can I do it?

Note: I’m using vim & tmux.

EDIT: it’s a matter of my terminal setup, see [this](https://discourse.julialang.org/t/how-to-attach-the-result-of-julia-repl-using-vim-tmux/47466/8).

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [September 29, 2020, 5:11am UTC](https://discourse.julialang.org/t/how-to-attach-the-result-of-julia-repl-using-vim-tmux/47466/2 "2020-09-29T05:11:43Z")

</div>

Welcome!

What do you want to attach it to? Do you mean copying the output into a Discourse post? Maybe this post will help you:

> [@Please read: make it easier to help you](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757):
>
> Welcome to the Julia Discourse! We are enthusiastic about helping Julia programmers, both beginner and experienced. This public service announcement (PSA) outlines best practices when asking for help. Following these points makes it easier for us to help you and more likely you’ll get a prompt, useful answer. Keywords are highlighted to make it easier to refer to specific points. Choose a descriptive title that captures the key part of your question, eg “plots with multiple axes” instead of …

---

<div class="post-metadata">

**Author:** ![iHany](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ihany/32/18151_2.png) [@iHany](https://discourse.julialang.org/u/iHany)\
**Post date:** [September 29, 2020, 6:32am UTC](https://discourse.julialang.org/t/how-to-attach-the-result-of-julia-repl-using-vim-tmux/47466/3 "2020-09-29T06:32:00Z")

</div>

After you suggestion, I read the [post](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757), but it says “do not copy and paste REPL output and upload your code instead”.

So, there’s no easy way to copy and paste REPL output…?

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [September 29, 2020, 6:35am UTC](https://discourse.julialang.org/t/how-to-attach-the-result-of-julia-repl-using-vim-tmux/47466/4 "2020-09-29T06:35:04Z")

</div>

In general I guess this depends on the terminal you’re using - I believe most terminals allow you to select text in the REPL with the mouse, and then copy using Ctrl+C, but this doesn’t necessarily apply to all terminals.

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [September 29, 2020, 6:38am UTC](https://discourse.julialang.org/t/how-to-attach-the-result-of-julia-repl-using-vim-tmux/47466/5 "2020-09-29T06:38:59Z")

</div>

If you want to copy and paste, just copy and paste. It’s as easy as can be. But don’t take _screenshots_ of your code, unless there’s good reason. Paste the code (text) an wrap it in triple backticks, as explained in the post.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [September 29, 2020, 6:59am UTC](https://discourse.julialang.org/t/how-to-attach-the-result-of-julia-repl-using-vim-tmux/47466/6 "2020-09-29T06:59:51Z")

</div>

> [@iHany](#):
>
> I read the [post](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757), but it says “do not copy and paste REPL output and upload your code instead”.

No, it doesn’t. Please do not misrepresent what it says — quotation marks imply that you are quoting verbatim, but the actual text is

> Include **code instead of REPL output** , except when the latter is relevant.

If you are using Vim, presumably you are running the REPL in a terminal, so just copy and paste that between triple tickmarks.

---

<div class="post-metadata">

**Author:** ![iHany](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ihany/32/18151_2.png) [@iHany](https://discourse.julialang.org/u/iHany)\
**Post date:** [September 29, 2020, 7:04am UTC](https://discourse.julialang.org/t/how-to-attach-the-result-of-julia-repl-using-vim-tmux/47466/7 "2020-09-29T07:04:37Z")

</div>

@nilshg Ok, I see. It actually works for me (in tmux), makes me embarrassed 😓 .

@DNF got it. Thanks!

@Tamas_Papp Yes, it would have been better if I just quoted it. Sorry for my bad interpretation 🙂

---

<div class="post-metadata">

**Author:** ![iHany](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ihany/32/18151_2.png) [@iHany](https://discourse.julialang.org/u/iHany)\
**Post date:** [September 29, 2020, 7:21am UTC](https://discourse.julialang.org/t/how-to-attach-the-result-of-julia-repl-using-vim-tmux/47466/8 "2020-09-29T07:21:52Z")

</div>

For someone who would need this feature in the future while using vim and tmux:  
set vi mode in tmux.

In summary, it’s not a matter of Julia REPL but your terminal as pointed out above.
