grizzleKat456
grizzleKat456

Reputation: 127

Copy in VIM, pasting to Word

I am copying specific lines in VIM using, 92GV145Gy, but I am then unable to paste into word. The correct lines are yanked. I have also tried copying the entire vim file and am still unable to paste. Is there a specific way to do this?

Upvotes: 1

Views: 428

Answers (1)

Mitchell P
Mitchell P

Reputation: 308

The yank (y) command only will yank to Vim's default register ". In order to copy to the system clipboard, you'll need to yank to either register * or + depending on what OS you are running. So for your example, it would be 92GV145G"*y or 92GV145G"+y.

And if that doesn't work, you'll need to verify whether the Vim you are using had clipboard capability compiled into it, or if you're using neovim, if a clipboard provider is properly configured (which you can check with :checkhealth).

Also view: Difference between “* and ”+ registers in +clipboard VIM?

Upvotes: 1

Related Questions