5 ms·
In all of the discussions on HN about vi/m this is probably the most intelligent question I've received after posting my opinion. I've been coding for 16 hours
by rebootthesystem 9y ago
In all of the discussions on HN about vi/m this is probably the most intelligent question I've received after posting my opinion.
I've been coding for 16 hours straight and have at least another four in front of me (have to deliver tomorrow AM) so I don't have a ton of time to answer this.
I'll use today as my example of how irrelevant (and counterproductive) vi/m can be.
I'm working on a large Django project and cranking out apps like there's no tomorrow. I use PyCharm for this.
Here's a case where experts are making it their business to deliver a superior tool that allows me to get my work done. It has myriad tools configured and configurable to help me. I don't have to futz around with weird custom stuff. It is intelligent about Python, Django, JS, jQuery, databases, HTML, packages, Git, Python console, Django console, etc. It can even talk to my servers. PyCharm is, in my opinion, a nearly unmatched productivity tool.
I lied. I am working on two large Django projects simultaneously because some of the work for the new project entails porting from an old one. So, two PyCharm windows on two 24 inch monitors and two browser instances side-by-side on the third monitor.
Can you setup vim to do some/all of the above. To some extent, yes. I haven't used it at this level in quite some time so I can't answer the question. What's the question? Can you setup vim to match PyCharm feature for feature? I don't think you can, and, if you could, it'd be a nightmare.
A lot of the vim "religion" centers around keeping your hands on the keyboard, not using the mouse, carpal tunnel and speed.
Keeping your hands on the keyboard is irrelevant unless you are a data entry clerk. If you are a software developer you are far more likely to spend more time doing things other than typing. Designing data structures, diagramming databases, researching approaches to solving a problem. Thinking.
The above is also used hand-in-hand with "vim is faster". Yeah, again, if you are a data entry clerk entering tax return records this might have some value. Software development? Nah. The time one could save by only having to move a finger a few centimeters is but a rounding error in the context of any non-trivial software development project. It's silly, really. Take the entirety of a project and multiply typing time by, I don't know, 1.25. It would still be insignificant when compared to the overall project time. Debugging alone takes orders of magnitude more time than anyone could save by typing faster.
Not using the mouse. You know, those of us who grew up using, designing, building and programming computers that did not have a mouse were ecstatic when the mouse arrived. It's just plain silly to malign the mouse. I will say that I switched to a thumb operated trackball a long time ago. I don't go looking for a mouse. My trackball is always there, quite literally touching the right edge of the keyboard. And I don't have to move it all over the place to use it.
Carpal tunnel. Serious problem. I suffered from this about fifteen years ago. Doing 18 hour days in front of the keyboard was red-hot painful. I tried different ideas. I knew people who had to have surgery on both wrists and were never again the same. I wanted to avoid that scenario.
I ultimately did two things: First, I switched to a thumb operated trackball. Mice are not designed right and you have to move all over the place all the time. This is very repetitive and not good. Second, I designed and built my own desk. I welded a steel framework that supported a surface for the monitors at 29 inches off the floor. The framework also had a full length shelf in the front with the surface dropped down about three inches. The front of that shelf had a 2 inch raised lip. So, my forearms rested on this lip and my keyboard and trackball were two inches below that. My hands naturally drooped into that cavity. No more carpal tunnel. Being in front of the computer doing everything from mechanical to electrical to software engineering using various interfaces for 16+ hours is normal for me. I have not had any issues in 15 years or so. None.
All of the arguments for vim are simply irrelevant. The only argument I could find for knowing how to use it at a basic to mid level is this: If you find yourself having to access a remote system with a computer that dates back to the stone age you might have no choice but to have to edit files remotely and you know that vim/vi will be on that system. Personally, I have never in over thirty years had that problem. These days I'll use something like CuteFTP if I have to or, as I said above, PyCharm and other IDE's (PHPStorm, etc.) know how to talk to servers and allow remote editing "in comfort". I mean, you can buy a $200 PC laptop with a large 17 inch screen, full keyboard, etc. these days. No more excuses.
Bottom line: vi/vim don't make sense because they do not provide any advantages when compared to state of the art IDE's.
Wow, I ended up typing more than I wanted to. Oh well.
- diegoprzl 9y agoI think you're right. Nowadays I only use Emacs+evil for Org-Mode and languages that don't have strong tooling yet. For me the main advantage of vi/vim is that I don't have to learn new editing keybindings each time I change editor/IDE. Vim mode is probably there and the rest I can rebind. Another advantage for Vim/Emacs, especially Emacs, is that they are very extensible so you can actually have features that are more cutting-edge than what commercial IDEs have yet. Still I do think that the IDE package is more productive.
- h1d 9y agoSurprising you type focused, which I agree with the content well, after 16 hours of work but it would be nice to see your table setup in picture.
- bobwaycott 9y agoEveryone always makes fun of my thumb-operated trackball.
- rebootthesystem 9y agoIt's kind of funny watching people who've never used one try to adjust to it. My kids grew up with them and wouldn't use anything else. They have them on their laptops too. I hate laptop touch pads, the single worst UI ever put on computers.
- bobwaycott 9y agoYeah, I mean, I try to explain the appeal, and nobody is even willing to give it a shot. I can't help but laugh when someone tells me how their Magic Trackpad thing is so much better. The precision is terrible, it doesn't improve on all the standard mouse type of constant wrist movements, and so on. Sometimes I joke that trackpads were meant for species that haven't evolved thumbs, or haven't learned how to use them. :)
- alexvoda 9y agoSince you mentioned using a trackball due to carpal tunnel when using a mouse I thought I should share my setup. I don't really suffer from these issues (with the exception of scrolling) but it pays to prevent them. I only use a mouse when I use many monitors (3+) and the desktop surface area is significant. In all other cases I prefer to use a very customized touchpad setup. I use a business laptop because it has buttons for the touchpad both below and above the touchpad(the buttons for the trackpoint. And I configured it so that all the buttons below are the normal click and a button above is the secondary click. And I disabled tapping because tapping gives you no feedback and prevent you from resting your hand on the touchpad. The main reason I switched is because I find scrolling on a touchpad (either 2 finger scrolling for short distances or circular scrolling for longer distances) a lot more comfortable than the scroll wheel. Scrolling a lot using a scroll wheel makes my middle finger hurt and middle click auto-scrolling doesn't work everywhere. This means I can mouse around using either hand in the same way. Most touch pads are configured with buttons (reals or virtual) in the bottom left and right sides for left and right click. This means using the touchpad is different for the left hand than it is for the right hand. The only other touchpad I found as usable was the Apple trackpad when it still had a button. I clicked with the button and the difference between primary and secondary click was whether I had two fingers on the trackpad.