Discussion about this post

User's avatar
J.T. Shyman's avatar

This is a great tip IF vim has been compiled with the clipboard option.

You can check this by running 'vim --version' and looking for the clipboard entry

-clipboard = no clipboard support

+clipboard = clipboard support

Unfortunately, some linux distros (I'm talking about YOU AWS) don't have this turned on.

Expand full comment
SergioAraújo's avatar

Another interesting thing I discovered is that you can test, for example, a function you have on the clipboard by doing this:

:@+ Enter

:call FunctionName()

And we can also substitute registers, for example:

Let's say you have a series of lies with numbers, you select these lines an copy to the clipboard, you can then do:

let @a=substitute(@+, 'c-V c-J', '+', 'g')

ic-R=c-R+ Enter

Total = 69.5

NOTE: c-V c-J must be typed

Expand full comment

No posts

Ready for more?