GNOME Bugzilla – Bug 672264
Copy mode (screen-like)
Last modified: 2014-04-12 15:35:07 UTC
I'd like to have something like screen's "copy mode" in gnome-terminal. What is this? You press some key, then you "enter" copy mode. You can move around the scrollback buffer as if it was a file in a text editor. You can: * move with: the arrows, ^arrows, home, end, ^home, ^end * search forward / backward / search again like you do in less (/, ?, n, N) * select with shift + arrows, etc. * copy with ^Ins / ^C. When you copy, you "leave" copy mode, and are taken back to the command prompt, where you can paste.
I tried to implement a minimal version of this with the methods vte already provides (ruby bindings). I can: * listen to key events using Gtk.key_snooper_install() * change the cursor shape (to signal that you have entered/left copy mode) * get parts of the scrollback buffer with get_text_range() What is missing: * a way to move the cursor around -- something like set_cursor_position(x, y) * a way to "select" programmatically. Maybe everything I need from vte is a method to modify the attributes of a specific position, e.g. set_attr(x, y, attr) and the rest can be managed/implemented by the application.
*** This bug has been marked as a duplicate of bug 78291 ***