What a Great Day

October 27, 2006

VIM tricks

Filed under: great — f3lheadhunter @ 10:50 am

to put cwd in file:

:let @a=getcwd()
p

to put matches in file:

:g/something/y A
p

:vimgrep something **/*.php
look in all the php files, in all dirs and subdirs, for “something”, and go to the file (use :cn to move on to the next match, if any)

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: