# Toggle or temporarily hide gutter

**URL:** <https://discuss.kakoune.com/t/toggle-or-temporarily-hide-gutter/1406>\
**Category:** Help\
**Created:** [November 30, 2020, 7:58am UTC](https://discuss.kakoune.com/t/toggle-or-temporarily-hide-gutter/1406 "2020-11-30T07:58:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sgraf812](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/sgraf812/32/720_2.png) [@sgraf812](https://discuss.kakoune.com/u/sgraf812)\
**Post date:** [November 30, 2020, 7:58am UTC](https://discuss.kakoune.com/t/toggle-or-temporarily-hide-gutter/1406/1 "2020-11-30T07:58:57Z")

</div>

Hi,

I wonder if it’s possible to hide the gutter temporarily, so that it’s easier to copy and paste part of a file I’m editing from the terminal window.  
Yes, I know there are ways to interact with the system clipboard, but the kakoune instance is running in a tmux window inside an SSH session where I can’t get X forwarding to work.

In vim, I “just” selected the text to paste, then did `:<,>w !cat`, so that it launched `cat` on the selection. Needless to say, I’m hoping for a less convoluted workflow, hence the question. I’m open for suggestions that doesn’t involve hiding the gutter at all, but that seems like the simplest thing I could think of to achieve what I want, right after I failed to find something equivalent to the vim command. If toggling the gutter is too much effort, I’d also be OK with copying the selection to a fresh buffer without a gutter, for example.

---

<div class="post-metadata">

**Author:** ![prion](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/prion/32/404_2.png) [@prion](https://discuss.kakoune.com/u/prion)\
**Post date:** [November 30, 2020, 9:01pm UTC](https://discuss.kakoune.com/t/toggle-or-temporarily-hide-gutter/1406/2 "2020-11-30T21:01:34Z")

</div>

You can temporarily remove the highlighters although this becomes awkward if you have extra things in the gutter, for example linter errors. If you’re using tmux then this user mapping

```auto
map global user y \
  '<a-|> cat > /tmp/kak-cpy && tmux new-window "cat /tmp/kak-cpy; read -n1"<ret>'

```

will put the current selection into a temp file and then open the contents in a new tmux window where you can select and copy them. `read -n1` will keep the window open until you press a key. If you have multiple selections then the default behavior of the `|` key means it will do the operation for each selection. Hope this helps.

---

<div class="post-metadata">

**Author:** ![sgraf812](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/sgraf812/32/720_2.png) [@sgraf812](https://discuss.kakoune.com/u/sgraf812)\
**Post date:** [November 30, 2020, 9:58pm UTC](https://discuss.kakoune.com/t/toggle-or-temporarily-hide-gutter/1406/3 "2020-11-30T21:58:37Z")

</div>

Thanks, that works perfectly!
