3 ms·
by function you mean a function call? two pages down, and replace it's about 8 keystrokes (ctrl-f-f to get to second page, say /<first-two-chars> to get to the
by riffraff 16y ago
by function you mean a function call? two pages down, and replace it's about 8 keystrokes (ctrl-f-f to get to second page, say /<first-two-chars> to get to the function, cw to change it) does that take you more than two seconds? Also, you'd probably just do search instead of moving down two pages, and then replace (/<first-three-chars>cw).
I'm no vim power user though, so I can't say if there is a better way, but it is faster for me.
I believe in full featured ides (because of features like integrated debuggers, refactorings) but not because of the mouse, so even if for example eclipse has a file tree, I usually open a class by shortcut+<start typing classname>enter, isn't that faster than navigating a tree?
- gnosis 16y agoThe faster way would be if you used ctags and had your cursor already on the function name. Then, simply typing: CONTROL-] would take you to the function definition (wherever it was, in the same file or in a different file), and: cw would change it. Three keystrokes in total. There's no way a mouse user could do better. Especially as he'd need to type "c" anyway, to start changing the name of the function after he'd selected it with the mouse. So the difference would really be in two keystrokes vs moving your hand to the mouse, scrolling down, using some error-prone and slow way of finding the function name visually, followed by a selection of the function name with the mouse. A touch typist should easily be able to type those two keystrokes in the time it would take to simply move one's hand from the keyboard to the mouse. So however long it takes to perform the rest of the needed operations to find and select the function name by mouse along with moving one's hand back from the mouse to the keyboard would be time wasted in comparison to the keyboard method. Time that could be more productively used in continuing to edit something else. Now multiply that time waste by 50 or 100 times you need to do that per day, the hundreds of days you spend editing per year, and the decades you spend editing in your life. And that's not to mention the more complex editing tasks that are simply impossible to do with the mouse (without breaking out the virtual keyboard that you'd need to click on with the mouse, which would be a completely ridiculous way to edit if you had a real keyboard in front of you and were capable of using it).