I'm looking for a way to drop the mouse, forever and always. I got to a very comfortable point, where I don't use it for regular text editing, however, something's bothering me.
When I work with the shell and I want to copy some prev output, I need to highlight + copy using the mouse. That sucks. I know about screen
and 'Ctrl-A [', is cool, but I want to browse the scrollback in Vim, not in Screen's built-in interface.
Is there a way for me to open the current shell output buffer into Vim and copy from it?
Best Answer
From within a Screen window, run
hardcopy -h
dumps the scrollback into a temporary file which you can then open in Vim if you like. If you script this you should use a proper temporary file name:(Or you could just run your shell in Emacs or in Neovim.)