by fergie · 6y ago · 0 comments
We dont talk about this much, but many of us hardcore Vi/Emacs users have had this knowledge imparted to us from a mentor. Thats probably why the use of Vi/Emacs is much higher in established tech environments (universities, big dotcoms), where there tends to be a tradition of mentorship than it is elsewhere. If anyone is looking for a slightly off-the-wall masters thesis, I'm fairly certain that you could extrapolate this out into a class divide- perhaps richer/more-established/well-educated users are proportionally more likely to use Vi/Emacs, and in some ways use them as "gatekeeping" tools?
My own contrarian and probably equally wrong take is that it's mostly about accepting the (evidence-free) premise that modal editing is actually a good thing. It's hard, you suffer but lots of smart people tell you it's worth it and perhaps your suffering will help you be as smart as them. It ends up being closer to hazing and penance (your editor as hairshirt) than actual gatekeeping.
It continues to surprise me why people have such strong opinions about someone else's editor choice. My current theory is vim users are like vegans/gluten free/paleo/etc, in that its a personal choice that some are public about, and people love to hate on it and "disprove" it for the same reason.
You're neglecting the folks who use keyboard editors (and fancy keyboards) to reduce the incidence of RSI.
If I can accomplish the same tasks in four keystrokes (~1s) as it would take me in a dozen clicks and 15 seconds of mousing, then poorly designed programs forcing me to use the mouse to interact are causing an order of magnitude more strain than those designed for keyboard interaction.
(This is less an issue in text-editors, and more an issue in everything else user-facing.)
I happen to be a person who uses a fancy keyboard (Kinesis Advantage2) and text editor (vim) to reduce RSI.
This is not a good theory. Surely, this effect appears wherever you've got conflicting choices about what is best, but there are always reasonable arguments on why you should do X over Y. And you know, there are always people who respect other's choices.
I am a vim user and I 100% understand why others don't want to get into it. I don't bully them, I will explain only once why I think it is a better environment and then they are free to carry on with their lives and so am i.
People who are extremely attached to their choices are (to me) unable to understand that every tool is for a job && different people have different needs. This shouldn't lead us to label a group of users and ignoring the pros and cons of smth
In any case. For a long time I was a fan of my editor of choice, slickedit. It definitely has a few features I use for which I don't know the analogs in most other editors. Features like versions backups. Undo of multi-file search and replace.
Also once had someone show me IntelliJ for C++ and was fairly impressed with its refactoring features. Enough that I thought I should look more into it.
I have yet to see a feature for vim that makes it clear win over any other major editor. I have read articles that make me understand why others might like it but seriously. I think you're all deluding yourselves.
Just as an example, lately I mostly do JavaScript and a little typescript. I'm 100% sure that the VSCode experience there out of the box is superior to vim for the same purpose. VSCode is node aware, browser aware, npm aware, eslint aware, typescript aware out of the box. I have no idea how much configuration I'd have to do in vim to get it to match and I find all of that invaluable. I'm not saying vim can't do it but I am saying if I tried to start using vim today on the projects I'm working on the experience would be seriously inferior. I don't know what language I'd have to be using to change that.
I think because people identify themselves too much with their editor, programming language or whatever else choice. Everyone wants to think of themselves as the smart ones, only making objective rational choices, so everyone else making other choices has to be stupid. If now someone criticises their choice or argues about other choices, then they feel personally attacked, and there the flamewars goes.
For vim: plug-in development effort. Nowadays we have to recycle VSCode ones because Vim is seen as too niche to develop for it directly.
For vegan: meal availability in shop and restaurants.
For Android vs iOS: app availability.
https://www.goodreads.com/book/show/28820444-the-elephant-in...
(edit: I'm basically paraphrasing eindiran's argument)
I think there's some truth to that.
I've been vegan for 20 years and a Vim user for half of that time.
Back in the day, I was questioned a lot about why I was vegan, being asked all the time where do you get your protein? Grateful those days are over.
Vegans can tell you the worse people are the former vegans, who almost always had a bad experience of some kind being vegan and want to tell anyone who will listen.
I think people who tried and didn't get Vim are often the ones wanting to disprove that Vim is any good. Because obviously if it didn't work for them, it can't be any good.
The subtitle for Drew Neil’s Practical Vim book is Edit text at the speed of thought and that's kinda how it is when you start to get pretty good at Vim.
I don’t think it’s all overblown. With a GUI editor if you’re not efficient with it you can fall back to using a mouse until you know enough shortcuts. With vim if you don’t know enough of the controls for even basic navigation you can’t do much, the learning curve will always be steeper, and some people don’t want to go through that even if it pays off in the end.
I want to reiterate that I'm merely pursuing an intellectually curious line of inquiry into whether modal editing enthusiasts are brainworm-infested cultists, not engaging in base mudwrestling about editors, which the guidelines forbid.
Absolutely.
I am not wedded to my editor, I happen to prefer Emacs, if it’s not installed I shrug and use cat and sed. The older more experienced people at my company tend to use vi or Emacs. The younger ones use VS Code, PyCharm, Sublime etc. And they spend an awful lot of time on chat asking “how do I do this simple thing in my editor??” that you simply don’t see from the Emacs/vi crowd.
Kakoune's development has started fairly recently. The oldest tags on its GitHub repo are for 2018. I think this defies "people want to continue the legacy of actually-not-that-great thing because I had do suffer, so other people should too". I think you'd only put into making/promoting Kakoune if you genuinely thought modal editing is a good thing.
Whereas, if the bigger value in "I learned modal editing" is the signal of "modal editing is hard, so anyone who knows it must be good" (rather than value from a better developer experience), I think aiming to make modal editing more intuitive/accessible is counter-productive.
In fact, if you use shorcuts, they are the same thing.
Modal editing is not hard. I learned vim and emacs without problems. Step by step, focusing on what was the next thing useful for me and learning it after that.
Not harder than learning German or English or Chinese Mandarin. Any human languages is way more sophisticated and people learn it anyway.
There is 3.000 words (or commands) that you need to use to speak a basic language. 20.000 if you are an educated person.
Do you believe that if people in Germany speak german fluently they are trying to signal anything to others?
People learn a language because they use it. As simple as that. The more you use it, the easier it gets.
Oh sure, it's not hard at all when compared to something really hard!
> Do you believe that if people in Germany speak german fluently they are trying to signal anything to others?
No they speak German because that's the easiest option for communicating with other people. Vim is not the easiest option for text editing.
Terrible analogy.
Do you suffer for thinking on English? Do you suffer for driving your car and changing gears? Do you suffer for using a pen for writing?
You can try to write with the hand you don't usually write with. You would suffer if you try to write the same things you write with the other hand but if you improve a little every day over time you will be capable of writing with it well.
It’s entirely possible to learn modal editing without suffering but it’s not likely to learn it without struggling, given how most people are raised on the mouse.
Yes, equally wrong. ;-)
We deal with modes all of the time—when you're backing up your car, the car is in reverse mode. Microwave ovens have modes depending on what you want to cook. I use the popcorn mode on mine a lot. Anyone who've ever used a VCR knows what modes are.
So having an editor with modes shouldn't be a foreign concept.
But it's not just about having modes; it's how well thought out Vim is. Even though I've been using Vim for about 10 years (after trying many other editors and getting frustrated for one reason or another), I keep learning more useful things.
I recently needed to edit lots of messy Markdown files for a friend. I knew macros existed but I never bothered to use them. Before I knew it, I was using a couple of macros that really cut down on the tedious work I had to do.
Same thing with regular expressions—I knew about them but I had never gotten around to learning them. Combined with Vim’s composability, regular expressions gives you super powers.
The other thing about Vim I've always appreciated—it's been around so long, articles and videos from 10 years ago are still relevant today.
For example, back in the day, I used to watch Derek Wyatt’s Vim tutorials.
Rewatching some of them today encouraged me to learn macros and regular expressions. When I recently watched this one (https://vimeo.com/15443936), where he extracts plain text out of a messy looking XML file using regular expressions, I was like I want some of that.
Any software made for people who take their tasks seriously—GUI or command line—is going to have a learning curve—I think it's exaggerated for Vim. But the payoff is well worth it.
I just installed Big Sur on my Mac. Everything went smoothly for me, but not everyone was so lucky. Even if I had other compatibility issues, Vim just works. As long as I have a terminal, Vim and web browser, I can be productive.
I can somewhat understand "don't have to touch the mouse" as that's a personal preference for them (even though IDEs have key binds too, I think they blow up that argument way too much) but on anything else they are suspiciously silent. Maybe I have just not met the right people to ask but that's my personal experience. Anyone I know using vim only does it because they either have been using it for 40 years or have been told to use it by someone from the first group and don't know anything else.
In my opinion, the real drag of conventional text editing is constantly having to move between the keyboard and mouse. That's a much more physically and mentally expensive mode switch than any editor mode switch. It always tends to hurt my focus on whatever I'm working on. Vim feels like I have all of the movement types in muscle memory, and it just seems to happen automatically.
I know all editors have keyboard shortcuts. I think they're all much more awkward and inefficient than Vim though. Too many steps and too much thought for "how do I move the cursor over there without using the mouse". When it gets beyond the basics, the keyboard shortcuts either don't exist at all, or vary widely between editors. How do I split a view into 2 sections and switch between them with only the keyboard in VS Code? Beats me. Oh it may be possible, but if so, it's probably different in IDEA, Eclipse, full VS, Sublime Text, etc. Vim is always Vim.
I also find most of the IDE features for live error checking and auto-complete to be more distracting than helpful, at least for dynamic languages. It's subtly annoying and harmful to my focus for my editor to be constantly trying to tell me about the "syntax errors" in code I'm not finished writing yet, or to constantly pop up completely wrong autocomplete suggestions. I prefer to run these checks or unit tests explicitly on command, when I'm ready for it.
The real instigating factor was severe RSI. Three and a half years ago, it hurt even to brush my teeth. The damage was primarily from using trackpads, mice and worst of all mobile phones, but it was much to late to just use a keyboard.
I had to take a complete break and then limit myself to a couple hours a day and only on a fully ergonomic mechanical keyboard. The difference in using VIM and staying mostly on the home rows vs constantly hitting chords with modifier keys to do everything on other editors was massive. I could work almost twice as long before feeling pain!
At the time I could get around VIM but hadn't ever customized my .vimrc or really made a concerted effort to study it. I just knew the standard navigation with hjkl, insert, append, copy, yank, delete, lines, words and find. And yet it was still reasonably productive.
Once I learned about change/delete/yank in word/tag/line/etc, it was already better than using VS Code in normal mode. Making shortcuts in my .vimrc made it even better. In a sense it's like snippets at a meta level that apply to your work flow.
Nobody pushed me to use VIM and I like it quite a bit, despite having had a lot more experience with non-modal editors. I'll use VS Code, etc, but I when I do, I use VIM mode in them unless I'm recording a screencast where I don't think that would be a good idea. So far, the only major editor I've encountered that fails to support VIM mode is Xcode.
So as from my point of view of would highlight the following reasons:
- Keyboard, for even a bad typer like myself the vim keys and chords are very efficient.
- The not using a mouse is good also, your hands do not move far. - Fast
- Widely available
- Cross platform
- I can use it in a SSH session.
- When you use it for a while you do build an attachment to it. It might sound strange but I feel good using vim.
I think my vim experience has one major benefit also. I have been able to jump from one ide/editor to another and if there is support for vim keys then I can navigate and do basic to mid level editing quite efficiently.
I like VS Code now, it is consistent, plugins work consistently (one problem with Vim). I would still recommend people to learn vim.
Quite often I need to edit a whole bunch of lines of code/data in a similar way. simply being able to repeat a particular set of 'motions' x times, or on whatever line I'm one, has often proven quite useful.
I'm sure that many people don't really need to do this much, but for me it's probably something that crops up daily (when I'm working), at least once. Often multiple times.
The fact that I can perform complex operations and record them with no extra mental load, is definitely one reason I'm sticking with Vim (or rather, evil on Emacs).
It was our first year, i don't think we even finished our Posix shell project at that time, so our knowledge of vim's binding was very limited, as we spent less than 6 month on it. But this was really comfortable, and even the two people of our group that learnt to code prior with the Java IDE got hooked with modal editing, vim or not. Because once you've learned how to use it, it is just more comfortable. I still know how to use ctrE and ctrlA and basic shortcuts present with every IDEs, but the `find ", move one right, delete all util next "` i don't, and i'm pretty sure is not the same on Atom or Netbeans, and since i've already learned the superior `ri"` (replace inside ""), i don't understand why i should learn more complex shortcuts.
I mean, even `delete from this word until the end of the line` i'm pretty sure won't be the same within two editor (you'll have to find the word with control f, place a mark wich differ depending on the editor, CtrlE, then either place a second mark or delete from the first mark? i guess?). I like consistency and not having to place mark and think on "how will i do that".
I'm not saying modal editing is better, i think it's just like learning to use a new tool. Let's say you want to add floorboard in your house. You know how to use a circular saw (everyone does), so you use that, and that's okay and probably enough. I've learned how to safely and correctly use a radial saw however, and will rather use one if i have the choice. It's not better inherently, i'm just lazy and i find using a radil more comfortable (as long as i have earplugs available).
1) Editing speed. I'm far from a Vim power user, but anytime I have to use a different editor, I'm frustrated by how slow and cumbersome it is to edit code. It feels like trying to run in water.
2) Ubiquity. It's so nice to just use the same editor everywhere, especially remotely and/or on low-powered devices.
On point #1: This is not just an issue of familiarity either; I've used way too many editors over the years, vim wasn't my first choice, and I resisted it for a long time. Once I bit the bullet (due to point #2, above), I found that the learning curve was really steep as expected. But an interesting thing happened soon after that: long before I felt proficient in Vim, the speed of editing files in Vim surpassed the speed of making the same changes in any other editor.
Lots of typing, zero RSI.
Modality also enables the vi "mini-language" that makes editing actions and movement composable, which is nice.
I started coding only during my undergrad (computer engineer), so first editor/IDE was Eclipse, and then moved to Atom -> Sublime -> CLion. By the time I reached my 3rd year, I was writing C/C++, and took this course on Operating Systems. The course taught on the OS/161 teaching OS [1], which (at the time) used BSD Make and other magic, and I had no idea how to configure my CLion IDE to handle it. The course professor was a Vim evangelist, and actually dedicated a weekend to teach Vim for anyone who wanted to learn. Since, then I have been hooked. (Point being: I haven't existed for 40 years, let alone used Vim for that long, nor have I just been told. I think there is some comment in this post that compares learning Emacs/Vim to learning foreign languages, which I definitely relate to.)
Why I like Vim:
1. I can separate my text typing with text manipulation (if that makes any sense). 2. Cliche, but I love that I don't have to use my mouse. I don't necessarily care about the speed of it (I have RSI from using my keyboard too much, so I am actively slow) but having to switch to a mouse and then search for the button I want to click, etc. is a significant mental strain/distraction for me. 3. Command mode is not the same as keybindings in IDEs: I have used several IDEs (outside the ones I mentioned above) and I always found keybindings to not be intuitive and also involves having to press a bunch of unrelated keys. I think the reason why Sublime/Atom/VSCode have a Command Pallette is exactly for this reason, and IMHO, Vim does it better. 4. And, finally, the most important reason: I don't have to leave the terminal. I have a setup that uses Neovim and Tmux, through various high-quality plugins written by some really awesome people. It is seamless. I have latex compiling in the background, I can edit command line arguments to Clang without having to hop through multiple dialog boxes, and so on.
[1]: http://os161.eecs.harvard.edu/
Edit: Forgot to put link to OS/161
Edit: Found out that the original website for the course I took is still up at https://ops-class.org/courses/buffalo/CSE421_Spring2017/
- I have since tried to make more people use them, and pushed them as a TA of the advanced programming class. Nobody likes these stuff. They are useless for most people. The only real usecase is for sysadmins who need to quickly edit files remotely.
- Even if they were somehow some gatekeeped holy grail that only rich people with mentors got; So what? If rich people with a lot of resources (including mentoring resources) can’t do better than us normal folks, then doesn’t that mean sth is fundamentally broken? More resources should translate to more knowledge/skills. The fact that in our current world the conversion rate is so inefficient (especially since these rich folk probably enjoy mildly better genes as well) is evidence that our current education methods do not scale. A corollary of which is that the US should spend a lot less on education which in the end doesn’t produce any results. (Compare the US expenditures with other countries.)
My mentor was vimtutor.
Seriously, learning basic vim takes 30 to 60 minutes with vimtutor.
Vi is ok for viewing files on a terminal, and for small edits, but it’s rather mediocre for any significant amount of development work.
May I ask what prove this?
I don't have the references at hand but I think people like Alan Kay and designers at Apple would think it crazy to even suggest that a keyboard only HCI is more efficient.
What brought vi to our attention was the holy war itself, and the sheer appeal to decide which camp we fit in.
50 years ago I think it’s a completely different story, but from the point BBS and shitposting were a thing, we got most information we needed on the net, including editor wars, linux distribution elitism, PHP and javascript and so many things.
It can be a kind of indirect mentorship, but I think even today a lot of people go try vim for the memes (and stay or not for the efficiency)
Current versions of windows can do scp, ssh, rsync out of the box in the windows console, but I believe that is less then a year old and many people don't realize it.
It took me about 5 years to transition from nano/pico to vi/vim. I'm still learning, but I recently loaded Debian on a VPS I use and was surprised when visudo defaulted to nano. It seems so much less powerful and actually more difficult to use.
But I have not switched to emacs(evil mode ofc.) due to mostly philosophical differences and i completely just hate the defaults..
I knew no one that was openly proficient in Vim when I picked it up. In my studies, I was already one of the two to three odd-one-outs who used Linux (>90% of students and professors didn't know anything besides Windows).
I bought an ARM-based chromebook, installed crouton and... quickly discovered, that nothing besides Vim/Emacs came pre-built for it. There even wasn't a simple, official way to build Electron (so all those editors weren't an option, either)!
So you could say, I only picked them up (I tried both) reluctantly. And I stuck to Vim-bindings because all other alternatives I know suck in comparison. The best I knew beforehand w.r.t flexibility was Sublime Text with its multiple cursors and regex searches, but that also pales when compared to Vim macros.
Make of that what you will. I'm certain your point about mentors isn't wrong, but it doesn't explain it all, too.
Also, if anyone could point me to similarly promising editing schemes, I'd be glad to have a look at them :)
Stockholm syndrome aside I use it still because of all the inertia of learning I put in. I’m getting ever more productive with it so I’m sticking with it.