User login

code editor

Indent lines in Vim

To indent a set of eight lines in vim, from the first one, in normal (esc) mode:


To indent a curly braces block, go to a curly brace and:


To mark and indent (using 'm' as the marking letter, the first m is the marking command):

Enter mm at the top of block to indent, go down to the end of what needs to be indented, and type >'m

Find the function definition of the current function or find uses of a given function

'gd' doesn't do anything for me (recommended here: )

The asterisk works great though!

  • Read the string under the cursor and go to the next place it appears. (For instance, if your cursor was somewhere on the word "bob," the cursor would move to the next occurance of "bob" in your file.)

Same as above, except it moves the cursor to the previous occurrence.

Vim as a PHP IDE

(domain not renewed as of 2010 Nov. 4 - )

Once it's set up right, you can use :make % to check your PHP syntax before loading the code in a browser.

See also:

Syndicate content