r/programming • • Sep 24 '15

Vim Creep

http://www.norfolkwinters.com/vim-creep/
1.2k Upvotes

844 comments sorted by

View all comments

Show parent comments

35

u/Deathspiral222 Sep 25 '15

To me, an IDE needs to understand the meaning of the code, not just treat it as a bunch of symbols. I mentioned this in another comment, but in a large codebase, with twelve functions all called foo(), I want to refactor all references to THIS SPECIFIC method foo() to rename them to something else. IntelliJ can do this in a keypress but I've never found anyone who can do it in vim.

-1

u/thrashmetal Sep 25 '15

Doesn't take long to grep the entire code base for the include file, open results and do a regex search replace to refactor.

6

u/Vile2539 Sep 25 '15

with twelve functions all called foo(), I want to refactor all references to THIS SPECIFIC method foo()

The problem is you have 12 different methods called foo(), and you only want to rename a specific one. Find/replace won't help you there, since it will only find all the calls to foo() methods, not just the specific one you want.

1

u/thrashmetal Sep 25 '15

So now I have 12 functions all called foo defined in the same file, with the same number of arguments? I would find the person who wrote that and yell at them. Then I would just change the name, compile and fix the errors.

→ More replies (5)