2 ms·
This is actually a solution to a problem I've been looking at recently. My current experimental answer is using the terminal within Neovim, which is kind of a s
by ZeroGravitas 6y ago
This is actually a solution to a problem I've been looking at recently. My current experimental answer is using the terminal within Neovim, which is kind of a superset of this in some ways.
I'm wondering if there's a standard way to invoke vim and just get a selection. Might make a good analog for vim users who don't want to commit to using its terminal.
- climb_stealth 6y agoWith kitty you can map keyboard shortcuts to open the scrollback buffer in an editor. It's super neat and it has pretty much completely replaced using the neovim terminal for me. Below are my mappings for opening the scrollback in the current tab or a new one. What makes the former even better is that after closing it you are back in your regular terminal view. [0] https://sw.kovidgoyal.net/kitty/launch.html https://sw.kovidgoyal.net/kitty/launch.html [1] #: You can pipe the contents of the current screen + history buffer as #: STDIN to an arbitrary program using the ``pipe`` function. For #: example, the following opens the scrollback buffer in less in an #: overlay window:: # map f1 pipe @ansi overlay less +G -R map f1 pipe @text tab /usr/local/bin/nvim '+ normal GA' - map f2 pipe @text overlay /usr/local/bin/nvim '+ normal GA' -
- the_pwner224 6y agoI'm not quite sure whether I understand what you're trying to say, but this should be close (put into vimrc): " bind leader-y and leader-p to clipboard copy/paste noremap <Leader>y "+y noremap <Leader>p "+p (\y or ,y is easier to use than "+y which is the default binding) `ps ux | vim -`, go into visual mode and select the stuff you want, then ,y to copy it to the clipboard. If you don't use a clipboard manager then of course it will be destroyed once you :q out of vim. You could probably add the :q! to the binding to make it automatically exit vim once you 'confirm' (copy) the selection.
- d3nj4l 6y agoIn iTerm, searching for the text selects it, and you can use tab to expand the selection. Not quite vim, but it’s better than many other terminal emulators in that space.