Vim

From Attie's Wiki
(Difference between revisions)
Jump to: navigation, search
m (Registers)
m
Line 4: Line 4:
 
[http://stackoverflow.com/a/1498026 Source]
 
[http://stackoverflow.com/a/1498026 Source]
  
Registers in Vim let you run actions or commands on text stored within them. To access a register, you type "a before a command, where a is the name of a register. If you want to copy the current line into register k, you can type
+
Registers in Vim let you run actions or commands on text stored within them. To access a register, you type <code>"&lt;''a''&gt;</code> before a command, where <code>&lt;''a''&gt;</code> is the name of a register. If you want to copy the current line into register k, you can type
 
<source lang="text">
 
<source lang="text">
 
"kyy
 
"kyy

Revision as of 13:40, 10 December 2014

Configuration: vimrc

Registers

Source

Registers in Vim let you run actions or commands on text stored within them. To access a register, you type "<a> before a command, where <a> is the name of a register. If you want to copy the current line into register k, you can type

"kyy

Or you can append to a register by using a capital letter

"Kyy

You can then move through the document and paste it elsewhere using

"kp

To access all currently defined registers type

:reg
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox