Hacker News new | ask | show | jobs
by sophacles 5415 days ago
There are lots of scenarios when this comes up:

- braindead configuaration files. - data files that need some massaging - commenting out code blocks in languages which need a prefix comment delimiter on each line (e.g. python's # or haskell's --) - any time you are doing a series of operations calling functions in a module or from a single class/object and the name changes (e.g. foo.x();, foo.y(); foo.z(); and so on);

1 comments

OK, I can potentially see where vi(m)'s rectangluar selection would be good for editing config files and such, but I'm pretty sure all modern editors have rectangular selection anyway (notepad is not a modern editor). My IDE has the ability to rename a variable and to comment/uncomment a selection which solves your last two problems.
I wasn't defending vim over your editor, just answering the question of when there are valid times to do 10 lines of block change. 2 more that came up for me yesterday:

We changed the data format being sent over JSON now I needed to:

1) make a bunch of int declarations into float declarations, fortunately those tend to bunch up.

2) Change a bunch of getInt calls to getFloat calls, but those are also bunched up together.