S
S
sudo rm -rf /2018-05-31 12:55:59
vim
sudo rm -rf /, 2018-05-31 12:55:59

How to fix register * in vim?

Decided to put debian for the sake of interest. After installation, I installed vim, but some registers do not work in it.
For example, here I am trying to paste text copied from outside into vim using "*p
(after entering "*the command is reset and precognized as a separate command)
5b0fc61c9a604030856197.gif
I tried to google the case, but found only 3 questions on some left resources, and even those without answers.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
jcmvbkbc, 2018-05-31
@jcmvbkbc

From :help registers:

8. Selection and drop registers "*, "+ and "~
Use these registers for storing and retrieving the selected text for the GUI.
See quotestar and quoteplus. When the clipboard is not available or not
working, the unnamed register is used instead. For Unix systems the clipboard
is only available when the +xterm_clipboard feature is present.{not in Vi}
On debian 9 without vim-gui-common:
$ vim --version | grep -o .xterm_clipboard
-xterm_clipboard

so it shouldn't work. After installing vim-gui-common:
$ vim --version | grep -o .xterm_clipboard
+xterm_clipboard

S
sudo rm -rf /, 2018-05-31
@MaxLevs

In short, I installed the package vim-gui-commonthat installs gVim, and everything also fell into place in the console vim.
But I'm still interested in how the registers work *and +what exactly the above package fixes, but this is already offtopic.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question