8

Why does nano not support simple Ctrl + C into clipboard? I'm using it with gnome-terminator on Linux Mint and just want to copy a few lines from my .bashrc into a text editor. When I mark a text passage, right-clicking on it doesn't work, I need to "double-right-click" on it in order to open a context menu, but there "copy" is grayed out. Ctrl + Shift + C also doesn't work. I already checked "Copy on selection" in the Terminator preferences - but it doesn't work either. This is killing me...it's such a simple functionality.

How can I enable copy & paste? Is there a straightforward way or do I have to change the text editor altogether?

1 Answer 1

10

Terminator doesn't know anything about which text you have marked within nano. In general, the terminal only understands the formatting, but not the meaning, of what it's told to display – when you mark something in nano, it just tells the terminal to show that text in different color. (Similarly, the terminal only knows text that is visible, but not the text that's scrolled away in nano.)

On the other hand, nano doesn't know anything about clipboards. (The clipboard is a feature of X11, the graphics system, so purely-terminal apps cannot access it as easily.) Support for the X11 clipboard could have been added to nano, like it was added to Vim for the "+ register, but they probably chose not to.

So with nano, the only straightforward way is to select text on the terminal using Shift+mouse or Ctrl+Shift+mouse, after which it'll become copyable using Terminator's Ctrl+Shift+C. (Unfortunately this can only copy as much text as fits on one screen.)

Or you could just directly open your ~/.bashrc in whatever text editor you want.

1
  • "So with nano, the only straightforward way is to select text on the terminal using Shift+mouse or Ctrl+Shift+mouse, after which it'll become copyable using Terminator's Ctrl+Shift+C." - Perfect, this works! "Or you could just directly open your ~/.bashrc in whatever text editor you want." - Sometimes one doesn't see the wood for the trees Commented Aug 27, 2020 at 6:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .