History
Article Edit this page Discussion

Fast jump to next PHP variable on current line

From Vim Tips Wiki

Jump to: navigation, search

Tip 1541 Previous Next Created: December 10, 2007 Complexity: basic Author: V silent Version: 7.0


Put these lines in your vimrc:

noremap L f$
noremap H F$

Then press L to jump to the next $variable on the current line.

Press H to jump to the previous $variable.

[edit] Comments

 TO DO 

  • The tip should start with an example so the problem can be understood by general readers.
  • The first solution offered should be the standard Vim technique: Press f$ for the first jump, and ; or , for any subsequent jumps.
  • Then offer the mappings as a proposed improvement.
  • Note that L and H are already mapped. L will take you to the last line in the window, H to the first: :help L, :help H.
  • For the mapping, you may want to use the ctrl or meta (alt) key, or some key sequence (<Leader> may be useful - see :help mapleader).

Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto Wiki
Doctor Who
Legend of Zelda Wiki
Terminator Wiki
Everquest II Wiki
Mystery Science Theater 3000
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions
Send this article to a friend
"Fast jump to next PHP variable on current line"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation