So...I'm using Vim (in the terminal, not any sort of other gui; whenever Vim is used by itself, assume it's terminal vim).
Vim is decent, I actually don't find the learning curve to be too bad. I'm a bit less efficient than I would be in a normal text editor, though, primarily due to the act of switching to and from normal mode.
But there is one thing about vim that drives the nails in the coffin for me. Normally, when I press Ctrl+Shift+C in my terminal, it copies the text that I've highlighted to the window manager clipboard, and I can then paste that. Ctrl+C and Ctrl+V (or their variants) work absolutely fine in every application that I've used on my system.
With Vim, I can press Ctrl+Shfit+V and it will paste the data that I have in my clipboard. But for the life of me, Vim does not copy to the global clipboard. I have tried...
- Ctrl+Shift+C with visual mode
- using both
"*y
and"+y
(or another copy command) - using
set clipboard=unnamed
andset clipboard=unnamedplus
- installing gvim for "clipboard support" (for terminal vim) and repeating the other steps.
Vim just...refuses to copy to the clipboard.
But I had a thought. I don't need Vim copy to the clipboard itself. I just need it to stop blocking / intercepting the terminal's behavior for Ctrl+Shift+C in visual mode. But I'm still new to Vim, and I have absolutely no idea how one would accomplish this. All of my attempts to search for something this specific are rather vapid. This is my question to this form: is there a way to get Vim to allow the terminal emulator (Alacritty) to copy to it's clipboard using Ctrl+Shift+C? If someone with more Vim experience than myself could give me a pointer, I would really appreciate it.
My system, for reference, is Arch Linux using the Sway window manager with the Alacritty terminal emulator. I've seen various things about installing a clipboard manager for Sway, because default Sway doesn't hold the clipboard data if you exit the program you've copied the text from. However, I've never really had a problem with this; even when I quit a program completely, the data is still there. The default clipboard works absolutely fine for me and I don't necessarily want to install and configure a clipboard manager just to get vim to maybe work, unless it's the only option. This doesn't seem like the issue anyways.
Also, if it helps, the gvim standalone application does support copying to the clipboard, but standard terminal Vim does not. If possible, I would really like to use a terminal text editor. But I guess I'll just use the gvim app if nothing can be done.
apt-get
/zypper
/pacman
/ … /dnf install neovim
, followed bynvim
would allow you to test whether the slightly reworked buffer architecture of the neovim fork works. Might help us know what to look into. – Marcus Müller Feb 07 '24 at 22:34