01 Feb '14, 7am

“Vim Macros and You” #vim #greatread

Josh Clayton January 06, 2012 vim Ever get the urge to update a ton of files? I know I do. For example, I recently changed multiple hundred coffeescript files from the syntax of MyGreatClass = Backbone.Model.extend( defaults: awesome: true ) to class @MyGreatClass extends Backbone.Model defaults: awesome: true How long did it take me? A couple of minutes. Here's how. Ack (or Grep) I like ack . To find all the files I need to edit, I'd write something like this: ack '^[^\s].*\=.*\.extend\($' app/assets/javascripts -l This finds everything that doesn't start with a space, has an equals sign, and has .extend( at the end of the line. Opening a list of files in vim After looking over the results of ack and ensuring that everything that matched is what I want to edit, I'll open those files in vim. vim $(ack '^[^\s].*\=.*\.extend\($' app/assets/javascripts -l) Vim Macros If you'v...

Full article: http://robots.thoughtbot.com/vim-macros-and-you

Tweets

How To Edit An Existing Vim Macro:

robots.thoughtbot.com 31 Jan '14, 7pm

You've just written an awesome vim macro and stopped recording. However, when you try an run the macro you realize that yo...

If you’re a VIM user, read this post:

robots.thoughtbot.com 01 Feb '14, 9pm

thoughtbot is filled with vim and vigor December 19, 2008 rails ruby vim Slowly over the past year thoughtbot has turned f...

Nice collection of Vim articles: #programming

robots.thoughtbot.com 01 Feb '14, 4am

GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS