r/programming • u/Skenvy • Aug 06 '22
Vim, infamous for its steep learning curve, often leaves new users confused where to start. Today is the 10th anniversary of the infamous "How do I exit Vim" question, which made news when it first hit 1 million views.
https://stackoverflow.com/questions/11828270/how-do-i-exit-vim158
u/efvie Aug 06 '22
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!
22
u/steven4012 Aug 06 '22
Does it allow for new text objects? Vanilla vim's "language" feels too limited
→ More replies (9)13
u/efvie Aug 06 '22 edited Aug 06 '22
I don’t think either currently allows defining those on top of the extension, but you could in the extension itself. And they’ve already added an 'expanding selection'. 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.
17
u/lelanthran Aug 06 '22
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.
4
u/efvie Aug 06 '22
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.)
→ More replies (2)7
u/KallistiTMP Aug 06 '22 edited Aug 30 '25
entertain soft dam license fuel ripe smell shelter person rainstorm
This post was mass deleted and anonymized with Redact
6
u/efvie Aug 06 '22
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.
→ More replies (6)
641
u/FriedRiceAndMath Aug 06 '22
I just hit Escape about 75 times to make really sure it’s in command mode, then :q
17
u/marssaxman Aug 06 '22
I don't even bother, I just open up another shell and
killall vi.18
4
u/dagbrown Aug 07 '22
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.
32
u/hapygallagher Aug 06 '22
I really don't get what's so hard, there's a purpose built exit vim button right on the case of your computer.
7
u/MonokelPinguin Aug 06 '22
Doesn't work in case you are stuck in ex mode. (you need to enter the visual command first.)
16
11
u/devraj7 Aug 06 '22
Rookie move. You should use
:x.9
u/AnsibleAdams Aug 06 '22
:q quits no save
:wq saves file, then quits
:x saves file, then quits, uses one less keystroke
38
u/lelanthran Aug 06 '22
: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 codeHow 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:qthe commit goes ahead with whatever you entered into the editor.If you
:cqgit gets an error return from the $EDITOR, and aborts the commit, thus saving you the time needed to undo that commit.→ More replies (4)6
u/CarlRJ Aug 06 '22 edited Aug 06 '22
Command Action :q<CR> quits vi if nothing needs saving (error if unsaved changes) :q!<CR> quits vi discarding any unsaved changes :wq<CR> writes file, then quits :x<CR> writes file if changed, then quits, using one less keystroke than :wq<CR> ZZ writes file if changed, then quits, using one less keystroke than :x<CR> → More replies (4)7
u/FriedRiceAndMath Aug 06 '22
:x:x:x
^c^x
Eat flaming death:xUnclear how to exit using this sequence. Please advise:x
EDIT: had to workaround Reddit markup parser
3
3
→ More replies (32)2
183
u/turniphat Aug 06 '22
I first struggled with exiting vim 26 years ago.
28
Aug 06 '22
not to call you an idiot, but why dont you reboot?
24
u/liquidivy Aug 06 '22
Massive props to their power company though for not having a single outage in that time.
5
Aug 06 '22
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.
→ More replies (1)5
25
u/tubbana Aug 06 '22 edited May 02 '25
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
23
Aug 06 '22 edited Apr 08 '25
market seemly air capable observation retire gold longing fall sort
This post was mass deleted and anonymized with Redact
4
Aug 07 '22
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?
2
u/greebo42 Aug 06 '22
I just read thru the post, and I really like that state machine!
Now I can hit <:> or <ESC> with intent
40
u/noneofthatmatters Aug 06 '22
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.
30
u/THICC_DICC_PRICC Aug 06 '22
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
4
u/glacialthinker Aug 07 '22
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.
61
u/pinpinbo Aug 06 '22
You don’t have to master vim, you just have to memorize 20 commands or so.
16
u/_tskj_ Aug 06 '22
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.
→ More replies (5)35
u/obvithrowaway34434 Aug 06 '22
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
edcommands. 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.11
u/_tskj_ Aug 06 '22
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.
→ More replies (3)2
2
u/maquinary Aug 07 '22
I am glad to see that. I just want to turn (Neo)Vim into an IDE like Visual Studio Code.
2
u/phire Aug 07 '22
I don't think I ever got beyond memorising about 5 or 6 commands, and I used vim as my primary editor for several years.
Most of the time I was just using it as nano with multi-line delete commands.
282
u/pogogram Aug 06 '22
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.
127
u/Fyren-1131 Aug 06 '22
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.
→ More replies (6)68
u/plokman Aug 06 '22
The problem with that is tech evolves much faster than a language. A good answer 5 years ago may be an awful answer today
36
u/Fyren-1131 Aug 06 '22
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.
→ More replies (1)16
u/THICC_DICC_PRICC Aug 06 '22
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.
→ More replies (9)41
u/BuriedStPatrick Aug 06 '22
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.
73
u/fredoverflow Aug 06 '22
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
9
u/chengiz Aug 06 '22
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).
→ More replies (13)6
11
u/pogogram Aug 06 '22
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.
→ More replies (9)6
u/f3n1xgamer Aug 06 '22
i dont think its bad sometimes, people don't even understand the problem they are trying to solve
→ More replies (11)10
u/oniony Aug 06 '22
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.
33
u/Lich_Hegemon Aug 06 '22 edited Aug 06 '22
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-2with reminder-1because(-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 == 1because-5wraps past0around to2once for-2, and twice for1.→ More replies (1)
46
u/TerminatedProccess Aug 06 '22
I'm so old I use vi.. none of that new fangled vim futuristic internet stuff for me! hawking up some phlem
14
→ More replies (2)15
u/NotFromSkane Aug 06 '22
Do you really? Most distros just symlink vi to vim (and sometimes even vi to nvim)
→ More replies (3)4
u/isarl Aug 06 '22
Just curious – do you know which ones link vi to nvim, and do you know if any link vim to nvim?
5
u/NotFromSkane Aug 06 '22
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
→ More replies (3)
179
Aug 06 '22
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][1] and others like them.
48
u/chucker23n Aug 06 '22
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.
→ More replies (6)7
u/DeLift Aug 06 '22
Which-key is a godsend. It's one of those features you never knew you wanted until you see it.
17
u/_tskj_ Aug 06 '22
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.
→ More replies (2)6
u/KallistiTMP Aug 06 '22 edited Aug 30 '25
worm party narrow aromatic thought voracious enjoy seemly pot caption
This post was mass deleted and anonymized with Redact
→ More replies (5)→ More replies (17)3
u/lelanthran Aug 06 '22
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).
16
u/SLiV9 Aug 06 '22
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.)
→ More replies (1)
6
u/meldroc Aug 06 '22
Ah, I was a Jedi in the VI vs. Emacs war just like your father! Before the dark time. Before the FAANG Empire...
6
Aug 07 '22
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.
32
u/PCUpscale Aug 06 '22
I would say that emacs is a bit more complicated than vim, but okay
15
29
Aug 06 '22
Just because you need an extra hand for emacs key bindings.
7
u/Pesthuf Aug 06 '22
Wanna play impossible mode?
Emacs key bindings... on an international keyboard layout.
→ More replies (1)5
u/snet0 Aug 06 '22
I see a perfect opportunity to deploy the acme vs vim vs emacs greentext.
→ More replies (3)0
5
u/bdc41 Aug 07 '22
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.
22
u/CurtisLeow Aug 06 '22
Vim Tutor is really helpful. IMO Vim should open Vim Tutor instead the first time a profile launches the app.
36
u/BatshitTerror Aug 06 '22
That would piss me off everytime I setup a new VM or open vi in a container
29
12
u/isarl Aug 06 '22
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.
→ More replies (1)7
2
u/heehawmcgraw Aug 06 '22
Maybe the first 10 time so they can be reminded of :q when they forget 3 months later. Or it should just replace the opening page with a font 120 bolded :q
9
u/jothki Aug 07 '22
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.
139
Aug 06 '22
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.
55
u/heehawmcgraw Aug 06 '22
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.
→ More replies (46)38
u/IncognitoErgoCvm Aug 06 '22
Vim is just an editor, not a replacement for your entire IDE. I use vim as the editor in IntelliJ.
→ More replies (3)14
32
u/XCapitan_1 Aug 06 '22
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
4
u/Fyren-1131 Aug 06 '22
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.
6
u/unicodemonkey Aug 06 '22
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.7
u/Lich_Hegemon Aug 06 '22
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 pressShift + {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.→ More replies (1)8
73
u/Sir__Veillance Aug 06 '22
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.
7
3
u/Dwedit Aug 06 '22
Midnight Commander's editor is the least frustrating for me. Most resemblance to MS DOS's edit.com.
→ More replies (28)3
19
10
u/AdvicePerson Aug 06 '22
Conversely, disparaging a tool that you don't understand is not the flex you think it is.
13
u/Pesthuf Aug 06 '22
Being an expert in Vim makes you amazing at quickly editing text... in ways that are usually pretty irrelevant for code editing.
→ More replies (2)→ More replies (21)2
u/a_nobody_really_99 Aug 07 '22
Why are you upset that others enjoy something you do not? They be them using their vim and you be you dude. There are going to be cases where you log into a minimalistic device with a small memory footprint and limited storage and guess what, it has vim and no other editor. You will be glad you knew vi then. Just because someone knows vim doesn’t mean they don’t use other editors. It just means they have an extra tool. It never hurts to to know more.
3
u/lykwydchykyn Aug 07 '22
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).
→ More replies (1)
9
22
u/MpVpRb Aug 06 '22
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?
→ More replies (1)20
u/TheMaskedHamster Aug 06 '22
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.
13
u/Fyren-1131 Aug 06 '22
Can you give some examples of what kinds of text editing jobs you cannot do using an IDE or a more lightweight text editor?
→ More replies (27)→ More replies (2)3
u/unicodemonkey Aug 06 '22
These guys also likely didnt't care about multiple input languages and the problem remains unsolved in vim to this day.
→ More replies (2)
13
Aug 06 '22 edited Aug 06 '22
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
8
u/Lich_Hegemon Aug 06 '22
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.
→ More replies (1)4
10
u/Beastintheomlet Aug 06 '22
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.
4
4
Aug 06 '22
"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.
6
u/jazzmester Aug 06 '22
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
5
u/arcticfox Aug 07 '22
I've been running vim for 30 years...
but that's only because I can't figure out how to quit.
2
2
u/macchiato_kubideh Aug 06 '22
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.
2
u/mrpogues Aug 07 '22
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)
→ More replies (1)
2
2
u/TaroEld Aug 08 '22
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.
4
u/kaolinsoftware Aug 06 '22
I don't see what the problem is. You just write a script that uninstall and reinstall a it whenever you want to close it. 🤣🤣🤣🤣
3
3
u/CarlRJ Aug 06 '22
The real question is, why on earth would you ever want to exit the greatest text editor ever? All hail vi! And its descendent Vim!
2
u/vim_all_day Aug 06 '22
Don't know why anyone would ever exit Vim. Just leave it open in a tmux session all day.
3
2
u/Mister_Pibbs Aug 06 '22
Lol the funny part is it’s not difficult to remember when you’re done. But honestly vim to me just has way too much to remember getting started.
This message was brought to you by Nano. The superior editor.
2
2
u/llynglas Aug 06 '22
Why is <esc> : wq so difficult? It's so much easier than meta-shift-ctl atl-alt-x which is probably the equivalent on emacs (I have no idea as my eyes glaze after the first meta-shift or two)
3
u/nullmove Aug 06 '22
In Emacs keybindings are a loose alias to a descriptively named elisp function. So you can just type exit, and fuzzy matcher UI will show you the filtered candidates of commands.
...Except of course, it's not actually called exit-emacs or quit-emacs rather
kill-emacs, so yeah :/
2
u/billcraig7 Aug 06 '22
EMACS is the true way.
3
→ More replies (1)4
Aug 06 '22
EMACS = Esc-Meta-Alt-Ctrl-Shift, each of which has 36 characters to perform a command. And that’s not counting hit more than one at a time or sequences.
→ More replies (1)
1
1
1
1
1
u/ITriedLightningTendr Aug 06 '22
:q \o/
I had to use EMACs when working for Configura and their C++ fork.
Was cool but they literally, in the office, have a like 2 page single sheet printout of all their shortcuts.
1
1
u/tigershark37 Aug 06 '22
Never, EVER press CTRL+S out of habit. In case you are so foolish to do it the only way out from killing yourself is CTRL+Q.
1
1
1
1
u/ojebojie Aug 07 '22
I mean... I worked for 2 years in a company that only had Red Hat console (no UI),perl and VIM for a system that managed billions of dollars. It was not intuitive, but not really troublesome. I am now in a company where windows+Notepad++ and many IDEs are the norm. It's good, more intuitive, but the amount of work it takes when you need to do something just a bit different from the normal flow is frustrating.
→ More replies (1)
1
1
u/TheNiXXeD Aug 07 '22
I want a VIM designed with better UX and modern hotkeys. I think the closest I've found was micro but it's not quite what I mean.
→ More replies (1)
1
1
u/sirmasterdeck Aug 07 '22
My colleague uses vim exclusively. He says it’s because he doesn’t have the fine motor control required to use a mouse.
1
1
u/artanis00 Aug 07 '22
leaves new users confused where to start
Nah man, I know how to start Vim. It's stopping it that's the problem.
1
1
1
u/Sensitive_Bug7299 Aug 07 '22
Vim is like an IDE but for grandpas, thats all I know, I will leave myself out now…
1
1
Aug 07 '22
Ha! I didn't need this!
I just used Vim to develop new interfaces for all my apps, so I never have to exit Vim.
On a side note - I can't remember if my screen supports any colours other than black and white
1
u/zrvwls Aug 07 '22
Does anyone know any interactive exercises that scale up in difficulty and variability that you can do to get better at it over a week? Looking to eventually cutover to using it in vscode but want a regimented learning tool besides the tutorial. I found these but don't know if any are good
1
1
1
u/blipman17 Aug 07 '22
Yesterday the q key on my keyboard died and I didn't know how to exit vim on my laptop.
→ More replies (1)
1
u/motownmods Aug 07 '22
My first experience with vim was on an old arduino console back in 2014ish and I couldn't wrap my head around why it was so difficult
1
u/agnas Aug 07 '22
vim was the first editor I learn to use so for me was easy because I had no terms of comparison.
1
1
Aug 07 '22
It is like the song Hotel California, with vim:
"you can never leave!".
That part of the song fits vim too!
1
u/pornAndMusicAccount Aug 07 '22
How do you make a perfectly secure password? Have a new vim user try to figure out how to exit the program.
1
u/bartturner Aug 08 '22 edited Aug 08 '22
Investments with tech skills is something that normally is not a long term thing. You look for a shorter time horizon.
But for me there has been three HUGE investments I have made that have really, really paid off and we are talking that they have paid off for over 20 years now.
First was learning Vim over 25 years ago. Huge learning curve but so worth it. I push my kids to learn it in 2022 as it will pay off.
The second one was writing three TCP/IP stacks starting in the late 80s. The first without Comer. I wrote the first one in 1987 which is now 35 years ago!!! We had a Vax and no TCP/IP. So I wrote a user space stack.
At the time I was doing a lot of LAT, DecNet and X25 development. I just knew they would all go away. So glad I made the investment.
The second was to get around the cost of a SliP connection versus a foreign terminal. This was a long time ago. But ISPs use to charge a different rate for a foreign terminal versus an actual IP connection. SO I made it so you got IP for the cost of a foreign terminal account.
I only did SLiP and no PPP as that was a lot more difficult.
The third was the best one and also involved writing a little kernel on a box that we also built based on the 8086 chip. It was a device that talked SNMP and was used to interface with UPSs. We sold the device to all the major UPS providers at the time.
The third one was learning GNU/Linux internals and this was before the V1 kernel. I started in late 1991. This one has also really paid off.
1
743
u/HerbyHoover Aug 06 '22
That's great. In the interest of sharing another great StackOverflow VIM post. Your problem with Vim is that you don't grok Vi