Hacker News new | past | comments | ask | show | jobs | submit login

Vim gives the ability to refactor large amounts of code rapidly. This doesn't make it so your typing speed is significantly faster, but it removes obstacles to refactoring large amounts of code which means that as a developer you will have more choices available to tackling some problems.

This can only really be shown via examples. Let's say, a lazy person has created a 3000 line file containing the declarations of a datastructure, and you would like to modify the constructors to each have an additional shared parameter.

In order to add this parameter you could add some behaviour to the constructor definition.

With vim you have a new choice open to you: you can define a macro that to find and modify all of the constructors in your declaration file in 20 seconds.

Now you can choose how you would like the constructors to look, rather than the choice being made for you by the existing code.

There are of course other ways to bulk-update text files, but the advantage of learning vim is that it is context-free. The same commands used to modify C# are fine to use for modifying javascript or XML. (i.e. you don't have to use parsing libraries)




>Vim gives the ability to refactor large amounts of code rapidly.

It gives the ability to edit large amounts of code rapidly.

Refactoring implies design, coming with the right structure, applying some design pattern, etc -- which is the slow part, and not affected by your choice of editor.

If we're talking about "automated refactorings" (of the trivial variety, e.g. extract method, etc) then an IDE is an even better candidate than Vim.

>With vim you have a new choice open to you: you can define a macro that to find and modify all of the constructors in your declaration file in 20 seconds.

Or you know, I can do the same in any other editor with macros. Or use a regex, with almost all editors support and do it in 5 seconds.


I wrote a different reply to your post, but on replection you and I think vim is a different thing.

For me, vim is not my editor - It is a plugin that I install into all of my editors/ides (emacs, visual studio, etc.) so that the keybindings are familar and all of the normal tools (regex, macros, multiple clipboards) all work the same way.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: