Any Vim users out there?

weeeeeeee More vim tutorials!! http://vimcasts.org/

This one doesn’t really do beginner stuff like Derek Wyatt’s tutorials, but if you’ve got a hang on vim, this guy really knows some awesome ways to use it.

Most useful not-often-known key: “*”

Most useful not-often-known ex command: “normal”

For the latter, consider a case like this: you have a file with 100 slightly varying definitions but all containing, oh, the string “shadername” and you want to do something to all of them that you can wrap-up in a key macro, say “@a

So you go to the first instance of “shadername,” press “qa” to start recording into buffer “a,” do whatever, then hit “q” to stop recording.

Now, you could search for the next 99 instances of “shadername” and press “@a” for each and every one of them. Or…

:.,$g/shadername/normal @a

and you’re done

1 Like