I’m glad you liked the gemlog.
There are some other Vim commands that might interest you.
I’m not sure about Wayland, but the support for X.org
clipboards within Vim is good.
In Vim, clipboards are known as registers. In X11, clipboards are called selections. And, Vim’s naming convention for registers is double quote " and then the register. For example, "0
or "a
Vim supports both the X11 CLIPBOARD selection with "+
and the PRIMARY selection (Linux middle mouse click) with "*
You can yank directly to those with "+y
or :[range] yank +
This is what I would recommend instead of wl-copy.
I use the following keyboard shortcuts to access the clipboard. You can place these in your vimrc. Just make sure that your Vim shortcuts don’t conflict with any terminal shortcuts. Note that pasting while in Insert mode will respect the 'textwidth'
(hard wrap) and 'autoindent'
options if set.
xmap <F3> "+y " Copy visual selection.
nmap <F3> <Cmd>%yank+<CR> " Copy the whole document while in Normal mode.
nmap <F4> "+gP " Paste to the left of the cursor in Normal mode.
imap <F4> <C-R>+ " Type the contents of the clipboard while in Insert mode.
xmap <F4> "+gP " Replace the visual selection with the clipboard contents.
! wl-copy
is a filter in Vim. That is why the visual selection was deleted. If you just want to send a range to an external program then you can use :write_c For example, :'<,'> write !wl-copy
As a further aside, I use Lagrange to browse Geminispace. And Lagrange offers two subscription mechanisms. If you browse to my /gemlog/ and right click on a blank area of the page, you can choose either Subscribe to Page … which populates the
sidebar, or Bookmark Page … which has a further ‘Use as bookmark source’ toggle in its pop-up menu. This second option creates a kind of table of contents for my gemlogs in the
sidebar. And Lagrange keeps this list in sync with my Gemini capsule. I use this feature as a quick way to refer to my notes. And these live bookmarks are a great feature of Gemini/Lagrange.