Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Explain "+gP command from gvim menu

Tags:

vim

In Gvim, the command for paste in the menu is "+gP

My understanding is that " indicates I'll be pasting from a specific register, + indicates the register (some sort of global shared register? the clipboard?), and P is the paste command.

However, this leaves the g unexplained. What does it do?

like image 655
Sam Mussmann Avatar asked Nov 09 '12 23:11

Sam Mussmann


People also ask

What is G command in Vim?

The g command first scans all lines in range and marks those that match pattern . It then iterates over the marked lines and executes cmd . (See multi-repeat in vim's documentation). If cmd happens to delete a marked line, the mark disappears.

How do we jump to the start of a word Vim?

Press 0 to go to the beginning of a line, or ^ to go to the first non-blank character in a line. Save this answer.

How do we cut a character vim?

Cutting in VimUse the d key when performing this operation. If you are using Vim in normal mode, you can easily cut or delete text using the d command.

What does R do in Vim?

r (replace) never enters insert mode at all. Instead, it expects another character, which it will then use to replace the character currently under the cursor.


1 Answers

See :help gP:

Just like "P", but leave the cursor just after the new text. {not in Vi}

like image 150
romainl Avatar answered Sep 19 '22 13:09

romainl