Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What robotvert means is rectangular selection across multiple lines. For example, suppose you have the following text:

  <li class="wrong">first</li>
  <li class="wrong">second</li>
  <li class="wrong">third</li>
You want to change all the instances of "wrong" to "right". So you put the cursor on the first "w", then `Ctrl-V` to enter blockwise visual mode, then `e2j` to select the "wrong" words, then `c` to remove all of them and enter insert mode to type a replacement. The replacement text is then applied to each line separately. Full series of keystrokes (starting with the cursor on the "w" in the first line) if you want to follow along:

  <Ctrl-V>e2jcright<ESC>


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: