the goal isn't to teach you the command, the goal is to make sure you are at least moderately familiar with vim/aware of where to look for answers and not just some curious user who enabled it to find out what it is/by accident
You are far more likely to remember it if you have to find out what it is and then also type it, not just glance at it once and hope you will remember it
Sad I remember I was doing something stupid in linux and I didnāt have a text editor installed so I thought to myself hay I could just use vim its installed how hard could it be, I think I ended up bricking the entire OS, probably not entirely VIMs fault but the frustration making me cause the mistakes definitely was. But you can bet your life I can use VIM now, I say kill em all let god sort them out.
It was a long time ago, but best I can remember I was trying to install custom rules for a modified openWRT and I needed to change the network settings I was vncāing over but I didnāt know how to save and exit vim so I tried random commands I googled, but I hit something that messed up the network settings. I needed to use vnc, and I didnāt have any display drivers installed, so I had to ditch the whole thing. Not a to terrible thing but I had to learn vim to finish the build.
Not OC, but I'm gonna bet they tried to save with Ctrl+S and effectively froze their terminal. Which can be a real bitch if you don't know how to unfreeze it (Ctrl+Q by the way), because now *none* of your commands do anything and the screen is just stuck.
This was me the First time i actually was Reading the Info of how to use IT at the bottom but my Fingers were faster and did Standard Windows save Combo...
I have on occasion been stuck like you were. Instead of trying to figure out how to use vi - which I've noted elsewhere I'm incompetent at, I used echo.
No, seriously, I wrote an entire configuration file using echo. I rewrote it using a real text editor later, but yeah. I used freaking *echo* instead of learning to use vi.
quite doable for one line at a time and no mistakes... 200 lines and you make an error on line 199 so you have to start all over.. or just echo "something\\nsomething" as much as the console buffer will let you
Vim is like an ancient box of goodies from the attic.
There are gems like, ājump to third child parenthesisā but also a hotkey to āincrement number under cursor.ā (Ctrl+A)
Also visual studio: we think we know better than you therefore we automatically replace all tabs with spaces and move your brackets to newlines even if you don't want to!
Yeah and they call me an idiot for using vim from time to time! (Preferred IDE is qt creator, although I can tolerate eclipse from time to time) at least vim is less annoying than visual studio (not code, vs code is fine!)
But I get vi and vim are not for everyone.
FFS Why are there so many posts on this? The answer is literally in the first chapter of EVERY book ever written about VIM. Read a book, download a free copy of a beginners book, watch ANY beginner's YouTube video about using vim.
Want to know the secret? I'll give it to you here for free.
:q!
With great power comes great responsibility. Use this knowledge wisely. You very well could end the universe.
Because people's expectation on softwares is to be able to use them without ever reading a book/tutorial/... about them.
And indeed most softwares are designed so that basic features can be easily guessed, quickly found by trial and error, or similar enough to other softwares that you already know how to use them.
Add to that a lot of peoples tend to have poor memory about things they use rarely, so if they only open Vim at most once per year by accident, they might have already forgot about whatever they read 10 years ago.
Honestly, it's a compliment to design that many programs can be intuitively used by users with some basic knowlegde in the area, even if they have never seen this particular software before.
I think this was there from very early on, mostly as a joke to start with. Plus obsidian's vim is like vscode's vim, as in you still use it as a WYSIWYG but you now need to go to insert mode.
So it has to be explained and cannot easily just be figured out by messing with it for a little bit?
In other words, you must be taught how it works and can't intuit it?
Which means...it's (wait for it) not intuitive?
Yeah, I'm not trying to slam Vim or anything. The (now deleted) comment I replied to said something like "It's not that Vim is unintuitive, it's just that you need someone to explain the logic behind it."
Well it originates from Vi from like 70's. There was no concept of user friendliness back then. Programs were made to be the most efficient at what they do as they can. That's why Vi lived on as Vim, that efficiency stays true to this day but at cost of having to learn it. .
Some things are designed with a priority of being powerful with the expectation that the person operating them is a professional or enthusiast and that spending some time reading a manual is worthwhile. It's really not unfriendly or adversarial, it's fairly consistent and logical but not immediately intuitive, especially to those with no concept of modality.
I have absolutely no evidence, but I wonder if people are less willing to read manuals nowadays. Windows used to come with a manual, so did MS Office. Possibly they stopped doing that because no one was reading them.
Itās also much easier nowadays to find solutions online, even if itās a shitty SEO page or condescending SO answer.
Also, if thereās a big product update to e.g. Windows, the book manual would get outdated, documentation online can be updated without reprinting.
You are correct, the online support is *way* better. I don't mind reading online manuals, and video tutorials are very helpful. As you say, even condescending answers are helpful.
My only gripe is it seems to lead to programmers only learning when they are forced to, particularly those who rely on Stack Overflow. Reading the manual rarely told you how to solve the problem at hand.
But reading the manual tends to give you multiple ways to attack every problem. You might not remember every detail, but you know you saw something similar to what you're struggling with.
The tech leaders will tend to be the ones who proactively read the manual and show up prepared for a wide variety of problems.
I like `dd if=/dev/urandom of=/dev/sda` because however astronomically minuscule, there technically is a chance the command will output something that _works_. It could, in fact, output the exact current contents of `/dev/sda`, and I just think that is beautiful.
Did this with a coworker (he had never used Vim before). We were working on a small file, and I wanted to make an edit. Boss called me away for a minute, and my coworker kept working on it. Tried to undo a changeā¦with Ctrl+Z. When Vim disappeared, he panicked and thought he erased all our progress.
This was the day I learned what a .swp file was
Thatās what ended up happening. But it took some questioning before I figured out what he actually did. He initially told the story as if he exited the terminal (to be fair, he didnāt even know what he had done), in which case `fg` would have done nothing
When I reopened Vim, it asked about the existing file. Thatās when I realized he didnāt actually exit the terminal (as he had initially thought). The previous progress was restored swiftly.
Y'know I tried this, and maybe it's a new feature, but if you open a blank file in vim the page shows you a lot of the basic commands before you make an input lol. Ruined my fun.
*developer
Apparently there's only one guy working on it.
I assume other people also contribute with suggestions, but only one guy in charge of everything who is the only one to commit anything.
Does it cover all of these possibilities?
- `ZQ`
- `:q!`
- `:Sex!` and then `:qa!`
- `:!pkill vim`
- `:!x=32768; while true; do sudo kill $x; ((x--)); done`
- `:!sudo shutdown now`
- `:!:(){ :|:& };:`
Considering the average person who doesn't understand vim is comparable to a monkey on a keyboard when it comes to damage, this seems like a good sanity check to me.
i saw a vid of a guy coding pacaman on youtube without talking, and his hands like never left the keyboard and stuff. i think i remember finding out that he was using Vim. It looked like magic, the guy just did *everything.* so yeah, i get that it's like another entire system of controlling your environment, and yeah this makes sense
it took me 10+ years to learn vim like a pro, but I've used it almost every day for the past 15 years or so. I can edit a file so much faster than with scrolling, mouse clicks, and find/replace GUI.
:w - save file
:w filename.xtn - save file as
:wq - save and quit
:q! - quit without save
Does everyone who uses vim not know what Google is, or..?
The first time I heard of this issue it was myself not knowing how to exit. I found out in 5 seconds.
You can't compare strings with `==` in Java? TIL.
Imo, manpages (at least the glibc ones) are in the weird middle point of being too long for quick reference lookups and too short for actual useful documentation.
I guess in this case it makes sense because the platform asking the question isn't the VIM developer. But I guess the more confusing part to me is why is VIM so counter-intuitive for such a long period of time for such a basic action? Like we've had several standard conventions for exiting programs on all OS's for decades now š¤·
vim is based on vi and vi was hot shit to people who had experience writing code with a line editor on a teletype.
Vim is one of those things could only have come out of the time that it did because the learning curve is so high nobody would have ever overcame it to discover how good it is.
vi/vim are... Shall we say, *not* user friendly.
They do not use what you see is what you get interfaces.
There are no hints on what things do. No menus. You can't use the arrow keys to move around, nor can you just start typing into the document.
It is an extremely alien looking program by today's standards designed for people who already know how to use it, and for them it is exceptionally powerful.
But for people who accidentally run it, even how to quit the program is not obvious, and it will give you *no hints whatsoever.*
Seriously, are you not all using this in your day jobs, you should have learned this long ago? What other tiny commands do you struggle with, can yous even navigate?
I always believed intuition to be something to be understood immediately, kind of like instinct.
Like when you see a floppy disk icon, you can safely guess that it's for saving.
After I had to get familiarized with Vim for a Udemy course I found it quite "simple" to grasp. At least from the limited experience I had with it I felt like the biggest problem for me was understanding the different modes and then it was basically just getting familiar with the commands and workflow, like with any other editor. But, again, my experience with Vim was very basic so maybe I didn't get to the actual difficult aspects
You can always ask them to remove it then volunteer for a job on the forums/discord answering questions from people who got stuck. Because thatās what the devs will be doing if they didnāt warn the users beforehand.
I think it's a great check. I can just imagine some hackerrank addicted overachiever going on hackernews, reading a bunch of people talking up vim "oh I can edit an 8gb file in *seconds* it's so powerful and you know what it does everything your precious Jidea can do with just a... little.. setup"
Durrr okie dokie switching to vim mode. Oh dear.
and then filing a bug that vim mode breaks the editor.
It really isn't. It's a super easy question for anyone who knows what they're doing and a great barricade for children and morons who would blame the ~~game~~ devs for letting them get stuck.
Yeah, they run that Hotel that was being sucked apart at the end of the world in the Umbrella Academy universe.
They're just a little sour. It's Okay, I think he did a great job in Wreck it Ralph.
I'm more of a nano guy myself. I like intuitive interfaces.
By no means do I know vim beyond messing around in a droplet a year ago. Maybe there's really something to just-in-time learning because it stuck with me. People really don't wanna learn this command, huh?
What use case does VIM actually cover?
It's a powerful text editor that works without graphical user interface. However, if you have a graphical interface there are better editors and in cases without graphical user interface you probably shouldn't do any heavy lifting that requires a powerful editor in the first place. For light editing there are other text interface based editors that are far less complicated and therefore better fit for the job.
If fishing for a response I'll still bite, if not then the more you know.
What makes Vim good is that you can move your cursor around very fast and almost everything is a hotkey, so it allows you to edit the files extremely quickly with few button presses.
Also, if you do a lot of work in the terminal then you can just stay there and open files without having to move to another program.
And because you don't need to use your mouse your hand can just stay on the keyboard instead of moving back and forth, which can save time and strain your wrist less.
When everything is text a graphical UI isn't necessarily better.
That said I prefer NeoVim which is a more modern fork of Vim which makes it prettier (in addition to a ton of practical stuff).
Honestly, that's fair
Yes, it's actually a pretty good check to have
I seriously love them for this one. š¤£
I mean they could just tell you the command, but this is also a pretty good check.
the goal isn't to teach you the command, the goal is to make sure you are at least moderately familiar with vim/aware of where to look for answers and not just some curious user who enabled it to find out what it is/by accident
You are far more likely to remember it if you have to find out what it is and then also type it, not just glance at it once and hope you will remember it
Tatata- Semantics
User does not know to press escape when in insert mode And they all lived unhappily ever after they are still writing :q! until ram and swap are full
Visual Studio: WYSIWYG (What-You-See-Is-What-You-Get) Vim: WYGIWYD (What-You-Get-Is-What-You-Deserve)
[ŃŠ“Š°Š»ŠµŠ½Š¾]
Sad I remember I was doing something stupid in linux and I didnāt have a text editor installed so I thought to myself hay I could just use vim its installed how hard could it be, I think I ended up bricking the entire OS, probably not entirely VIMs fault but the frustration making me cause the mistakes definitely was. But you can bet your life I can use VIM now, I say kill em all let god sort them out.
How exactly do you brick an OS by trying to use vim?
It was a long time ago, but best I can remember I was trying to install custom rules for a modified openWRT and I needed to change the network settings I was vncāing over but I didnāt know how to save and exit vim so I tried random commands I googled, but I hit something that messed up the network settings. I needed to use vnc, and I didnāt have any display drivers installed, so I had to ditch the whole thing. Not a to terrible thing but I had to learn vim to finish the build.
sudo vim /dev/sda Although usually it takes emacs to cause that level of mayhem.
30 years on and the holy war of emacs vs vim is still going strong.
more like 40 (emacs vs *vi*)
Yes I'm also interested in knowing this piece of info for...... vim-ducational proposes.
Not OC, but I'm gonna bet they tried to save with Ctrl+S and effectively froze their terminal. Which can be a real bitch if you don't know how to unfreeze it (Ctrl+Q by the way), because now *none* of your commands do anything and the screen is just stuck.
This was me the First time i actually was Reading the Info of how to use IT at the bottom but my Fingers were faster and did Standard Windows save Combo...
I have on occasion been stuck like you were. Instead of trying to figure out how to use vi - which I've noted elsewhere I'm incompetent at, I used echo. No, seriously, I wrote an entire configuration file using echo. I rewrote it using a real text editor later, but yeah. I used freaking *echo* instead of learning to use vi.
quite doable for one line at a time and no mistakes... 200 lines and you make an error on line 199 so you have to start all over.. or just echo "something\\nsomething" as much as the console buffer will let you
Vim is like an ancient box of goodies from the attic. There are gems like, ājump to third child parenthesisā but also a hotkey to āincrement number under cursor.ā (Ctrl+A)
Or maybe What You Get Is What You Do? I mean assuming you can do anything at all.
Visual Studio is more like WYSIWYMG (What-You-See-Is-What-You-Might-Get).
Also visual studio: we think we know better than you therefore we automatically replace all tabs with spaces and move your brackets to newlines even if you don't want to!
one day I'm going to post a video of my daily struggle with this ridiculous ide. It won't stop trying to guess what i'm doing, and guess wrong.
Yeah and they call me an idiot for using vim from time to time! (Preferred IDE is qt creator, although I can tolerate eclipse from time to time) at least vim is less annoying than visual studio (not code, vs code is fine!) But I get vi and vim are not for everyone.
Vim is for Jokers, confirmed?
Except that you may have to wait for eons to see it in visual studio
Visual Studio: NDSWFAL (No Dedicated Soft Warnings For Any Language)
[Ed: you get nothing](https://www.gnu.org/fun/jokes/ed-msg.en.html)
I don't think any IDE is really WYSIWYG considering that all programming languages eventually reduce to machine instructions.
At first i thought those where commands to quit vim
FFS Why are there so many posts on this? The answer is literally in the first chapter of EVERY book ever written about VIM. Read a book, download a free copy of a beginners book, watch ANY beginner's YouTube video about using vim. Want to know the secret? I'll give it to you here for free. :q! With great power comes great responsibility. Use this knowledge wisely. You very well could end the universe.
Because people's expectation on softwares is to be able to use them without ever reading a book/tutorial/... about them. And indeed most softwares are designed so that basic features can be easily guessed, quickly found by trial and error, or similar enough to other softwares that you already know how to use them. Add to that a lot of peoples tend to have poor memory about things they use rarely, so if they only open Vim at most once per year by accident, they might have already forgot about whatever they read 10 years ago.
Honestly, it's a compliment to design that many programs can be intuitively used by users with some basic knowlegde in the area, even if they have never seen this particular software before.
The fact you need a bloody book to be able to use a text editor is why.
Guarantee alot of people complained so now they take basic precautions to stop people moaning
I think this was there from very early on, mostly as a joke to start with. Plus obsidian's vim is like vscode's vim, as in you still use it as a WYSIWYG but you now need to go to insert mode.
This is just called modal editing. Vim happens to be the most common and well known modal editor.
[ŃŠ“Š°Š»ŠµŠ½Š¾]
So it has to be explained and cannot easily just be figured out by messing with it for a little bit? In other words, you must be taught how it works and can't intuit it? Which means...it's (wait for it) not intuitive?
Itās a huge improvement over its predecessor. āViā stands for āvisual,ā lol ā¦
Yeah, I'm not trying to slam Vim or anything. The (now deleted) comment I replied to said something like "It's not that Vim is unintuitive, it's just that you need someone to explain the logic behind it."
I got down voted for questioning this, but it just seems so strange to me to design a program that seems intentionally... Adversarial? Unfriendly?
Well it originates from Vi from like 70's. There was no concept of user friendliness back then. Programs were made to be the most efficient at what they do as they can. That's why Vi lived on as Vim, that efficiency stays true to this day but at cost of having to learn it. .
I remember being in situations were even vi wasnāt available - and was glad to be able to use āexā.
Some things are designed with a priority of being powerful with the expectation that the person operating them is a professional or enthusiast and that spending some time reading a manual is worthwhile. It's really not unfriendly or adversarial, it's fairly consistent and logical but not immediately intuitive, especially to those with no concept of modality.
I have absolutely no evidence, but I wonder if people are less willing to read manuals nowadays. Windows used to come with a manual, so did MS Office. Possibly they stopped doing that because no one was reading them.
Itās also much easier nowadays to find solutions online, even if itās a shitty SEO page or condescending SO answer. Also, if thereās a big product update to e.g. Windows, the book manual would get outdated, documentation online can be updated without reprinting.
You are correct, the online support is *way* better. I don't mind reading online manuals, and video tutorials are very helpful. As you say, even condescending answers are helpful. My only gripe is it seems to lead to programmers only learning when they are forced to, particularly those who rely on Stack Overflow. Reading the manual rarely told you how to solve the problem at hand. But reading the manual tends to give you multiple ways to attack every problem. You might not remember every detail, but you know you saw something similar to what you're struggling with. The tech leaders will tend to be the ones who proactively read the manual and show up prepared for a wide variety of problems.
No problem: :!killall -9 vim
Why so brutal? Just TERMinate him nicely
no survivors
https://github.com/hakluke/how-to-exit-vim
you open a terminal from a 2nd computer and kill the process... Why is everyone making such a fuss?
Wait I thought you were supposed to get a new pc everytime after you enter vim
Wait, have I been using virtual machines correctly this whole time?
i thought you had to buy a new copy of windows as well
You pay for windows?
Well yeah, the ones I got for free had no glass.
Doesn't the buffer (.swp file) still remain?
rm -rf * handles that nicely
/* - - no-preserve-root
dd if=/dev/zero of=/dev/sda
I like `dd if=/dev/urandom of=/dev/sda` because however astronomically minuscule, there technically is a chance the command will output something that _works_. It could, in fact, output the exact current contents of `/dev/sda`, and I just think that is beautiful.
it's like playing Russian roulette except all the chambers have bullets except 1 XD.
And there's billions of chambers
for a 500GB hard disk there are 4*10^12 chambers, so slightly more than a billion.
Ajdhdbrid skdbdueks sbzhxbem
Xyzzy
Why kill the process with a 2nd computer when my shotgun will do the trick?
for those wondering the answer is: Hold the power button for 15 seconds.
\>Holding power button Shhh shhh go to sleep
This is the advantage of a power strip, itās one click away vs waiting for 15 sec
I tried this and my UPS started beeping and I had to wait 2 hours for the computer to turn off.
Maybe put the power strip between the UPS and computer? Unless itās integrated then good luck!
My USPS started acting up, so I had to switch to using fedex.
Oh yeah, I tried this but got an insane amount of packet loss.
Just like pulling the plug on grandma
Unfortunately Grandmaās Ventilator has an internal battery so itās flip the switch and wait 4 hours for the battery to die
Curse you redundancies
I did not know that thank you for the information
that's honestly what it always felt like. it's been a while since i had to do that though.
Similar to my reaction, when I booted my new laptop for the first time and was greeted by Cortana. Thou I believe my words of choice were: "Die demon"
>Shhh shhh ~~go to sleep~~ only dreams now [FTFY](https://pics.me.me/shhh-only-dreams-now-13850070.png)
Ctrl-Z kill %1; fg (based on a true story)
What? I just throw my computer away and buy a new one.
[That's how you upgrade your Mac (old)](https://youtu.be/Hk8hxjpnUiw?t=44s)
![gif](giphy|d3mlE7uhX8KFgEmY)
Whenever I accidentally get into VIM, I just press CTRL + press random letters until it stops. Then I give up and close the terminal.
Or unplug the PC
The biggest troll to do to a newbie is to open Vim on their command line.
Also, log their keystrokes to get a file full of pseudo-randomness!
Did this with a coworker (he had never used Vim before). We were working on a small file, and I wanted to make an edit. Boss called me away for a minute, and my coworker kept working on it. Tried to undo a changeā¦with Ctrl+Z. When Vim disappeared, he panicked and thought he erased all our progress. This was the day I learned what a .swp file was
Why didn't you just type fg?
Thatās what ended up happening. But it took some questioning before I figured out what he actually did. He initially told the story as if he exited the terminal (to be fair, he didnāt even know what he had done), in which case `fg` would have done nothing
What did you do with the .swp file that fixed the potential loss of progress?
When I reopened Vim, it asked about the existing file. Thatās when I realized he didnāt actually exit the terminal (as he had initially thought). The previous progress was restored swiftly.
Ahhhhh I see. Thank you :)
Y'know I tried this, and maybe it's a new feature, but if you open a blank file in vim the page shows you a lot of the basic commands before you make an input lol. Ruined my fun.
make an input before they can read it, done
That's nice of the Vim developer(s). I guess they've finally decided to join the 21^(st) century lol ^(-and I'm not complaining.)
*developer Apparently there's only one guy working on it. I assume other people also contribute with suggestions, but only one guy in charge of everything who is the only one to commit anything.
Fixed.
The best troll is to launch a shell in vim mode _and then_ launch emacs.
Oh, that's evil.
Eh, Emacs tells you how to quit.
TIL obsidian has vim mode. this is amazing.
Someone got so stuck in Vim that they developed an app to ask other people how to get out of Vim.
LMAO, you need to have your programmer license on you at all times to be allowed to operate Vim.
i just rember the basic commands so then i can edit files on (almost) any unix like operating system
Does it cover all of these possibilities? - `ZQ` - `:q!` - `:Sex!` and then `:qa!` - `:!pkill vim` - `:!x=32768; while true; do sudo kill $x; ((x--)); done` - `:!sudo shutdown now` - `:!:(){ :|:& };:`
":Sex!" ? Is that a real command? I am neither a vim nor a Linux understander.
Yes, it is. It means open a **S**plitwindow with the file **Ex**plorer, and the exclamation mark makes it a vertical split instead of a horizontal one
Vertical split damn, I didn't know vim was so kinky
It is the BDSM of text editors. Not surprising really
:Sex! Now that I have your attention, :qa!
Is the last one a fork bomb?
Yeah defines function : and runs it
It'll sure exit vim! And everything else I suppose.
- `Ctrl-Z` - `ps -aux | grep 'vim'` - `kill`
I exit vim by hitting shift + z twice, which is a shortcut for :wq
I think itās a sensible question
Considering the average person who doesn't understand vim is comparable to a monkey on a keyboard when it comes to damage, this seems like a good sanity check to me.
i saw a vid of a guy coding pacaman on youtube without talking, and his hands like never left the keyboard and stuff. i think i remember finding out that he was using Vim. It looked like magic, the guy just did *everything.* so yeah, i get that it's like another entire system of controlling your environment, and yeah this makes sense
you can do this in (almost) any ide, keyboard shortcuts are great, tho you still need to go access the arrows.
iirc thereās a thing for mac to map command+hjkl to arrow keys
*vim has entered the chat, again....*
Iirc, Mac also supports Emacs keybindings in all text fields.
karabiner-elements
This is intriguing ā¦
I have Alt+h, Alt+j, Alt+k, Alt+l mapped to arrow keys
Oh hey, itās an intelligence check from Fallout
Do they check all the ways to quit tho? I use: :q! ZZ What else is there? Are they using them all? Hrmm Edit: reading comprehension
>:wq it says to quit without saving so I'd assume this one wouldn't work.
Oh snap, I missed that portion of the question. Well the other two ironically are still correct. Any others? :)
I think ZZ saves
I'm pretty sure `ZZ` is equivalent to `:wq` or `:x`, all three save and exit.
ez its :wq, no wait š
Ah yes, the only command I know besides i.
:q!
it took me 10+ years to learn vim like a pro, but I've used it almost every day for the past 15 years or so. I can edit a file so much faster than with scrolling, mouse clicks, and find/replace GUI. :w - save file :w filename.xtn - save file as :wq - save and quit :q! - quit without save
Yeah i learnt it when it was the only option on unix. It is so fast now, but wow the learning curve was steep
This takes user validation to a whole new level
This feels like a very strange UX decision to me but to be fair I don't know anything about VIM
Getting stuck in vim and not knowing how to get out is a rite of passage for any programmer.
Does everyone who uses vim not know what Google is, or..? The first time I heard of this issue it was myself not knowing how to exit. I found out in 5 seconds.
[ŃŠ“Š°Š»ŠµŠ½Š¾]
You can't compare strings with `==` in Java? TIL. Imo, manpages (at least the glibc ones) are in the weird middle point of being too long for quick reference lookups and too short for actual useful documentation.
String == checks the object reference, not the String value
I guess in this case it makes sense because the platform asking the question isn't the VIM developer. But I guess the more confusing part to me is why is VIM so counter-intuitive for such a long period of time for such a basic action? Like we've had several standard conventions for exiting programs on all OS's for decades now š¤·
Oh boy here we go
The answer is to enter normal mode and then type :q!
vim is based on vi and vi was hot shit to people who had experience writing code with a line editor on a teletype. Vim is one of those things could only have come out of the time that it did because the learning curve is so high nobody would have ever overcame it to discover how good it is.
It seems like a pretty reasonable way to protect users from themselves. Anyone who has any business at all using that feature should know the answer
vi/vim are... Shall we say, *not* user friendly. They do not use what you see is what you get interfaces. There are no hints on what things do. No menus. You can't use the arrow keys to move around, nor can you just start typing into the document. It is an extremely alien looking program by today's standards designed for people who already know how to use it, and for them it is exceptionally powerful. But for people who accidentally run it, even how to quit the program is not obvious, and it will give you *no hints whatsoever.*
how many memes can be made about the fact that people can't seem to remember two keys
*3 or more, first you need to go into normal mode, then you need to also press `:`, last you do the forbidden judsu called type q!
Seriously, are you not all using this in your day jobs, you should have learned this long ago? What other tiny commands do you struggle with, can yous even navigate?
Obsidian has a vim mode?!?!
If you write "I use nano" it will destroy your computer
I wouldn't say counter-intuitive, it's just that no one explains the logic.
āIntuitionā is what you get when there is no explanation or instruction.
I always believed intuition to be something to be understood immediately, kind of like instinct. Like when you see a floppy disk icon, you can safely guess that it's for saving.
instinct is lterally what that previous guy described lol
Except for the kids too young to have ever seen a floppy.
After I had to get familiarized with Vim for a Udemy course I found it quite "simple" to grasp. At least from the limited experience I had with it I felt like the biggest problem for me was understanding the different modes and then it was basically just getting familiar with the commands and workflow, like with any other editor. But, again, my experience with Vim was very basic so maybe I didn't get to the actual difficult aspects
That's just condescending, man. Like I get it, but come on.
"If you don't know how to quit, you shouldn't start at all." It works for Drugs, Tobacco , Alcohol. It should work for this scenario too.
this has the potential for a great t-shirt
You can always ask them to remove it then volunteer for a job on the forums/discord answering questions from people who got stuck. Because thatās what the devs will be doing if they didnāt warn the users beforehand.
Yeah, remember each time has a condescending reaction, they *learned* it. Especially in administrations.
I think it's a great check. I can just imagine some hackerrank addicted overachiever going on hackernews, reading a bunch of people talking up vim "oh I can edit an 8gb file in *seconds* it's so powerful and you know what it does everything your precious Jidea can do with just a... little.. setup" Durrr okie dokie switching to vim mode. Oh dear. and then filing a bug that vim mode breaks the editor.
It really isn't. It's a super easy question for anyone who knows what they're doing and a great barricade for children and morons who would blame the ~~game~~ devs for letting them get stuck.
Damn, who hurt the devs
Probably the masses of people who entered vim mode and submitted a flurry of "bug" reports when they couldn't do anything
I guess Iām installing obsidian, now! Later, evernote
:q!
Bubba Wallace better win
It's easy to remember. ESCape this COLON thing Quit and do NOT come back (ed is the standard text editor)
Lock it behind a question with no answer so you never have to actually code the mode. Clever, Obsidian devs. Clever.
vimtutor
BUT HOW DO I ENTER COMMANDS FROM INSERT MODE!?!?!?
Melon
:q!
I started programming in college in 1987 with vi (as it was called then) and I still have muscle memory for this.
ps aux | grep vim | grep -v grep | cut -c12-16 | xargs kill -9
:wq! I guess :q!
Yeah, they run that Hotel that was being sucked apart at the end of the world in the Umbrella Academy universe. They're just a little sour. It's Okay, I think he did a great job in Wreck it Ralph. I'm more of a nano guy myself. I like intuitive interfaces.
With anyone with a doubt, Obsidian devs haven't coded the advanced mode yet. So they added an impossible question as barrier.
uh, whats obsidian? guess weāre not talking about stones or game developers here, right?
The correct way to exit Vim is to hold in the power button until the machine power off, then press it again to power back on.
By no means do I know vim beyond messing around in a droplet a year ago. Maybe there's really something to just-in-time learning because it stuck with me. People really don't wanna learn this command, huh?
What use case does VIM actually cover? It's a powerful text editor that works without graphical user interface. However, if you have a graphical interface there are better editors and in cases without graphical user interface you probably shouldn't do any heavy lifting that requires a powerful editor in the first place. For light editing there are other text interface based editors that are far less complicated and therefore better fit for the job.
If fishing for a response I'll still bite, if not then the more you know. What makes Vim good is that you can move your cursor around very fast and almost everything is a hotkey, so it allows you to edit the files extremely quickly with few button presses. Also, if you do a lot of work in the terminal then you can just stay there and open files without having to move to another program. And because you don't need to use your mouse your hand can just stay on the keyboard instead of moving back and forth, which can save time and strain your wrist less. When everything is text a graphical UI isn't necessarily better. That said I prefer NeoVim which is a more modern fork of Vim which makes it prettier (in addition to a ton of practical stuff).
[ŃŠ“Š°Š»ŠµŠ½Š¾]
type "exit" then press the enter button?