3 ms·
I actually use multiple terminals within gvim where I ssh to various hosts and use it to copy terminal scrollback text into the * or + register. This allows me
by u801e 4y ago
I actually use multiple terminals within gvim where I ssh to various hosts and use it to copy terminal scrollback text into the * or + register. This allows me to copy text from any terminal and paste it in Github or pastebin.
I can also copy text from any application and paste it in gvim either in a window or in a terminal running a shell or another program like a nested vim instance and paste the text from the * or + register (depending on how I copied it).
The only issue I have is linebreaks introduced by the terminal if I copy multiple lines of text. In that case, I paste the text in a gvim window, linewise visually highlight the pasted text and use the gJ combination to join all the lines without any intervening whitespace.
- ShamelessC 4y agoYikes! That seems quite brittle if you don’t mind me saying ha.
- u801e 4y agoIt's worked rather well for me for the last couple of years I've been doing it. Why would you consider it brittle? I can use standard vim keybindings to copy text from the terminal to the clipboard: ctrl-w N ?some text shift-v /some other text "+y Back when I used to use screen for a terminal buffer, the process was a bit more convoluted (copying the text to a screen register, writing it out to a file and reading the file into xclip IIRC). The experience just using (g)vim has been a lot better :)
- ShamelessC 4y agoI guess I forgot that you may work exclusively in gvim- is that correct? I use vim and love it, but I must say your workflow seems more in line with emacs .
- u801e 4y agoNot exclusively. I just use it as the terminal multiplexer and as a way to copy text to and from any program running in one of its terminal windows. The only reason I use gvim instead of vim is because the latter isn't compiled with clipboard support (in the fedora package repository).