Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim: What does a double quotation mark mean at the beginning of a command?

Tags:

vim

For example when I write a macro command to editor from register r with

"rp

What does that quotation mean?

I can't seem to find the answer anywhere.

like image 279
Jon49 Avatar asked Jan 04 '14 14:01

Jon49


People also ask

What does the double quote symbol mean?

The same rule applies to titles and words used in a special sense or for emphasis. Use double quotation marks (“”) around a direct quote. A direct quote is a word- for-word report of what someone else said or wrote. You use the exact words and punctuation of the original.

What do double quotes mean in Linux?

3.1.2.3 Double Quotes Enclosing characters in double quotes (' " ') preserves the literal value of all characters within the quotes, with the exception of ' $ ', ' ` ', ' \ ', and, when history expansion is enabled, ' !

What is the difference between single quotes and double quotes for Shell?

Double quotes are similar to single quotes except that it allows the shell to interpret dollar sign ($), backtick(`), backslash(\) and exclamation mark(!). The characters have special meaning when used with double quotes, and before display, they are evaluated.

What is the function of double quotation marks when using a string?

Quotation marks are used to specify a literal string. You can enclose a string in single quotation marks ( ' ) or double quotation marks ( " ). Quotation marks are also used to create a here-string. A here-string is a single-quoted or double-quoted string in which quotation marks are interpreted literally.


2 Answers

The double quote indicates that the next character is the name of a register. So the command "rp means: "from the named register r, paste text."


Sort of related, a single quote indicates that the next character is an address. So, for example if you navigate to some line in the file and press ma, you've "marked" the address as a. You can then refer to that line with 'a. The command 'a will jump to the line marked as a.

like image 98
Adam Liss Avatar answered Oct 16 '22 21:10

Adam Liss


@AdamLiss already explained the meaning of "rp, but I think you can learn more from Vim online manual.

For the explanation of p, you can run :h p in Vim; for the introduction of ["x], you can run Vim command :h [quotex]. And for general help of Vim, just run :h.

like image 3
Lee Duhem Avatar answered Oct 16 '22 20:10

Lee Duhem