vim maps – simple commands to do stuff.

2013-08-28 1 min read Vim Tips
Some time back, I was working on some script for logging and I wanted to change the class to function like this: $logger->Debug("Test string"); loggerFunc("Debug", "Test String"); As you can see, this change could be quite frustrating if you have quite a few references. And thus vim comes to rescue. Simple map like :: :map ,mm :s/(.*)$logger->(.*)((.*)).*/1loggerFunc("2",3);/ and then I can do “/$logger->” and then “n” to go to next match. Continue reading