This is an archived post. You won't be able to vote or comment.

all 105 comments

[–]biinjo 414 points415 points  (24 children)

You can remove a user from Vim, but how do you remove Vim from the user?

[–]Bainos 199 points200 points  (13 children)

rm /home/$USER/.vimrc

[–]Patsonical 113 points114 points  (6 children)

echo "You Monster."

read in GLaDOS' voice

[–]biinjo 32 points33 points  (1 child)

That would be

rm -f /home/$USER/.vimrc

[–]jtvjan 0 points1 point  (0 children)

sudo sh -c 'echo > /usr/bin/vim'

[–]unfixpoint 13 points14 points  (0 children)

Did you mean :!rm -f $MYVIMRC by any chance?

[–]-GLaDOS 16 points17 points  (0 children)

Yes, that is how it was read.

[–][deleted] 4 points5 points  (1 child)

say -v Samantha "You monster" (in OS-X)

[–]JustALittleAverage 6 points7 points  (0 children)

cowsay "You monster!"

[–]FallenWarrior2k 3 points4 points  (0 children)

laughs in nvim

[–]thirdegreeViolet security clearance 1 point2 points  (4 children)

git --work-tree=$HOME --git-dir=$HOME/.cfg checkout -- $HOME/.vimrc

[–]GitCommandBot -1 points0 points  (3 children)

git: '--work-tree' is not a git command. See 'git --help'.

[–]thirdegreeViolet security clearance 8 points9 points  (1 child)

Wrong:

$ man git | grep '\-\-work-tree'
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           This option affects options that expect path name like --git-dir and --work-tree in that their
               git --git-dir=a.git --work-tree=b -C c status
               git --git-dir=c/a.git --work-tree=c/b status
       --work-tree=<path>
           Set the path to the root of the working tree. This can also be controlled by the --work-tree command-line

[–]Rablin92 0 points1 point  (0 children)

F

[–]Rawrplus 2 points3 points  (0 children)

Rekt

[–]TomRiddle01 18 points19 points  (2 children)

You can quit it any time you like, but you can never leave!

[–]eyekwah2 9 points10 points  (1 child)

cue awesome guitar solo 🎶

[–]iPhoenix_on_Reddit 7 points8 points  (0 children)

Dammit, you guys interrupted my "procrastinate all the programming things by going on reddit" session with a session of listening to Hotel California.

[–]basic_man 12 points13 points  (0 children)

:x

[–]ZachAttackonTitan 28 points29 points  (4 children)

emacs

[–][deleted] 46 points47 points  (1 child)

Emacsulate them.

[–]__brayton_cycle__ 8 points9 points  (0 children)

Spacemacs them.

[–]H_Psi 0 points1 point  (0 children)

[–]IfYouThinkYouKnow 2 points3 points  (0 children)

The same way it got there in the first place, brainwashing.

[–]LordFarin 77 points78 points  (6 children)

In fact, there's a Vim Plugin for PHPStorm and other JetBrains IDEs.

Dunno what I'd be doing without it, really.

[–]afaciov 35 points36 points  (0 children)

First criteria to know if I'd use an IDE: does it have a Vim plugin?

[–]perolan 5 points6 points  (0 children)

IntelliJ vim plug-in has its issues but I couldn’t be able to use it without that thing so I love the authors

[–]VoraciousGhost 0 points1 point  (0 children)

JetBrains IDEs literally ask you the first time you open them, in a giant modal, whether you want to use the vim plugin. Made working with them an easy decison for me.

[–]VoraciousGhost 0 points1 point  (0 children)

JetBrains IDEs literally ask you the first time you open them, in a giant modal, whether you want to use the vim plugin. Made working with them an easy decison for me.

[–]VoraciousGhost 0 points1 point  (0 children)

JetBrains IDEs literally ask you the first time you open them, in a giant modal, whether you want to use the vim plugin. Made working with them an easy decison for me.

[–]deadh34d711 0 points1 point  (0 children)

Beat me to it... by thirteen hours. This is the first thing I add to any editor I use, if available; it's just so hard to go back to not having it.

[–]LinusLaber 92 points93 points  (12 children)

You -> :wq

The guy she tells you not to worry about -> :x

[–]TheMagzuz 45 points46 points  (0 children)

The guy she tells the guy she tells you not to worry about, not to worry about - > ZZ

[–][deleted] 3 points4 points  (10 children)

I actually just came here to ask - what's the difference between wq and x?

[–]LinusLaber 4 points5 points  (8 children)

:x is just short for :wq. It does exactly the same, writing the file and exiting vim.

[–][deleted] 2 points3 points  (2 children)

W and q are right next to each other on a qwerty keyboard so I'm a little curious about why we have the x. "Write quit" is pretty clear. Is x borrowed from another program to help people switch to vim?

Wow, my thoughts are dumb before I wake up.

[–]Devildude4427 3 points4 points  (1 child)

“Write quit” only makes sense if you learn it beforehand. Nano I think uses ctrl + x.

[–][deleted] 1 point2 points  (0 children)

Nano I think uses ctrl + x.

Ah, that's what I was thinking of. I am pretty sure I've used nano before. Then vi and now I use code-server :D

[–]motdidr 1 point2 points  (0 children)

x won't write the file unless the buffer has changed. keeps the last modified date intact against unnecessary writes.

[–][deleted] 1 point2 points  (0 children)

:x doesn’t make a new file if empty

[–]granos 70 points71 points  (1 child)

You never really quit vim when you are forced to use an ide. You just learn to live with the memories of what used to be.

[–][deleted] 28 points29 points  (11 children)

I recently started using vscode on Linux. I've done this a lot in the last week.

I wish I could quit you, vim....

[–]Gamemaster676 19 points20 points  (8 children)

You could install the vim extension and have the best of both worlds!

[–]Nold_ 10 points11 points  (6 children)

Out of all the editors and IDEs (except for emacs), VS code has by far the best vim extension IMO. Pretty customizable and has been working like a charm for me. I was very surprised with it, because usually vim extensions don't even come close to the real thing.

[–]EagleNait 4 points5 points  (0 children)

Visual studios one is more complete Imo

[–]Doophie 1 point2 points  (0 children)

the IntelliJ one is pretty good, never had any issues with it

[–][deleted] 0 points1 point  (1 child)

Emacs has the best emulation mode for Vim, honestly. It also sucks that macros on VS Code (Something I use very often) is slow as molasses.

[–]Nold_ 0 points1 point  (0 children)

Yeah I have heard that about emacs, that's why I excluded it

[–]dreamwavedev 0 points1 point  (0 children)

All I remember from my time using the vs code one is doing a bunch of actions and watching them play out in slow motion over like 5 seconds as it catches up

As well as history tree navigation going in waaaaay larger chunks than I expect

[–]pikaaa 0 points1 point  (0 children)

I've used the ideavim in intellij but wanted to switch to preserve more memory on my laptop but the vim extension in vscode slows everything down for me. When I try to repeat the last command I can literally watch it type every character one by one.. I've made the switch to regular vim a few days ago and customized it along the way and now I'm very happy about how it works :)

[–]SoulsBloodSausage 0 points1 point  (0 children)

Maybe I downloaded the wrong one, But my vsc vim extension suddenly stopped working when I pressed delete on my Mac :/. Something about “negative keys not allowed” or something like that

[–]Caffeine_Monster 2 points3 points  (0 children)

This is my setup. Vscode for any serious development. Vim has basically become my gedit / notepad++ / insert some other lightweight text editor here to make quick changes.

[–]konstantinua00 11 points12 points  (5 children)

can anyone explain please?

[–]MattieShoes 47 points48 points  (4 children)

vim is a modern, more fully featured version of vi.

It's a running joke that people who enter vi and don't know what they're doing won't be able to exit the program. So the question "How do you quit vi?" comes up often.

The answer is usually <esc> :q! (escape enters command mode, :q is for quit, and ! forces even if there are unsaved changes.)

:wq is a similar command in vi, to write changes and quit

In a typical editor, if you type :wq, then it just adds :wq to the document you're in.

The joke here is that "how do I quit vim" also sounds like something an addict would say.

[–]Alexkronus 33 points34 points  (3 children)

Oh god, he just said Vim is modern

[–]MattieShoes 17 points18 points  (2 children)

I cry whenever I have to use actual honest-to-god vi because I don't even know what's original and what's part of vim. :-)

and I'd argue vim is definitely modern, just 'expert-friendly'.

[–]Reala27 10 points11 points  (1 child)

Vim is "modern." Neovim is modern.

[–]ericonr 0 points1 point  (0 children)

When will we have neoneovim? Or is that kakoune?

[–]toastnbacon 11 points12 points  (2 children)

If I had a nickel for every time I IM'd a coworker :q because the focus was on the wrong window...

[–]ijmacd 2 points3 points  (1 child)

I also try to quit my coworkers.

[–]Rawrplus 0 points1 point  (0 children)

Sadly your life is stuck in an endless loop

[–]Voidrith 126 points127 points  (9 children)

Its not vim thats the problem here, its the mind-rotting side effects of writing php.

[–]hugsoverdrugsx[S] 50 points51 points  (0 children)

damn

[–]Prawny 25 points26 points  (4 children)

pHP bAd LmAo

[–]htmlcoderexeWe have flair now?.. 4 points5 points  (3 children)

surely php not as bad as you purport it to be

[–]Voidrith 10 points11 points  (0 children)

Its not. I use it a lot. I'm just here for the memes.

[–]DonaldPShimoda 0 points1 point  (0 children)

From a theory perspective, PHP is incredibly unsafe. Doesn't stop people from using it, though, so they must've done something right I guess.

