4 ms·
I think the OP has never seen a very efficient VIM user crack some code. There are some valid points but they are surrounded by unnecessary ranting and lack of
by d0m 14y ago
I think the OP has never seen a very efficient VIM user crack some code. There are some valid points but they are surrounded by unnecessary ranting and lack of knowledge.
>> Don’t you ever think you can beat a mouse. Only in very few edge cases will it even matter.
Already saw someone clicking the "Search" button on a google page instead of pressing Enter? This is the same sensation I get when I see someone editing code with the mouse. These same people also scroll a document instead of jumping to the definition or using incremental search.
Btw, not that I have something against programmers who use the mouse in their editor. Just don't say it's as fast because it's not.
- msoad 14y agoI agree. I would say even if you are using Sublime Text don't touch the keyboard. You can do EVERYTHING without mouse in sublime text.
- rdw 14y agoMany of the most productive programmers (in terms of text editing ability) I know are heavy mouse users. Watching them work really opened my eyes and taught me a few good habits. One of the skills that you have to develop is the ability to hit very precise targets with the mouse very quickly. I think that a lot of people are simply inexpert with the mouse and misclick a lot, and that adds to the perceived cost of the mouse in their head. But I assure you that if you can reliably hit targets with your mouse it will unlock productivity doors for you. Want to rename an identifier? Double click it with the right hand, Ctrl-<replace> with the left, tab with left to proper position in dialog while right hand is returning to home, type replacement, hit enter a few times. Adding a prefix to a bunch of strings? Click-drag to select the prefix while hitting Ctrl-C (stretching the pinky to reach the Ctrl takes about as much time as the entire click-drag), click click click on all the places you need it to go, timing the clicks with Ctrl-V on the left hand, scrolling with the wheel as needed. Very, very fast. I suppose that describing it doesn't do it justice; I certainly wouldn't believe it if I hadn't seen it with my own eyes repeatedly.
- nbouscal 14y agoYour pinky shouldn't have to stretch to reach Ctrl because your Caps Lock key should be remapped to Ctrl.
- whatusername 14y agoThis is also why some of us love/despair-over Thinkpad's. The Trackpoint is amazing once you are used to it.
- vacri 14y agoYeah, he had some odd examples. If you can't type "/word<cr>" faster than someone can move their hand to the mouse, target the word, and click it, then you can't touchtype. That was a strange example of his. But nevertheless, I would happily take up his challenge: let's find a word that is in the document, but not currently on-screen - hardly an 'edge case', more like 'routine task'. Good luck at winning that one, mouseketeer! Another great one that sees regular use at my fingers is ci' or ci" - again, hardly an edge case, and blazingly faster than selecting the characters just right with the mouse. I have no problem with using the mouse for certain things, but blanket statements like the quoted one are rarely anything but wrong.
- CJefferson 14y agoIf I am looking for a particular word, then I will use a search. Even notepad and nano has a short-cut key for a simple search for a particular word. Where I find a mouse useful is when I want "that loop which I suspect is misbehaving. That one which adds a new member to all arrays". There a quick flick of the mouse-wheel, and then fine positioning of the mouse cursor I find gets me to my location faster. Even when the loop is on the screen, maybe 35 lines up, I have to either do a binary-search style jump with the keyboard, or with the mouse just click on it. Also, looking for a particular word is easy when there is only one occurrence of it, or you want the next occurrence. A mouse might still be useful when there are many occurrences of a variable and you want (for example) one somewhere near the end. Perhaps vimmers tend to keep better track of where everything is to make it easier to "hard jump" to, while mousers tend to keep a more ad-hoc overall view, so they know approximately where to scroll to?
- tmarthal 14y agoMy .vimrc is the following: <quote>set number</quote> Which shows the line number no matter what in a vi editor. Jumping to a loop on the screen is as easy as viewing the line the loop is on, then hitting colon+line number (e.g. ":68"). This might be what you're referring to with a "hard jump". I also use the "number+command" shortcuts quite a bit. If you want to jump up/down 20 lines (or 2000), then "2000k" or "2000j" will move the cursor up 2000 lines or down 2000 lines. Also a hard jump. But to find an occurrence of a word at the end of the file, the typical search sequence is the following: 1) :$ - this jumps to the end of the file ($ is a common regex meaning 'end of', the same way that '^' means beginning of) 2) ?word - this does a backwards search for the word. this is at the bottom of the file, searching upwards 3) n - this jumps to the next occurrence of the word So thats like 5 keystrokes not including typing in the word. Jumping around and viewing files really is neat with vi/vim.