Vim Tips Wiki
(→‎Previously featured tips: archive February)
Line 9: Line 9:
 
==Previously featured tips==
 
==Previously featured tips==
 
This is an archive of the ''Featured tip'' section on the [[Main Page]]. We won't feature these tips again – however, they remain great tips!
 
This is an archive of the ''Featured tip'' section on the [[Main Page]]. We won't feature these tips again – however, they remain great tips!
  +
  +
===[[VimTip171|March 2009]]===
  +
You can search by typing <tt>/</tt> followed by the search pattern, or by pressing <tt>*</tt> to [[VimTip1|search for the current word]].
  +
  +
With [[VimTip171|our featured tip]], you can also select some text, then press <tt>*</tt> to search for the next occurrence of the text. The selection can be a few characters, or a few lines. Whitespace in the selection matches any whitespace when searching (searches will find words separated by any combination of spaces, tabs and line breaks).
   
 
===[[VimTip1577|February 2009]]===
 
===[[VimTip1577|February 2009]]===

Revision as of 09:49, 1 April 2009

  • Please discuss proposals for new Featured Tips on the talk page.
  • The Main Page highlights the current featured tip.
  • Add comments on the current featured tip to the comments section on the current tip page.

Now THAT's a Good Tip!

While most of the tips on this wiki are very helpful, every now and then, you'll stumble on a tip that shines above all the rest. Such a tip is a tip that changes the way you do a basic task, a tip that you try immediately and then use all the time, a tip that makes Vim integrate SO much better with your setup, or a tip that you just wish somebody gave to you when you started using Vim. We here on the Vim Tips Wiki recognize this, and therefore will -- about once a month -- feature a new tip that we feel is among the best of the best. So keep an eye on this page for life-altering (or at least mildly interesting) tips to add to your repertoire.

Previously featured tips

This is an archive of the Featured tip section on the Main Page. We won't feature these tips again – however, they remain great tips!

March 2009

You can search by typing / followed by the search pattern, or by pressing * to search for the current word.

With our featured tip, you can also select some text, then press * to search for the next occurrence of the text. The selection can be a few characters, or a few lines. Whitespace in the selection matches any whitespace when searching (searches will find words separated by any combination of spaces, tabs and line breaks).

February 2009

Do you ever do some edits in one place, knowing that you're going to have to repeat those edits in several other places? Naturally Vim allows complex repeats by recording keys into a register. :help complex-repeat

Now you can try the magic of a recursive repeat to automatically apply the commands you have recorded to many lines at a time. By following our technique for recording to a register, and finishing by invoking the register, you can apply a macro to every line in a file with no counts necessary!

January 2009

Sometimes it's useful to highlight several patterns in different colors. For example, you may be studying how three variables are used, and you would like to see each displayed with a different background color.

It's easy to highlight multiple words using our amazing highlighting script. You can press a key to highlight visually-selected text, or the current word, or you can enter a command to highlight any pattern. Searching for the next highlight is also easy.

You can have different sets of highlighting in different windows, or can copy highlighting from one window to another. If you really like your current highlight patterns, you can save them for use in the future.

2008

Featured tips from 2008 are archived here.

Comments