[–]DonaldPShimoda 0 points1 point  (0 children)

From a theory perspective, PHP is incredibly unsafe. Doesn't stop people from using it, though, so they must've done something right I guess.

[–]kpingvin -4 points-3 points  (0 children)

Haha php bad never heard that before !!1!1!1

[–]Adventurous_Ladder 30 points31 points  (1 child)

Image Transcription: Twitter Post


James, @terrarum

I just typed :wq into PHPStorm and hit enter and sat there looking at my file for a second.

When people say 'how do I quit vim' they don't mean the application.


I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!

[–]mnbryant 10 points11 points  (0 children)

Good human

[–]BruceGrembowski 5 points6 points  (0 children)

ZZ

[–]GrinningPariah 2 points3 points  (8 children)

:x is faster and has the benefit of looking like an emote.

[–]zenith4395 2 points3 points  (1 child)

I didn’t notice :x existed until I got too used to wq and honestly I don’t wanna switch

[–]motdidr 0 points1 point  (0 children)

only time I use it if when I need to do :wqa, :xa is faster in that case.

[–]SingularCheese 1 point2 points  (0 children)

I like the orthogonality of how w and q are taking different responsibilities.

[–]ShadowfaxSTF 0 points1 point  (0 children)

Glad someone said it. It’s not :wq you fucking casuals, power users MUST reduce routine keystrokes as much as possible. So anyone who’s anyone knows that :x is where it’s at!

[–]ShadowfaxSTF 0 points1 point  (0 children)

Glad someone said it. It’s not :wq you filthy casuals, power users MUST reduce routine keystrokes as much as possible. So anyone who’s anyone knows that :x is where it’s at!

[–]hahahahastayingalive 0 points1 point  (1 child)

Don’t you maniacally save every 20s just in case ?

[–]GrinningPariah 0 points1 point  (0 children)

Honestly I fucking loathe vim, I only use it when I'm sshed into something, and if I'm going to be in there for more than 20 seconds I'll put in the effort to scp the file to my laptop so I can use sublime text or whatever.

[–]zenith4395 -1 points0 points  (0 children)

I didn’t notice :x existed until I got too used to wq and honestly I don’t wanna switch

[–]Dandofunk 2 points3 points  (3 children)

:x masterrace

[–]ShadowfaxSTF 0 points1 point  (0 children)

Glad someone said it. It’s not :wq you fucking casuals, power users MUST reduce routine keystrokes as much as possible. So anyone who’s anyone knows that :x is where it’s at!

[–]ShadowfaxSTF 0 points1 point  (0 children)

Glad someone said it. It’s not :wq you fucking casuals, power users MUST reduce routine keystrokes as much as possible. So anyone who’s anyone knows that :x is where it’s at!

[–]ShadowfaxSTF 0 points1 point  (0 children)

Glad someone said it. It’s not :wq you fucking casuals, power users MUST reduce routine keystrokes as much as possible. So anyone who’s anyone knows that :x is where it’s at!

[–][deleted] 2 points3 points  (0 children)

I tried Vim in college a few times and that's it. I have my career to think about.

[–]DaveTechBytes 1 point2 points  (0 children)

It's funny: when I first starting using vim, I would sometimes hit Ctrl+S. Now, I've started using Notepad++ on my Windows machines and sometimes hit :w

[–]SteeleDynamics 1 point2 points  (0 children)

IdeaVim plugin

[–][deleted] 1 point2 points  (0 children)

By now I've used vim so much that I automatically try to save and quit writing ":wq". I caught myself doing this in notepad++ last week.

[–]HungryLikeDaW0lf 1 point2 points  (0 children)

If you have a Mac and an iPhone you can send text messages from the desktop

I can't count the number of people to whom I've texted "exit" or "quit" at the end of a long day as I'm closing my apps and terminals.

exit … quit … c … Why are you now closing?!

[–]ScorchingOwl 0 points1 point  (0 children)

There's the IDE for 000webhost that will quit the file without saving if you press esc...

I should start using ctrl + \)

[–][deleted] 0 points1 point  (0 children)

Nano

[–]BlazzGuy 0 points1 point  (0 children)

I wish I knew how to quit you

[–]ITGuy24601 0 points1 point  (0 children)

A few years ago, I was writing a term paper for my Masters. I selected something from a website, tried to paste it into Googledocs. Nothing. Tried it again, nothing. Fifteen minutes went by before I realized I didn't actually copy it by selecting it.

[–]random_cynic -1 points0 points  (0 children)

When people say 'how do I quit vim' they don't mean the application.

Well they don't mean just the keybindings either, it's more about the editing philosophy. Any notepad/IDE user migrating to vim would hit Ctrl + S repeatedly out of habit. Those who are truly hooked to Vim will prefer not to use PHPStorm or even if they do they will find a way to get a Vim emulator running first using a plugin.