I'm using neovim v0.8.0 (nightly build) on Arch Linux.
When in my plugins.lua
where I have all my nvim plugins listed, I want to be able to use gX
to open user/repo
in my browser as https://github.com/user/repo
.
Since the plugins are not listed as full URLs, I can't use the normal gx
. I know they're always wrapped in single quotes so I can put them in the clip board with "+yi'
. However, I don't know a way to put the copied text in an cmdline-mode command after that. I've tried "+yi':!$BROWSER https://github.com/<C-S-v>
($BROWSER
is the browser declared in my .profile
) but that doesn't put :!$BROWSER https://github.com/user/repo
in the command to be executed with <CR>
. Instead, nothing happens with I press the bound gX
and only puts !$BROWSER https://github.com/
(plus the next key pressed) in the command area when I press another key after gX
.
How can I put the text object under the cursor into an cmdline-mode command?