I’m trying out Obsidian for taking notes, and this made me laugh.
deleted by creator
It’s very easy to terminate vim. I just use the power button.
Uh… so u guys don’t change the PC each time that’s cool I would definitely try that …
deleted by creator
Yeah that’s the problem it’s so expensive not to mention when you buy a discounted one and the vim session is already open…
Tried it’s a scam , doesn’t work
I just noticed someone should try xkill if they get the chance. If that doesn’t work they should rephrase the question. That is all. This will be my last grand contribution for today. Have a nice Wednesday everyone :3
This is usually how I end up exiting vim without saving, at least if I’m honest about it.
Maybe one day I’ll get better at it. Nano has been plenty for me.
That is a hilarious, yet useful test.
Huh. Which one of them?
:q!
Oh man, that’s awesome. Aren’t there a couple ways to do that though?
they accept :q! but I haven’t checked anything else yet
According to Stack Overflow, there is also:
- :cq (quit without writing and return non-zero exit code)
- ZQ (quit without writing from normal mode)
I actually knew about ZQ :)
but in what case would you ever need :cq ? I’m curious what’s the idea behind that
Edit: I checked, neither work for obsidian verification, including :cq!
disappointing :c
It’s useful when vim is being run from a different program or script.
For example, if I run
p4 change
to create a new Perforce changelist it will open up my editor (which I have set to vim) so that I can enter the CL description and other fields. If I realize I don’t actually actually want to create the CL yet I can use :cq to quit with an error so thatp4
knows to abort.I also have a script I use for diffing a list of file pairs. It runs vimdiff on the first pair of files then if I exit with :qa it will move on to the next pair of files. But if I exit with :cq it will just abort and skip all of the remaining file pairs.
Big brain time,
pkill vim
Vim: Caught deadly signal TERM
Vim: Finished.
TerminatedYou need
pkill -9 vim
to really make sure it’s dead.So from within vim
:!pkill vim
?Or
ctrl-b " pkill vim
for my tmux enjoyers:!kill -9 -1
I just can’t quit you, vim!
You can’t just quit it. Vim is one hell of a drug.
There’s a few different ways to write that command in vim, does it accept all of them?
No, I tried ZQ the other day, does not work
my disappointment is immesurable and my day is ruined.
I’m honestly not super familiar with vim. I tried :q! and it accepted it, what are some other ways?
:quit!
,:qa!
,ZQ
Ah, thanks for
ZQ
. I only knewZZ
, alternative to:x
.
:wq will save and then exit, while :x will save only if the file has been modified and then exit, and then there’s ZZ that does the same as :x, plus there are probably others:-)
Which means none of those are valid? Since this is specifically “quit without saving”
The question specifically asked for “the command to quit Vim without saving”
This guy vims
They explicitly ask for the one that quits without saving, so I’d say :q! is the obvious choice
I agree that it’s the most obvious choice, but it also doesn’t work when there are hidden buffers open. :qa! and :cq should always work so they are arguably more correct
:q :3
Ah, unfortunately it only asks you this question the first time you try it.
!
E37: No write since last change (add ! to override)
Average furry programmer
Halfway true :3 I’m only a professional programmer which is why I attend in professional work fashion like thigh highs and arm warmers instead of fursuits. I’m more the stereotypical femboy programmer. Pre-edit: am i really just average 3,:
Okay, you are a very cool and sweet femboy programmer :)
You appear to be in the wrong subreddit (sublemmy?). This is a community based around programmer humor. I recommend you go to the furry sublemmy instead. It is for this reason I have down voted your post today
Buddy where do you think furries get the money for fursuits? They are very expensive (or so I’ve heard) and lots of furries pay for their fursuits with high paying jobs like IT jobs
I don’t get it. I was pretty much replying with a programming related answer, being “:q”. I only added my personal flair to it, being “:3”. And I only expanded after another person assumed me to be a furry as well.
If you want me gone because of that, you got to get your priorities out of the gutter, there ain’t none. And fix your stereotypes too. The other person at least replied humorously. You won’t get a “:3” from me. Good day!
:!killall vim
Funny, but unironically a pretty good idea.
One of my first computer jobs was working in a student computer lab at my undergraduate university. This was back in the mid 90s-ish.
We had three types of computers - windows machines running 3.1 or whatever was current then, Macs who would all do a Wild Eep together when they rebooted en masse, and Sun X Windows dumb terminals that were basically just (obviously) unix machines for all intents and purposes. This was back when there were basically like 5 websites total, and people still hadn’t heard of Mosaic.
So everyone wanted the windows and Mac boxes, and only took the xterms when there was nothing else open. I was the primary support person for them since none of the other people wanted to learn Unix and I was the only CS major.
The X boxes suffered from two main learning hurdles. One was that backspaces were incorrectly mapped into some escape key sequence, and the other is that it would drop you from (I think) pine into emacs as a mail editor as soon as you hit it. 90% of my time was telling people how to exit emacs. It was that, putting more paper into the printers, and teaching myself more programming than I was learning in classes.
My god that brought back memories. The first commands when sitting at a new terminal was always, always:
stty sane
stty erase '^H'
It was well into the 2000s before Unix had useable defaults.
God, I remember the backspace thing. I hope whoever allowed a computer to be shipped in that condition got fired.
deleted by creator
Why would I want to exit vim?
I tmux my vim session so I never have to exit it, I just end the session and NOTHING OF NOTE HAPPENS
killall vim
You monster, I prefer denial
What if SIGTERM not enough? Kill nine times. Like this:
killall -9 vim
. Congratulations, comrade, you have passed KGB exam.Hmm never thought of it like that. Unix programs are actually cats, and sometimes you have to kill all nine of their lives to really end them.
Yes, one of them literally have name cat, so you can kill all the cats with
killall -9 cat
Just all those left over swap files I forget about because they are in every one of my dot ignore files.
yes | rm -r ./.*
RIP my .git folders
But importantly the swp files in my home directory are gone, along with all my rc files but who needs them
set swapfile set dir=~/.cache
No, i just googled it.
Aka “vim turds”
It is much easier not to
Easy, just turn off computer.
I love obsidian, you’ll love it
I switched recently from Trillium.
After installing two dozens plugins, it may just replace my KB site, note apps, task manager and PRM all at once.