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.
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.
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, ' !
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.
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.
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
.
@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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With