Shlomi Fish ([info]shlomif) wrote,
@ 2007-02-20 20:37:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Current location:Home
Current mood:accomplished
Current music:Yehud Poliker - Jacob's Ladder
Entry tags:block, commands, editing, editors, grail, holy, motion, paragraph, selection, text, tip, vim

Vim Tip: Text Object Selection

The Vim text editor has a set of selection commands for selecting various parts of the text while being inside them. Some of them are very useful - here are some examples:

  1. To indent the inside of a block (after a copy and paste for example) use >i} or <i}. It beats writing >% and then doing <<%<<
  2. To change a string use ci".
  3. To delete a block use da}.
  4. To copy a paragraph use yap.

Etc. Oh and try typing :he holy-grail in Vim (this tip courtesy of LeoNerd from Freenode who found it).




Create an Account
Forgot your login?
Login w/ OpenID
English • Español • Deutsch • Русский…