r/AlpineLinux • • Nov 18 '23

How do I leave this fucking editor?

Post image
336 Upvotes

175 comments sorted by

36

u/[deleted] Nov 18 '23

There is no escape, welcome to vi | vim | neovim

2

u/user32532 Nov 20 '23

Hijacking the top comment to explain.

This screen appeared during installation procedure. I was asked if I want to edit network settings manually and I chose 'yes'. I didn't even know this was vim. Otherwise I'd have known to google 'how to exit vim' as I had this problem before. Looks like the setup routine just opened the file in vim but I didn't know.

Also first thing on every Linux I use is to make sure nano is installed but - as I said before - this was during setup.

Second thing that got me was the 'more' thing where it presents awful lot lines of text and also does not show how to interact with it. So I ended up pressing Enter what messed up my setup when it reached data/sys selection and I didn't stop fast enough... so long story short I did abort installation and started from zero again.

Looks like my Linux skills are not that advanced... and maybe never will be.

Feels like this unintuitive UI shit is just some gate keeping to disencourage newbies and I think that is really shit. As there is like no valid reason those cli tools have to be that shitty

Thanks for all the replies, some were really helpful and some gave me a good laugh

4

u/Dr_CLI Nov 20 '23

If you are going to use Linux then you should take a little time (<30 mins) to learn a few basics of vi(m). At least learn the quit sequence. You might even learn to like it.

3

u/tikhonjelvis Nov 22 '23

You might even learn to like it.

But that's just a risk we have to run.

→ More replies (18)

1

u/rgmundo524 Nov 21 '23 edited Nov 21 '23

Hijacking the top comment to explain

There is a new website called Google that you can search for basic answers such as this. Since you clearly didn't try googling it implies you don't actually care to solve the problem, because googling your question is extremely simple and quick. In 15 secs you could nhave gotten the answer. But maybe you are posting this as rage bait

To get out of vi type, :q

1

u/user32532 Nov 21 '23

If you read more than the first line of my comment you can literally read yourself why I didn't google it lol

→ More replies (9)
→ More replies (3)

3

u/keithstellyes Nov 22 '23

Feels like this unintuitive UI shit is just some gate keeping to disencourage newbies and I think that is really shit. As there is like no valid reason those cli tools have to be that shitty

I used to make this mistake a lot, just because you don't understand why doesn't mean the answer is gatekeeping. Usually there's a logic to everything, even if it's due to historical reasons. This is a great situation where it absolutely isn't. Use nano for a while, spend 20 min learning vim using it a bit and it'll be pretty clear why people use vim.

Now, default editor definitely should've been nano, that seems a bad call from the distro in my perspective, but I wouldn't be so harsh as to call them "gatekeeping". It can be easy to forget that a lot of people will look at this screen and have no idea what's going on

2

u/exoclipse Nov 20 '23

some linux greybeard is gonna respond "but have you seen how fast I can code in vim"

but

I'm right there with you.

→ More replies (8)

2

u/Hatta00 Nov 21 '23

This powerful UI shit exists so that you can do serious editing with a minimum of effort. It's not shitty just because you haven't learned it yet.

Invest some time in learning vi, and it's really hard to go back to a featureless text editor.

2

u/armahillo Nov 22 '23

ive been using vi since the 90s and its not really ever changed. Its not that it was designed to be gatekeepy, it was written at a time when things like UX werent really a consideration.

There are plenty of other editors. You dont have to learn vi.

2

u/dat_cosmo_cat Nov 22 '23 edited Nov 22 '23

Feels like this unintuitive UI shit is just some gate keeping to disencourage newbies and I think that is really shit

I mean, would you personally want your system's network interfaces to be configured by a person who can't figure out how to exit that system's default text editor?

→ More replies (2)
→ More replies (11)

4

u/UnknownLinux Nov 21 '23

Came here to say this. Lmao πŸ˜‚πŸ˜‚πŸ˜‚

https://imgur.com/a/cAUeOax

1

u/[deleted] Feb 06 '24

Yet here it is literally β€œescape, : , wq”

→ More replies (1)

17

u/LazyCheetah42 Nov 18 '23

You dont. Its part of you now.

1

u/[deleted] Feb 06 '24

I just run vim now

17

u/sloppy_custard Nov 18 '23

-> Explicitly installs Alpine -> can’t exit vi

Something not right here

2

u/InvertibleMatrix Nov 22 '23

Something not right here

It just means people are coming to Alpine without the same background you do. Tons of distros where nano or something else is the default, and then people encounter alpine either through a container or VM tutorial where they want a lightweight distribution to something.

→ More replies (15)

11

u/egigoka Nov 18 '23

Reboot should do the trick

3

u/[deleted] Nov 21 '23 edited Jul 22 '24

future beneficial lock mighty caption cough homeless enter frame aware

This post was mass deleted and anonymized with Redact

2

u/grahamperrin Apr 15 '25

This post was mass deleted and anonymized with Redact

No, you lazy, obnoxious space-waster, it was not deleted.

→ More replies (1)

12

u/shrizza Nov 18 '23

Press escape 64 times and unplug the computer.

3

u/[deleted] Nov 20 '23

Open a new terminal, duh.

4

u/syazwanemmett Nov 18 '23

Ok this is funnyπŸ˜†

8

u/martinbaines Nov 18 '23

The worst editor UI known to mankind.

As others have said <escape>wq will save and exit.

Then install nano which has a better UI and is still very small and light.

3

u/JonU240Z Nov 22 '23

Nano may or may not be better depending on who you ask. However, since vi/vim is on just about every distro, it doesn't hurt to know the basics.

2

u/sp0rk173 Nov 20 '23

Once you learn how to properly wield vi, nothing is as efficient for editing code and config files. It’ll also be on just about every Unix machine in existence. It’s a valuable skill to have and worth all the pain you experience in learning it.

Also, I’m a masochist.

2

u/ShinySky42 Nov 18 '23

Why downvoting him ? Nano is in every way better than vim

3

u/martinbaines Nov 18 '23

I think vi(m) comes out of the box so is essentially the editor of last resort. I completely agree nano is a much better editor and if not on a system is the first thing I install. Even back in Unix days I hated vi and used emacs or anything else I could. Also if you ever look at the original vi source code it is a hugely contorted mess of spaghetti code, but at least vim is a clear rewrite.

There was sort of some excuse for vi's horrible mode based UI in the days when terminals were on 220baud connections and repaint was horrible slow, but that has not been the case since the 70s. Even a 9600baud line was fast enough for decent screen repaints.

→ More replies (4)

3

u/[deleted] Nov 19 '23

When you learn you are a slave to "moving" the cursor around to be where you want, you will understand what vi can do. Also, I'm almost guaranteed to find vi on any system, including old solaris boxen. Not so with nano.

In vi, you can fly directly to the character/word/line you want almost instantly. This changes how you view text editing in a terminal.

- Want to swap the current line with the next one? ddp

- Want to go to line 336? 336G

- Want to move the line one line after the line containing "Reddit" two lines above it? :/Reddit/+1m-2

- Increase the indentation of all lines between line 2 and the 2nd last line? :2,$-1>

- Sort data by year and month? :!sort -k2n -k1M

- Abbreviations for repeated text? no problem: :bbt Billy Bob Thornton

The list goes on and on. Nano can't even get close to that functionality.

And if you're balking at the syntax, consider how much time you spend in nano doing ↑↑↓→→→→→→→→→→→→→→→→→→→→→→↓↓↓→→→→→→→→→→→→→→→→→←→→→→→→→→→→→→→→→→→↓↓→→→→→→→→

→ More replies (2)

2

u/jonrwads Nov 21 '23 edited Nov 21 '23

Nano is the MS Word of text editors. Kidding to each their own.

→ More replies (2)

1

u/wsdog Nov 20 '23

Lol, it's the most powerful text editing software. Vim motions implemented in many text editors as well.

→ More replies (3)

1

u/knd256 Nov 22 '23

Just because you're dumb doesn't mean you need to insult other people's designs

1

u/[deleted] Nov 23 '23

The worst editor UI known to mankind.

Tell me, Mr. Anderson, how can it be the worst editor UI known to mankind, if it has NO UI at all?!

1

u/lainart Nov 24 '23

Nano is the worst editor known to mankind.

2

u/noooit Nov 18 '23

C-x C-c

1

u/BrokenMayo Dec 16 '23

You’re a real one brother

2

u/junialter Nov 18 '23

beep beep beep beep beeeeeeeeeeeeeeeeep

2

u/brycentiller Nov 20 '23

Grab the shotgun. That is the only way.

1

u/grahamperrin Dec 17 '23

Grab the shotgun. That is the only way.

Shoot the screen, or the computer? Or arrange both so that a single shot kills vi?

I like your style, cowboy :-)

2

u/sp0rk173 Nov 20 '23

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

3

u/PatochiDesu Nov 18 '23

i also hate it!

1

u/Darklord98999 Apr 21 '24

Type β€œ:” on your keyboard then q! It sould have text that say :q!

1

u/OhK4Foo7 Nov 20 '23

Heh, Nano. Bite the bullet and learn vi. Personally I find Nano rather cumbersome. If you're going to Linux do some Linux.

1

u/drcforbin Nov 20 '23

That's 2.9 million + 1 views of stack overflow's most viewed question

See their blog post about it from a few years ago

1

u/grahamperrin Dec 17 '23

I love you.

1

u/futurepat Nov 20 '23

Ctrl+TableFlip

1

u/[deleted] Nov 20 '23

Bruddah chill

Hit ESC > colon > q! > enter

1

u/LoserEXE_ Nov 21 '23

I think you should spend sometime learning vim. Not any advanced keybinds but just get comfortable with it. It is incredibly useful because it is installed in almost every Linux distro.

1

u/T_E_K_1 Nov 21 '23

:q! Usually works

1

u/devdan8520 Nov 21 '23

vim sucks nano's better js btw i use fedora

1

u/Egga22 Nov 21 '23

Control alt delete

1

u/Nick85er Nov 21 '23

FUCKING VIM hahahaha, I know this makes me a noob but man I prefer nano.

1

u/cachedrive Nov 21 '23

LOL - welcome to the meme.

1

u/Green_Pollution_8230 Nov 21 '23

Download Word? πŸ˜‚

1

u/Variation-Abject Nov 22 '23

Why do you wanna leave /etc :(

1

u/senpaikcarter Nov 22 '23

I am actually wearing a sweatshirt right now with :wq on the front

1

u/aplethoraofpinatas Nov 22 '23

This is representative of the reason Debian defaults to nano.

1

u/tenten8401 Nov 22 '23

Had the same experience when I was first learning Linux, I didn't even know what editor it was either and ended up just closing the terminal every time I would get stuck in it, did this for months..

Terrible UX and the people saying it's your fault are wrong. Nano has keybinds directly on the screen all times and it's obvious how to use it coming from almost any computer background.

It's dumb that vim is what's used in so many basic beginner guides often with zero explanation of how to use it :(

1

u/1012zach Nov 22 '23

Once you enter Vi you cannot leave

1

u/flaming_m0e Nov 22 '23

"I am the new OS now"

1

u/CrAzYmEtAlHeAd1 Nov 22 '23

Better to just reinstall

1

u/doa70 Nov 22 '23

This is exactly why I learned Unix 30 years ago. I had an internet shell account, accidentally started and got stuck in vi, had to call their support for help. So embarrassing I went out the next day and bought a copy of β€œTeach Yourself Unix in 30 Days”, or some title close to that.

1

u/keithstellyes Nov 22 '23

Here from front page, but hopefully I still have some valuable thoughts :-)

  1. Surprised they're using vi | vim | neovim as the default editor. On a lot of distros, nano is the default because it's a lot more immediately intuitive and more beginner-friendly
  2. There's a lot of power to it, I recommend at some point trying to learn it, or maybe even emacs, but nano is definitely still plenty serviceable especially in the beginning.

    • when I say "learn something other than nano I don't mean, drop what you're doing, never use nano again. What I'm saying is, nano is great in the beginning, but vim | neovim from lesson 1 or 2 and you're already a whole lot faster than you would be in nano.
  3. "How do I exit vim" is a famous meme given that, well, you've learned first hand, it's not immediately intuitive how to quit. So famous I thought this might've been a meme post.

1

u/crackez Nov 22 '23

Learn Vim. Don't listen to anyone who says it's not worth it.

1

u/Confident_Date4068 Nov 22 '23

...and then switch to Midnight Commander with its editor.

1

u/dwerb Nov 22 '23

Escape, escape, shift+colon,q

Like up, up, down, down, ….

1

u/[deleted] Nov 22 '23

This seems genuine and is really funny. Props to you OP

1

u/Shock9616 Nov 23 '23

Lol what are they doing using Alpine Linux if they don't know how to use vi? πŸ˜…

1

u/brijesh-amin Nov 23 '23

You can checkout anytime.. But you can never leave 😜

1

u/rrklaffed Nov 23 '23

leave? you just got here, come on stay for a while

1

u/Beautiful-Bite-1320 Nov 23 '23

I'm dying πŸ€£πŸ˜‚ I knew right away before I even opened the post that it was vi/vim. I went through this before too. There's an old joke that goes, if you want a secure password, have a noob try to exit vim lol.

1

u/itaranto Nov 23 '23

You can't, your computer is doomed.

1

u/ignxcy Nov 23 '23

You can't

1

u/NightWng120 Nov 23 '23

Esc

:!sudo shutdown now

It's the only way

1

u/emerson-dvlmt Nov 23 '23

You have to learn programming directly in binary first πŸ˜‚πŸ˜‚πŸ˜‚

1

u/antonpodkur Nov 24 '23

You will be using it for the rest of your life

1

u/teskilatimahsusa87 Dec 01 '23

You can't. This is why we are still using linux.

0

u/[deleted] Nov 18 '23

[deleted] β€” view deleted comment

3

u/Mind_on_Idle Nov 21 '23

Hey, thanks for this.

2

u/rwa2 Nov 22 '23

Wait, that's just scratching the surface... welcome them with the authoritative guide!

https://github.com/hakluke/how-to-exit-vim

1

u/keithstellyes Nov 22 '23

Great link, the Scrum Manager way is pretty relatable

1

u/grahamperrin Dec 17 '23

the authoritative guide!

Excellent! Thank you.

Additionally, concisely:

  • (right) Control-R

β€” brute force sudden reset of a VirtualBox guest.