r/Python • • Apr 01 '19

Stack overflow helping 1 million people to exit out of vim πŸ˜‚

https://stackoverflow.blog/2017/05/23/stack-overflow-helping-one-million-developers-exit-vim/
68 Upvotes

23 comments sorted by

2

u/[deleted] Apr 02 '19

How is this related to Python?

1

u/joetifa2003 Apr 02 '19

Vim is a text editor that can be used to edit python files or sending a message to your girlfriend it's up to you how you use it.

18

u/nevermorefu Apr 01 '19

I've used vim countless times but still had a brain fart and had to ask an employee today. Maybe that's why I usually use nano.

18

u/MeatPowers Apr 01 '19

Nano squad rise up

1

u/tunisia3507 Apr 02 '19

Micro might be up your alley!

-19

u/[deleted] Apr 01 '19

[removed] β€” view removed comment

5

u/[deleted] Apr 02 '19

Yea if you can't exit Vim you suck!! IntelliJ? Sucks. VS Code? Sucks! Emacs? SUCKS!

Reeeeeeal programmers use Vim and if you don't then you're a LOOOOOOSER!!!!!

Hahahaha none of you wannabe coders better mess with /u/netgu because he's a real cool guy!

-3

u/netgu Apr 02 '19

More like it's been around longer than anything else you use (for the most part) and is such a joke that I can't understand how anyone can't exit it after their first time experiencing it. Elsewise, yes - you are the dumb.

5

u/nevermorefu Apr 01 '19

A little, but I'm pretty numb to it at this point.

3

u/Alisoft21 Apr 01 '19

πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚

2

u/[deleted] Apr 02 '19

Literally had to google that like a week ago

3

u/mindchasers Apr 01 '19

Vim is awesome!

1

u/[deleted] Apr 01 '19

:qw! Any questions? :)

5

u/tomwolber Apr 01 '19

I don’t think :qw actually writes - can’t write to a file after you close it in the editor.

I believe :wq is the preferred method of writing and quitting.

3

u/Pvt_Haggard_610 Apr 01 '19

Yes. What does :qw! mean?

4

u/kernco Apr 01 '19

"q" is the command to quit, and "w" is the command to write (save) the file. This just does both. The "!" tells it to ignore warnings, for example if the file is write-protected it will override that (assuming user has permissions) or if the user doesn't have write permission, it will quit anyway without saving.

1

u/[deleted] Apr 02 '19

Yes, I inverted them... honestly if it weren’t for the powerful regular expression and also the fact the syntax highlighting is bad ass ... I would use Nano any day. I haven’t tried Emacs yet but I heard good things.

1

u/GalapagosRetortoise Apr 02 '19

I accidentally hit some other key and now its only typing β€œ:qw!” into my init.el file overwriting the other text that was already in there.

1

u/[deleted] Apr 02 '19

"escape shift colon double-u q exclamation mark enter. Wait no only press shift for the colon... No you need to put the wq before you press enter... Oh yea you're in insert mode now so just press escape... AHHH"

Or, my preferred solution,

cat "alias vim='nano'" >> ~./bashrc

1

u/IcanCwhatUsay Noob Apr 02 '19

What is vim?

1

u/[deleted] Apr 02 '19 edited Apr 02 '19

Vim is a text editor used for coding. It was extremely popular in the early days of computing along with it's competitor, emacs. Vim does not have a graphical user interface like VS Code or XCode. It is entirely displayed through the terminal and there is a very expressive (and complicated) set of key commands to control it.

Today most people use other IDEs because having a GUI is nice and a lot less of a learning curve.

1

u/197708156EQUJ5 Apr 02 '19

There is gvim. I use it (software engineer) for editing text that takes 1 simple regex as oppose to 7 thousand clicks in Eclispe. Remember, even at init 3, vi is always available

btw

:x or :q! or :wq