I know many ways to copy things:
yiw
= yank in current word
yaw
= yank all word (includes a trailing space)
yy
= yank the current line
3yy
= yank three lines starting at the current one
yap
= yank all paragraph (includes trailing newline)
I can also delete or change a single character:
x
= delete the character under the cursor
r
= replace the character under the cursor
But how in the world do you simply copy a single character under the cursor?
My motivation is that I'm programming in Perl 6 and some of the operators are Unicode characters. Right now I'm using tadzik's Perl 6 Config::INI code as a starting point for a custom parser, for example, and I would have liked to have copied just that one French quote character (a hyper operator) from this line:
my %hash = $<sections>».ast;
I could use the two character "Texas" version of the hyper operator >>
, but I thought that >»
looked better and less ambiguous than >>>
:
my %hash = $<sections>>>.ast;
yl
ytX
("y
ankt
ilX
") seems to work whenX
is the character just to the right.conceal
feature?f
"f ind" command from the start; took me a good while to stumble ont
("t ill") but until your comment i never thought about it meaning "t ill" (or I guess it could also mean "t o"). (We differ on our spelling of till but that's here nor there.)