Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is interesting. The distinguishing characteristic of CTRL-R CTRL-P (insert literally and fix indent) is not used; indent is not involved, and the literal insert also happens with CTRL-R CTRL-R (but that doesn't work, nor are any special chars like <code>&lt;BS&gt;</code> involved here).</p> <p>Instead of CTRL-R CTRL-P, this also works with CTRL-R CTRL-O; the only commonality (in the help) is that both have:</p> <blockquote> <p>Does not replace characters!</p> </blockquote> <p>How this relates to repeat via <code>.</code>, I don't know (you'd have to dig through the source code or ask on the <a href="http://www.vim.org/community.php" rel="nofollow">vim_dev mailing list</a>). Basically, it causes the <code>&lt;C-R&gt;&lt;C-O&gt;</code> command itself to go into the <code>.</code> register, instead of the literal text which was in the register when you gave the command. This means that when you repeat the operation with <code>.</code>, you'll get whatever's in the specified register at the time of the repeat, instead of just inserting the same literal text again.</p> <p>This turns Vim from repeating the command as</p> <p><em>replace the current word with <code>(</code>, followed by <code>one</code>, followed by <code>)</code></em><br> to<br> <em>replace the current word with <code>(</code>, insert the register contents of the default register, insert <code>)</code></em>.</p> <p>I.e. the first repeat stores the <em>result</em> of the register insertion, whereas the second actually memorizes the <em>action</em> of the register insertion.</p> <p>You'll see the effect when you list the <code>".</code> register contents via <code>:reg .</code>, too.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload