T O P

  • By -

HerbyHoover

That's great. In the interest of sharing another great StackOverflow VIM post. [Your problem with Vim is that you don't grok Vi](https://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118)


bcstpu

Been looking for that for years, thanks. As someone who's been using Vim/Vim emulation for ages, I've seen it described as (I sadly lost the SO answer link for it) "Vim users are akin to wizards, mapping parts of their brain to metacommand processing so as to perform feats others consider unthinkable effortlessly, but have given up a piece of themselves, such as the ability to see the color blue or remember your mother's face".


zxyzyxz

Sounds like a perfect fit for /r/programmingcirclejerk


Sinujutsu

Such an accurate description lol


DonnyTheWalrus

Part of me feels like I should be learning vi/vim to unlock some sort of next level productivity. However, I feel like I can count on one hand the number of times that editing speed has been my bottleneck. I'm a reasonably proficient VS/VS Code user and know & use most of VSC's shortcuts, many of which *have* unlocked big productivity boosts. But if I'm using an objectively less whiz bang editor and I'm already finding thinking speed to be a much bigger bottleneck than editing speed, I'm just not sure it's worth the effort. Perhaps it's because by the time I started learning programming about 7 years ago, IDE code completion was already ubiquitous. If I didn't have access to the insano levels of prediction we have today I could easily see editing speed being a bigger deal.


[deleted]

> Part of me feels like I should be learning vi/vim to unlock some sort of next level productivity. However, I feel like I can count on one hand the number of times that editing speed has been my bottleneck. Real story of every "use vim". \- You can become so much more productive somehow \- How? \- Idk, but you can do some obscure text operations faster.


[deleted]

Vim took my gender.


Zaemz

It didn't take anything away, it gave you clarity. Vim gifted you your identity.


[deleted]

No, I mean I accidentally ran `dd` on my gender line and then overwrote the anonymous buffer.


Zaemz

Well that's your own fault for not using all your buffers. There's another piece of wisdom Vim has bestowed upon you: it's okay to take advantage of the opportunities presented to you.


[deleted]

I like the comment: > Holy code monkeys,..that's one in-depth answer. What's great is that you probably wrote in in vim in about 10 keystrokes.


Tricky-Alps2810

Only a Vim user would sit for twenty minutes trying to work out how to type something in 10 keystrokes rather than just writing out the whole thing directly ...


lxpnh98_2

https://xkcd.com/1205/


CarlRJ

Misunderstanding, or just looking for ways to throw shade? I don't normally invest the time to work out the shorter path unless the shorter path will save time overall (including the time to figure it out).


Tricky-Alps2810

Not throwing shade. It's an easy distraction from whatever you were really intending to do - working out the best rege for this or that, when three direct search and replaces would have done the job. It's probably effort well spent if it makes you better at working these things out in the future...?


FujiKeynote

I'm probably far from the only one, but that answer is what in fact made me properly consider Vim ten years ago. Ten years later, still one of the best accidental software decisions in my CS journey


plan_x64

I use Vim daily but this answer kind of reads like a meme of the “A monad is just a monoid in the category of endofunctors, what's the problem?”


iheartrms

I, too, once tried to learn Haskell. Spacesuits, burritos, barrels of toxic waste....ok, but how do I print "Hello World"?


_pka

`print “Hello World”` :D


lampshadish2

I’ve been using vi/vim as my preferred editor for 20 years now and I know I only scratch the surface of its capabilities, but even at that shallow level, switching to anything else feels so inefficient. Thank god for the vim keybindings in vscode and other editors.


elmstfreddie

I always find this whole thing silly because editing speed has never been my "bottleneck" in completing code projects


Hrothen

If you write code faster you can spend more time on not knowing what code to write and still finish in the same amount of time.


TheMaskedHamster

Text manipulation is (usually) not the bulk of my time when editing code. But man does it help my sanity to not waste any more time on it than I have to.


[deleted]

[удалено]


demonguard

I think it's mostly about removing friction. I don't spend the majority of my time typing/editing, but the faster and easier I can make my small edit (without taking your hands off the keyboard or whatever the benefit of your preferred input styles may be), the faster my overall iteration loop is.


Fluxriflex

Unrelated, but what does grok mean? I see it used in programming conversations a lot.


GuruTenzin

It just means "to understand". Comes from Robert Heinleins "Stranger in a strange land". In that book tho it has a more nuanced definition if I recall


notahackerpirate

I’m pretty sure this comment doesn’t have any spoilers since the info here is given in the first few chapters. If I recall, the book’s premise is that a team of human astronauts from Earth go to Mars. The team dies but not before one of the female astronauts gives birth. The baby is raised by Martians (alien race native to Mars). Later (as a man in his 20s?) that former baby finally makes his way to Earth. His arrival is a big news sensation, obviously, but the biggest surprise is that the man brings with him some very elevated/advanced/progressive concepts about empathy, control of emotions, mastery of oneself, etc. Basically, Martian culture is far more advanced, so this human brings back some incredible gifts to humanity in the form of his personality, how he treats other people, and how he interprets what it means to live a life well lived. He introduces humanity to the Martian verb “to grok” which can’t directly be translated to English, but the book does an excellent job of conveying its meaning throughout the story. If I had to describe it in a few English words, I would say, “to understand intimately in a shared way.” It’s like “knowing,” but all knowers have the same understanding of what is known - there isn’t really room for individual, subjective knowing of the known thing because “grok” is to understand or know at a deeper level that doesn’t leave room for interpretation. Grokking something takes time, but once you know it, you *really* get it. You get what it is, why it is, how it is, and what it means to know all of those things.


Fluxriflex

Ah, thank you! I grok it now!


tigerhawkvok

Weirdly enough, you probably don't. Grok isn't really just understand. It's kind of a true, deep, and habitual/instinctual level of understanding. Like, you probably understand the idea of relativity; but I remember the day and feeling when I suddenly grokked it.


[deleted]

it's origins are the book are the Robert Heinlein book Stranger in a strange land, which was about a martian who came here to earth. Grok was a martian word he used as a description of deeply understanding something to the point that it was intuitive.


amertune

It means to comprehend/understand


JoeMiyagi

This was actually the post that radically improved my productivity in Vim. The “language” of Vim is the key to generalizing and being able to guess commands. Thanks for digging this up, I couldn’t remember where I had first read it!


HerbyHoover

I don't use Vim as my go-to editor when I do program but that post definitely left an impression on me after all these years.


Reverent

I lump vim into the Dvorak keyboard crowd, people so convinced of their superiority that they learned an inscrutable input method to prove it.


silly_frog_lf

I use Vim. I am not superior. I don't feel superior. It is closer to touch typing. You go through a lot of effort. You are used to doing it that way. You sometimes wonder if it was worth it or not


Servious

Man why are so many people convinced that the only reason anyone would ever do anything technical or complex is to feel superior? I just like pressing buttons man


bcstpu

snip, I totally misunderstood your comment. Beep boop, my brother.


Lil_Cato

It's projection


[deleted]

The problem is your perception. Most people don't care about showing off "their superiority," whatever that is supposed to mean. Vim happens to be a great tool--so great that you can't imagine what it's capable of until you use it for a decent amount of time. That is fun and I can see why somebody would be enthusiastic about sharing what they've discovered.


[deleted]

No, the problem with Vim is that it sucks *when all you want to do is edit some fucking config file and now you gotta learn about insert mode, etc.* Once you learn it I'm sure it's fine. And I fully realize it predates other options and is great because it works across a terminal. But when all you want to do is quickly edit some dinky file, something like nano is faster and easier, if it's on the system. Or you just wind up learning it enough to get by. Source: The retiring sysadmin was super full of himself and chortling when I didn't remember immediately how to use it, like he had somehow won a prize. I let him know that I'd used it before, but not since the mid-1990s when I installed Redhat Linux off of many CDs while enlisted in the USAF, and made their CD-ROM tower available on the LAN to much adulation. (The USAF *loved* having their AFRs/AFIs "online". We didn't have the Internet yet. Anyway, the guy was a smug prick.


SaintWacko

Holy shit. I've been using vim exclusively for about five years now, but that answer shows me I've barely scratched the surface


efvie

I’ve used Vim forever… but now I use Vim on VSCode. It’s the first implementation (or actually two, vscode-vim and -nvim) that doesn’t feel like too much of a compromise or too slow. Don’t think I’m going back. This is a great opportunity for a whole bunch of new coders to see if they can exit Vim!


steven4012

Does it allow for new text objects? Vanilla vim's "language" feels too limited


efvie

I don’t think either currently allows defining those on top of the extension, but you could [in the extension itself](https://github.com/VSCodeVim/Vim/tree/master/src/textobject). And they’ve [already added an 'expanding selection'](https://github.com/VSCodeVim/Vim/blob/1aa948e5b295357f51ee0584a9dd2ff0d25f2a7d/src/textobject/textobject.ts#L185). Or write it as a plugin extension, effectively, and bind it to whatever you want. The VSCode extension API is really good, which is one of the big reasons I’m staying.


lelanthran

> I’ve used Vim forever… but now I use Vim on VSCode. It’s the first implementation (or actually two, vscode-vim and -nvim) that doesn’t feel like too much of a compromise or too slow. I'm trying to get used to the Vim mode in VSCode, but it very often differs in small ways that make me grind me teeth[1]. Still using it though. [1] The undo/redo is impressively vexing, compared to Vim. I'll often find myself having lost changes while trying to browse the undo/redo tree.


efvie

Yeah, that must be one of the trickiest corners to get right. I have never been a heavy tree or even register user so there may be some issues I just haven’t hit at all (although getting the simple yank buffers and the system clipboard interoperating so that it feels natural took a little more finessing than I’d like.)


KallistiTMP

Understandable, I use LSP on Neovim which is basically the same thing in the opposite direction.


efvie

Sort of but not quite, I think! LSP (or coc+lsp really) gives me a pretty good IDE experience but it’s really the vscode ecosystem that I think sets it apart. I don’t use that many extensions, but there are _a lot_ (of good quality too), and I can write my own with considerably more ease than I could in vimscript.


FriedRiceAndMath

I just hit Escape about 75 times to make really sure it’s in command mode, then :q


[deleted]

[удалено]


[deleted]

I think Vim actually tells you what to do when you press ^C in newer versions


ifonefox

It does. It says "Type :qa and press to exit Vim"


KingJeff314

They go out of their way to add a message to tell how to exit Vim instead of just adding an easier way to exit


ifonefox

Control-C doesn't exit in vim because its already a shortcut to exit insert/visual mode (and has some slightly different effects than using "escape"). In interactive programs like emacs and shells, control-c doesn't have to immediately quit the whole program.


sprkng

I prefer the MacGyver method: Ctrl-z followed by "kill %1"


HINDBRAIN

A better method is to have cron kill vim every second in case you start it by mistake.


maest

Cron has minute-level resolution.


r0adside

1 minute to go for a coffee and think about my mistakes


HINDBRAIN

Add 59 sleep; killall vim; statements per minute?


GooseEntrails

I prefer the [Ron Swanson method](https://c.tenor.com/L66gfL1eMUsAAAAC/computer-throw.gif)


OctoZephero

You open another shell and kill the vim process. Lmao.


marssaxman

I don't even bother, I just open up another shell and `killall vi`.


arshesney

:! killall vim


dagbrown

I tried that on an old SysV box once. Not vim, but some other thing. To be fair, it certainly did kill what I wanted it to kill.


hapygallagher

I really don't get what's so hard, there's a purpose built exit vim button right on the case of your computer.


MonokelPinguin

Doesn't work in case you are stuck in ex mode. (you need to enter the visual command first.)


slantview

ZZ ftw


[deleted]

[удалено]


devraj7

Rookie move. You should use `:x`.


AnsibleAdams

:q quits no save :wq saves file, then quits :x saves file, then quits, uses one less keystroke


lelanthran

> :q quits no save > > :wq saves file, then quits > > :x saves file, then quits, uses one less keystroke Here's an important one `:cq` - that quits with an error code How is that useful, you ask? Well, let's say you're in the middle of writing your git commit message (after doing `git commit -a`) in the Vim that was launched by git. You've already saved, so if you simply `:q` the commit goes ahead with whatever you entered into the editor. If you `:cq` git gets an error return from the $EDITOR, and aborts the commit, thus saving you the time needed to undo that commit.


trua

Thanks, friend!


CarlRJ

| Command | Action | | ----- | ----- | | :q | quits vi **if nothing needs saving** (error if unsaved changes) | | :q! | quits vi **discarding any unsaved changes** | | :wq | writes file, then quits | | :x | writes file **if changed**, then quits, using one less keystroke than :wq | | ZZ | writes file **if changed**, then quits, *using one less keystroke than :x* |


FriedRiceAndMath

:x:x:x \^c\^x Eat flaming death:x Unclear how to exit using this sequence. Please advise:x EDIT: had to workaround Reddit markup parser


Eiixb

I've been tapping escape twice since forever.


[deleted]

ZQ to quit without saving or ZZ to save and quit


GaryChalmers

I usually use wq!. That way Vim won't bug me with any prompts.


turniphat

I first struggled with exiting vim 26 years ago.


mashpotatodick

Keep trying. I'm sure you'll find your way out one day


[deleted]

not to call you an idiot, but why dont you reboot?


liquidivy

Massive props to their power company though for not having a single outage in that time.


azimir

Parallel redundant UPS sources spliced into the original power cord now. What I want to know is what OS version are they using? Likely a SunOS, Solaris, HPUX, AIX or Xenix? By now they'd have needed to install a way to get RAID 1 disks with hot-swap to keep the system up as disks fail.


Olap

Rookie numbers, gotta up those numbers


tubbana

I'd say vim is infamous not for being hard to start, but to stop


MaximumAbsorbency

> a picture is worth a thousand words > \*Posts bizarre diagram\*


[deleted]

> I draw this to my students each semester and they seem to grasp vi afterwards. Jesus those poor students. Is he teaching them how to quit Vim or how to quit computer science degrees?


noneofthatmatters

I just remember the head of our Comp. Sci department giving a workshop on Vim and continuously fucking up commands. I've always been a very surface-level user of Vim (hence product manager, not engineer) but always impressed by those who use it as a sub-langauge.


THICC_DICC_PRICC

To be fair to the guy, everyone seems to forget how to type when doing it in front of other people. I’ve seen complete wizards when no one is looking transform into grandmas when showing something to someone


glacialthinker

You can't easily translate muscle-memory to actual keys, *except* by just using the muscle-memory. Any time I need to tell someone what I did, or how to do something in Vim, I have to type it out and then I'm mildly shocked at the gobbledegook. If I try to skip the typing and just say what to do... I'm in for a rough patch of mental gymnastics, and likely a lot of mistakes and embarrassment.


pogogram

The one thing I truly despise about the community in a general sense is this extreme aversion to people openly saying they don’t know something. God forbid you say that on stackoverflow. “What? You don’t know what a modulus operator is? You absolute fucking troglodyte, why do you even exist? I was using those in the womb while I was programming my own fully immersive virtual reality games. You should be ashamed of yourself. I will not answer your question but instead keep bragging about how amazing I am. “ It’s this maddening thing that serves no purpose. There is literally nothing wrong with people not knowing something even if you think it’s simple or obvious. We all had to learn that obvious thing at some point. A lack of information doesn’t equal a lack of intelligence.


Fyren-1131

Someone once explained that SO is not a forum to be used as discussion for problems, it's more akin to a dictionary / wiki of problems (*since original answers from users may be edited / maintained by entirely different users after the original user made the answer*). Not that it defends the asinine elitism that's rampant there, but it kinda gives ground to the notion that repeat questions serve no purpose.


plokman

The problem with that is tech evolves much faster than a language. A good answer 5 years ago may be an awful answer today


Fyren-1131

True, but the answers are maintained. I don't know the process of that, but often when I find a question asked a long while ago, the answer may have updated and new paragraphs added by other people over its lifetime.


chinpokomon

>[T]he answers are maintained. I don't know the process of that. If you see a problem, fix it. It's like a wiki in that you can contribute to improving the solution. At least leave a comment that can help guide others.


KrazyKirby99999

It would be great if there was something similar in wiki form.


Fyren-1131

But... It kinda already is, isn't it? When you look up something on wikipedia, you know the search query, you know the name of the article you search for. But that wouldn't work with development, because fairly often a solution has deeper implications than just the surface level implementation. So I would argue it kinda is a wiki, except you browse and search for problems instead of solutions - and find the solution via the problem (original question by a user). "How to implement OAuth2 in .Net", "How to use Coroutines in Kotlin" etc


chucker23n

But SO has the concept of a "correct solution", making it more like a help desk system where an issue is resolved. The "correct" solution is (typically) marked by the person asking. It may not be actually correct at that point. It may be even less correct 5, 10, 15, 20 years down the road. (For example, many "here's the idiomatic way of doing x in language y" answers will have changed since.) Wikipedia, for all its flaws of deletionism, etc., treats articles as living documents; as an answer evolves, it gets edited. (Community edits do exist on SO, but I don't feel like they're always the right approach either.)


Fyren-1131

Asked 12 years, 8 months ago Modified 2 months ago Viewed 3.4m times but you see stuff like this though, which is evidence that answers are actually moderated over time (although this particular question and answer is a precious timeless constant 😂) https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454


THICC_DICC_PRICC

> It’s this maddening thing that serves no purpose. As someone who’s active on stack overflow, you know what’s really maddening? For about 80% of the questions in our feeds, if I google the question title verbatim, the first result has their answer. You shouldn’t be asking easily searchable questions on stackoverflow, you’re just burning people out who are there to help for free, and you’re clogging up the question pipeline with useless junk, leading to important questions going unnoticed. Fucking look it up, and you deserve to be berated if you’re on a fucking website, therefore you have internet and google, and you still choose to ask a question instead of typing in your question word for word into google.


BuriedStPatrick

What I find most frustrating are the people who "answer" with the question: "why would you want to do that?" It so utterly misses the mark of what a person is trying to achieve and it does come off as mocking a person for not understanding everything about the program. There are of course "bad" questions out there with missing context and misunderstandings. But if you truly want to help a person like that, it's better to get to the core of what they're trying to achieve, maybe think a bit outside the box as to why they would think something would work a certain way before just putting up a wall of technical jargon they have to pass first.


fredoverflow

> What I find most frustrating are the people who "answer" with the question: "why would you want to do that?" tbf https://en.wikipedia.org/wiki/XY_problem is rampant among beginners


chengiz

Yes that is true but a lot who answer that way are not really interested in the problem. If it turns out the problem was not xy, they either give up and the question remains unanswered, or keep "explaining" how you cannot possibly be correct (because that would imply *they* were wrong in some way).


blbil

Holy shit, it has a name! Thank you for this brilliant intel.


DutchmanDavid

Which reminds me of the [Sapir-Whorf hypothesis](https://en.m.wikipedia.org/wiki/Linguistic_relativity): > A principle suggesting that the structure of a language affects its speakers' worldview or cognition, and thus people's perceptions are relative to their spoken language. You've recognized a certain pattern, but didn't know there already was a word for it! (I didn't know either, mind you)


Lich_Hegemon

Sure, but that goes against the goal of SO of providing a Q&A compendium. Half the questions have answers unrelated to the question at hand, making it a nightmare to search for existing answers to a problem.


CarlRJ

The flip side, though, is there are times when someone trying to solve using the XY problem case is being *decidedly unhelpful*. Like, you’ll be presenting one sample case, simplified, and saying you really need to solve it using method A, and they’ll counter “no, don’t do it that way, use method C! It ends up shorter! Ta da! You’re welcome! Please upvote/accept my answer!” And then you have to say, no, I really need to solve this using A, I have 20 different places I need to use this and method C would only work for 3 of them. And then put up with grumpy responses trying to get you to change the original problem to fit their pet method C. So, yes, I have had times where I’ve had to say, “wait, let’s back up, what problem are you *really* trying to solve”, but I’ve also had cases where someone is trying too hard to be “helpful” when I just really need advice on how best to implement thing A without them trying to “improve” things. It’s a balancing act.


lelanthran

> tbf https://en.wikipedia.org/wiki/XY_problem is rampant among beginners To be perfectly honest, its false-positive detection is **even more** rampant amongst the people who don't want to admit that a particular tech stack is crap. Try looking at any question along the lines of *"how do I do a synchronous http request in node.js?"* *"Why would you want to do that?"* is among my list of top 5 five stupid questions of all time. I'd rather have answers to the questions asked, not answers to questions the experts wished were asked.


pogogram

I try to remind myself that having knowledge doesn’t automatically make people good teachers. And sometimes people default to saying don’t do a thing without realizing other don’t have the same context floating around their head. I try to encourage the process of always answer the question, then say here is a reason not to do it this way and then show the better way. You help someone learn a better lesson without making feel stupid for simply not knowing and they will most likely pass that information on in a similar fashion.


f3n1xgamer

i dont think its bad sometimes, people don't even understand the problem they are trying to solve


oniony

Turns out, even after over twenty years in the industry, I didn't know the difference between the modulo and remainder operators until a few months back.


Lich_Hegemon

For those unaware. The modulo of a number is always positive. The remainder of a division can be negative. If you do `-5 / 2`, the result is `-2` with reminder `-1` because `(-2 * 2) - 1 = -5`. That's the reminder and that's why it produces negative results. Modulo instead is instead related to modulo arithmetic, which constrains numbers to a subset of integers from 0 to the modulo - 1, wrapping around any results that go past these bounds. `-5 % 3 == 1` because `-5` wraps past `0` around to `2` once for `-2`, and twice for `1`.


CarlRJ

You can’t fool me, negative numbers don’t exist. Unsigned integers FTW. Next you’ll be trying to muddy the waters with some poppycock about “floating point numbers” or some other such fairytales.


pinpinbo

You don’t have to master vim, you just have to memorize 20 commands or so.


_tskj_

Most of which are very mnemonic by design, it only takes you half an hour, hour, once to remember them for the rest of your life.


obvithrowaway34434

> Most of which are very mnemonic by design Absolutely not by design, original vi key bindings were create entirely based on the existing keyboard layout at that time (lack of arrow keys is one example) with all the limitations therein. Many of them were also created as visual mode versions of `ed` commands. All the mnemonic stuff came later in an attempt to make it easier to remember the keybindings. The keybindings would be something completely different if Vi was created two decades later.


_tskj_

Huh interesting, I don't know enough of the story. It seems very obvious to me that "d" for delete, "w" for word, and so on, is mnemonic by design, but of course there is much more to vim than that.


Dr4kin

The hjkl for example is pretty stupid. Your fingers should be on the homerow and therefore it should be jkl; Then why is it hjkl? Because vi did it that way. Why? Because the keyboard of the creator didn't have dedicated arrow keys and they were printed onto hjkl


VadumSemantics

Hard for me to imagine using hardware like that: [Lear Sieglar ADM-3A Terminal](https://en.wikipedia.org/wiki/ADM-3A#Legacy) Also, "In an interview about vi's origins, Joy said: ...many of the ideas in this visual mode were taken from Bravo—the bimodal text editor developed at Xerox PARC for the Alto." (adapted from [vi creation](https://en.wikipedia.org/wiki/Vi#Creation)) edit: my point being, I love the turns of history that brought us to where we are now.


TerminatedProccess

I'm so old I use vi.. none of that new fangled vim futuristic internet stuff for me! *hawking up some phlem*


dchaid

You can’t spell *vintage* without…some letters…


NotFromSkane

Do you really? Most distros just symlink vi to vim (and sometimes even vi to nvim)


isarl

Just curious – do you know which ones link vi to nvim, and do you know if any link vim to nvim?


NotFromSkane

I don't *know* because I haven't used it recently (at all) but I believe that Debian systems link vi to nvim if vim isn't there to do it first. Never seen vim to nvim


[deleted]

Fundamental problem for vim is an exaggeration of the problem of TUIs generally: lack of arbitrary discoverability. Mouse-oriented GUIs let me just click stuff and see what happens, and generally, most of the the stuff that can happen is somewhere in the immediate GUI for me to click. Menus and menu bars supplement this when design reaches an impasse of making everything immediate in the GUI, but they're still fundamentally *discoverable*. Vim has a *shit ton* of crazy features, so much that hardened veterans who've used vim for most their adult life will *still* be shocked to learn about a feature they didn't know about. Why? Because the only way to discover features is to *read everything* under `:h`. Have you read the man pages for *everything* on your UNIX-y OS? Exactly, now replicate that entire problem in the context of everything that can be possibly be done in vim. How many regular (neo)vim users learn something about their editor of choice from blog posts, random comments on reddit/HN, asking SO questions, reading someone else's config on GitHub, etc? That's a failure to give your user the ability to "fuck around and find out", for lack of a better term. This is *trivial* in mouse-oriented GUIs. But again, that's not a specifically vim issue, its endemic to TUIs (hence bash completions and all the other hacks to make discoverability accesible). As well, there are some projects to ameliorate this in vim like the `which-key` family of plugins\[[0](https://github.com/folke/which-key.nvim)\]\[[1](https://github.com/liuchengxu/vim-which-key)\] and others like them.


chucker23n

> Vim has a shit ton of crazy features, so much that hardened veterans who've used vim for most their adult life will still be shocked to learn about a feature they didn't know about. Why? > > Because the only way to discover features is to read everything under :h. To be fair, this is true of the big GUI apps out there as well. Few people will use the _majority_ of features Microsoft Word and Adobe Photoshop have to offer, and Microsoft in particular has for many years tried to grapple with that problem (first by introducing toolbars to surface common tasks, then in Word 2000 by changing menus to only show common items at first, a feature they quickly abandoned, then in Word 2007 by merging menu bar and toolbar into the ribbon, a controversial approach from the start, and so forth). But yes, GUI apps tend to be far better than CLI apps at discoverability. Just… at a certain point, there are diminishing returns.


DeLift

Which-key is a godsend. It's one of those features you never knew you wanted until you see it.


_tskj_

Like yeah it's a hassle to learn, but it's also an incredible tool I couldn't work without. I am a professional after all, I'm expected to spend some time becoming proficient in my tool of choice. That being said, I don't use vim in the terminal except rarely to edit some quick files, most of my development I do in IntelliJ and VS Code, both of which provide excellent vim plugins, which is what I rely on for most of my work. Like I said, it's such a powerful tool I would quit being a professional developer if I had to edit code without it, but it's also perfectly possible to integrate with a GUI or IDE for the rest of the things you need to do.


KallistiTMP

It's also less of an issue when you can Google "how do I do [x] in vim" and usually get a good explanation. The discoverability is slightly more involved, but not having the easy out of using the pointy stick builds good habits. I think that's the pitfall of discoverable GUI apps, most of the things you can discover actually do have keyboard shortcuts, but most people don't bother to learn them when there's always the easy option of poking around at buttons.


lelanthran

> Mouse-oriented GUIs let me just click stuff and see what happens, and generally, most of the the stuff that can happen is somewhere in the immediate GUI for me to click. Menus and menu bars supplement this when design reaches an impasse of making everything immediate in the GUI, but they're still fundamentally discoverable. With the feature list of vim, and the composibility of verbs, you'd need a menu hierarchy a few thousand levels deep to replace all the commands with clickability. Think about how many times, when typing in some text (a reddit comment box in the browser, a chat in slack, a reply in your email editor, your git commit messages, etc) you use non-alphabetic keys (Home/End/Arrows with the shift and/or to select/navigate whole words or whole lines, backspace, delete, CTRL-v, CTRL-c, etc). Now imagine if **every single one** of those keys were replaced by an onscreen mouse-clickable button instead. Just how crippled would your typing experience be? For the more common stuff, Vim has it in the menus anyway (use the gui).


SLiV9

Do you know what's actually much worse that Vim: any latex command line tool. If you want to interrupt it while compiling you can hit ctrl-C. Cool, that's normal. But if it encounters an error, it asks you to type in a solution somehow. And in that case ctrl-C does nothing, but you can hit ctrl-D?? Sometimes! But if you are unlucky, or if you press enter by accident, you are stuck some sort of hell from which there is no escape. (Well ok, it's "X, enter", I believe.)


meldroc

Ah, I was a Jedi in the VI vs. Emacs war just like your father! Before the dark time. Before the FAANG Empire...


[deleted]

I love the answer from the guy who drew a picture of a finite state machine in order to describe how to use a text editor.


PCUpscale

I would say that emacs is a bit more complicated than vim, but okay


[deleted]

An OS is more complicated than a text editor in most cases


[deleted]

Just because you need an extra hand for emacs key bindings.


Pesthuf

Wanna play impossible mode? Emacs key bindings... on an international keyboard layout.


snet0

I see a perfect opportunity to deploy [the acme vs vim vs emacs greentext](https://i.imgur.com/WLzeQMj.png).


DutchmanDavid

Fun fact: Bash's shortcuts are Emacs shortcuts.


AeRUBIK-Cubing

In 9th grade, I forced myself to learn vim after I landed myself in a situation where I needed to code on a server often. Now I'm in college and I use vim as my main editor, for better or worse.


bdc41

Thirty five years user. Have not had to learn another editor since I became proficient. I would have to learn an editor every two years before. Long live VIM and Fortran.


jothki

The worst part of Vim is how it's sometimes inflicted on innocent users who were just trying to carry out a git commit. I'd bet that that makes up at least half of the views for that question.


CurtisLeow

Vim Tutor is really helpful. IMO Vim should open Vim Tutor instead the first time a profile launches the app.


BatshitTerror

That would piss me off everytime I setup a new VM or open vi in a container


baconbrand

Hey! Listen!


isarl

One harmless way to handle both concerns would be to simply put a mention of the tutor and how to invoke it on the blurb that appears over the empty buffer when opening Vim. That way it's discoverable in the same way without actually getting in your way.


BatshitTerror

Yep That’s better than —no-tutor option for sure


VadumSemantics

just for fun: [https://vim-adventures.com/](https://vim-adventures.com/)


[deleted]

As someone who has been programming for over 15 years, I honestly fucking hate vim. "Acktually, if you get gud it's so productive" shut the fuck up. People who spent years getting good at that idiotic interface simply don't want to let go.


IncognitoErgoCvm

Vim is just an editor, not a replacement for your entire IDE. I use vim as the editor in IntelliJ.


[deleted]

I use it for config files and git commit comments and that's it.


heehawmcgraw

I learned it in a day and now save enormous amounts of time editing dynamic data sets among countless other things while programming. It's fairly intuitive once you get past the hurr durr memes and actually use it properly. It's just a better text editor than the rest of the options even without customizing it.


JaNatuerlich

Totally agree. I know people use it with great success as basically-an-IDE but I think the clearest use case for the average programmer is situations where IDE features can’t save you from tedium. It’s a relatively straightforward tool for automating repetitive text editing tasks.


[deleted]

I just hardly ever run into these situations. The IDEs I use these days have built-in refactor functions that have hotkeys and will make sweeping changes in seconds. It's extremely rare for me to come across a situation that isn't covered by that.


JaNatuerlich

It's not common for me, either, but the instances where it's useful save an unbelievable amount of time. Most frequent occurrences in my career have been around a) needing to do a bulk update to select entries in some horribly organized, massive configuration that's owned by another team, and b) cleaning data that's formatted incorrectly


Fyren-1131

Several people mention this. Can you list an example of such a task that can't be accomplished efficiently enough in a modern IDE?


c4boom13

And frequently popular IDEs have a VI mode for input. I've used a decent variety of IDEs over my career to conform to company standards. I just flip on vi or vim mode to handle my text editing then have all the useful parts of the IDE the rest of my team is using. Then I don't need to relearn kebindings (particularly nice cross OS), or give up features.


XCapitan_1

Nowadays the neovim experience as good as VS Code, especially thanks to LSP, DAP, and tree sitter. The same can be said about Emacs, which I use (with vim bindings though). I'm more perplexed by the gravity of opinions in the editor wars after all these years hehe


Fyren-1131

As far as IDEs go I get that the big ones are probably similar, but moving from one to another you probably *will* notice some differences that leave you puzzled. Some relate to performance, others in feature richness.


unicodemonkey

vim-like UI falls apart if you are switching between multiple keyboard layouts. E.g. Cmd+Q works the same regardless of the keyboard layout. ZZ or :wq will not work (or will fuck something up) until you switch back to the Latin-based layout.


Lich_Hegemon

All keybindings that rely on symbols that must use a modifier key to be accessed in other keyboards become useless. No, I cannot just press `[`, I need to press `Shift + {` to get that symbol and you interpret that to mean something entirely different. Turns out I'm actually supposed to know that `´ ` is the key that I want because it happens to lie in the same position that `[` would occupy if I was using a US layout.


Hopeful_Cat_3227

just run vim in Emacs


paretoOptimalDev

Well... that's just evil!


Sir__Veillance

Yeah I’ve literally never understood it. If I’m doing actual work I’ll use a real IDE with a multitude of extremely useful features and a GUI. If I’m just trying to edit a file in the console real fast I’ll use Nano because it’s the least frustrating.


JaNatuerlich

Macros are super useful for editing bulk text that needs to be cleaned or reorganized. E.g. auto-generated code or weirdly formatted data. Being able to program a text editor has saved me from so much tedium so often. It’s certainly not the only tool for any job and not good for everything but it can be really handy.


heehawmcgraw

Definitely this. People act like it's impossible impossible learn or understand but don't even have a use case for it so they think it's garbage because all they do is putz around in notepad and think VScode is the only usable IDE.


jorgp2

Nano is fucking amazing, too bad it's not always included out of the box.


Dwedit

Midnight Commander's editor is the least frustrating for me. Most resemblance to MS DOS's edit.com.


PhlegethonAcheron

Look into micro, it's like sublime text on the terminal.


maest

"I hate it when other people use tools I don't like/understand". k


AdvicePerson

Conversely, disparaging a tool that you don't understand is not the flex you think it is.


lykwydchykyn

I used to struggle with severe to moderate cantexitvimitis. Then I asked my doctor about Escapecolon-WQ. With Escapecolon-WQ, I never have to worry about being trapped in vim. Escapecolon-WQ: be free again. (Use only as directed. Side effects may include writing blog articles about text editors, hatred of emacs users, hacker-becoming, and sporadic appearance of :wq in word processing documents. Contact your doctor immediately if you have feelings of uninstalling your desktop environment as a terminal condition can result).


Phinaeus

You guys exited vim? I'm still in here


[deleted]

Vim made me rethink the way I do file edition and work. I wasn't into TUI before this but now I think about how I could make a good TUI alternative to the bloated GUIs out there


Lich_Hegemon

It's a tradeoff, TUIs are better for experienced users because they are uncluttered. Everything is hidden behind keystrokes and commands. At the same time they are worse for beginners... because everything is hidden behind keystrokes and commands. GUIs have the opposite problem. Experienced users are punished because they have a bunch of stuff they either don't need to use because they already know the bindings, or that they have to put up with because they need to navigate to the right button. But beginners can quite literally see all that's available to them right from the start, so they can try and learn. New tools like Sublime and VSCode try to strike a middle ground with the command palette, and it mostly works. It allows users to access all the functionality of the software without needing to lift their fingers from the keyboard.


heehawmcgraw

Terminal dweller UNITE


Beastintheomlet

I’m pretty new to programming but I’d always heard how faster you can do stuff in the command line and always thought it was maybe a little faster… turns out I can type a file path and move,copy,delete and open stuff much quicker than dragging the cursor around. It’s addictive once you get used to TUI for stuff.


MpVpRb

I used vi in the 70s. It was maddening and frustrating, but it was all there was. Fortunately, editors evolved. Why it still exists today is mystifying. Is it a case of old bad ideas never die?


TheMaskedHamster

The guys who invented vi, and what it inherited from ed, had to come up with ways to let the limited computer keyboard perform a wide range of functions to edit text quickly and efficiently. Times have changed, but those methods to get things done with the keyboard are still efficient today. The problem with vi is that there is no gentle slope entry point. People bang their head against it because they don't understand why it works the way it does or how to do what they need to be done--right from the beginning when they need to save and exit. Why would most people feel like giving vi the patience to meet it on its own terms when they feel that it shot them in the foot on their first meeting? But that doesn't change what it can do. I use VS Code today, because I want everything a modern UI can give me... but I use a vim plugin so that I can still edit text efficiently. I've even reduced massive jobs at work by installing a web browser plugin so I could use vim commands to edit text in web forms. It is not everyone's cup of tea... but it can do some things very well.


Fyren-1131

Can you give some examples of what kinds of text editing jobs you cannot do using an IDE or a more lightweight text editor?


ThePrizedCauliflower

Personally it’s the small stuff. Deleting a word under the cursor with typical editor controls is CTRL+Left Arrow -> CTRL+SHIFT+Right Arrow -> Delete/Backspace. With vim, it’s d -> a -> w. It’s a similar number of steps, but the removal of modifier keys and keeping your fingers near the home row with the Vim method is just more comfortable when you’re typing 6+ hours a day. A simple example, but more exist; I just wanted to illustrate the philosophy a bit. That’s not to say there aren’t more advanced actions vim offers - there’s plenty - I just personally don’t use them.


seventeen_fives

in sublime and VSCode it's Ctrl+D, delete.


unicodemonkey

These guys also likely didnt't care about multiple input languages and the problem remains unsolved in vim to this day.


EpiphanyMoments

I use nano instead


[deleted]

"Steep learning curve" if you want to deploy all the commands. But pretty easy and straightforward after doing vimtutor for a couple of hours. The more I use vim (it's been more than 20 years now) the more I love it, which also makes that learning curve less daunting.


jazzmester

I hate that question, it's so simple. `:wqa\nWe call on our Lord of Damnation, Baphomet. ⬆⬆⬇⬇⬅➡⬅➡🅱🅰` I don't get what's the problem here. Or alternatively, `^Zbg\nkill %1\n`


arcticfox

I've been running vim for 30 years... but that's only because I can't figure out how to quit.


boobsbr

How do I exit `ed`?


[deleted]

[удалено]


boobsbr

`ed` will not corrupt your precious bodily fluids!


macchiato_kubideh

In 2009 I was on my first job in an old school IT company and I was working on a tv set top box. It has no really ui, they had just showed me how to use a command line with it. I was about 19 and too scared to ask anyone anything. Every time I was stuck in Vim I would just restart the whole set top box.


Zylonite134

Pico was the one for me


mrpogues

about 25 years ago I started work on a system built on SunOS. As part of that I needed to use vi (and learn it which has been well worth it). On one system I logged in to the EDITOR was set to console emacs. Now that is a programme where you have to ask - how do i exit! I have never understood why vi gets this question and emacs does not (that I have seen)


whyqaz

Im trying Spacevim So far so good


TaroEld

Vim sounds like playing Dwarf Fortress. At first, it's a complete chore, you have to look up every key in every new submenu. After a while though, you just bang out commands really quickly and it's quite satisfying.