Hacker News new | ask | show | jobs
by Keyneston 4828 days ago
I'm probably being very defensive but I use macros for this.

qa$i odd^[jjq

and then '4@a' to run it on all the lines. In a simple case like this is it a bit more complicated than something like multiword editing but I've used this technique in cases that are far more complex then what from my understanding, multiline editing can handle.

For example I turned a spreadsheet of data into a complicated dhcpd.conf file using a couple macros.

2 comments

Oh I agree that macros are a daily use thing for me and I haven't used sublimetext more than a handful of times; I was merely playing devils advocate to see if vim had an interesting feature I was unaware of that I could use in my day to day editing.
For more complex tasks like data format conversion, It's probably easier to write some small script and refine a couple of times to resolve possible conversion errors.