Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I use <code>dw....</code> fairly often to delete a series of words without needing to mentally count them first. In that example, <code>5dw</code> is fewer characters, but I think I am about 3ms faster using the dot command to just repeat the <code>delete word</code> over counting them.</p> <p><strong>Edit</strong> I was just now doing some editing and realized there is another situation that I use the dot command a fair amount. I would imagine there is a much simpler way of handling this type of thing in Vim, but the dot command helps out with the following and similar situations. The following is basically an example of "<em>I did something once, now I want to repeat it a few more times.</em>" I was writing a new test (in C) and needed to embed into it a string constant representing an SQL script that I copied from another place. The original multiline (7 line) script was not enclosed in double quotes, so I did this:</p> <ul> <li>Paste the script directly into the code (7 new lines in the file).</li> <li>Position the cursor on the first new line.</li> <li><kbd>I</kbd><kbd>space</kbd><kbd>space</kbd><kbd>space</kbd><kbd>space</kbd><kbd>"</kbd><kbd>esc</kbd> to insert spaces and an opening quote on the current line.</li> <li><kbd>j</kbd><kbd>.</kbd> six times to add opening quote for each additional line. </li> <li>Re-position to the first line of the pasted text.</li> <li><kbd>A</kbd><kbd>\</kbd><kbd>n</kbd><kbd>"</kbd><kbd>esc</kbd> to put a line feed character and closing quote on the current line.</li> <li><kbd>j</kbd><kbd>.</kbd> six times again to put the closing quote on the remaining lines.</li> </ul>
 

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