Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You are talking about text selecting and copying, I think that you should give a look to the <a href="http://www.vim.org/htmldoc/visual.html" rel="nofollow noreferrer">Vim Visual Mode</a>.</p> <p>In the visual mode, you are able to select text using Vim commands, then you can do whatever you want with the selection.</p> <p>Consider the following common scenarios:</p> <p>You need to select to the next matching parenthesis.</p> <p>You could do:</p> <ul> <li><strong><code>v%</code></strong> if the cursor is on the starting/ending parenthesis</li> <li><strong><code>vib</code></strong> if the cursor is inside the parenthesis block</li> </ul> <p><img src="https://dl.dropbox.com/u/35146/stackoverflow/Vim/parens.gif" /></p> <p>You want to select text between quotes:</p> <ul> <li><strong>vi"</strong> for double quotes </li> <li><strong>vi'</strong> for single quotes</li> </ul> <p><img src="https://dl.dropbox.com/u/35146/stackoverflow/Vim/quotes.gif" /></p> <p>You want to select a curly brace block (very common on C-style languages):</p> <ul> <li><strong><code>viB</code></strong></li> <li><strong><code>vi{</code></strong></li> </ul> <p><img src="https://dl.dropbox.com/u/35146/stackoverflow/Vim/viB.gif" /></p> <p>You want to select the entire file:</p> <ul> <li><strong><code>ggVG</code></strong> </li> </ul> <p><a href="http://vimdoc.sourceforge.net/htmldoc/visual.html#CTRL-V" rel="nofollow noreferrer">Visual block selection</a> is another really useful feature, it allows you to select a rectangular area of text, you just have to press <kbd>Ctrl</kbd>-<kbd>V</kbd> to start it, and then select the text block you want and perform any type of operation such as yank, delete, paste, edit, etc. It's great to edit <em>column oriented</em> text.</p> <p><img src="https://dl.dropbox.com/u/35146/stackoverflow/Vim/blockselection.gif" /></p>
 

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