this post was submitted on 25 Dec 2023
314 points (100.0% liked)

196

664 readers
42 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS
 

First time when you ssh into your Linux terminal and you gotta “sudo crontab -e” or something and it’s like “what editor do you want to use?” and nano sounds lame so you choose vim cause the sound is cool when you say it and then you have to wipe the whole comp and start over

top 26 comments
sorted by: hot top controversial new old
[–] nightwatch_admin@feddit.nl 23 points 9 months ago (1 children)

Off-topic: never unplug this way, it’s bad for your cable and potentially dangerous.

[–] glizzyguzzler@lemmy.blahaj.zone 38 points 9 months ago (2 children)
[–] nightwatch_admin@feddit.nl 15 points 9 months ago (1 children)

It’s got ground so it’s certified safe!

[–] blackluster117@possumpat.io 7 points 9 months ago

You'll have about 6ft of ground afterwards.

[–] Kidplayer_666@lemm.ee 3 points 9 months ago

I wanted the rest of the song. I asked Bing to make it, sorry Copilot. I am not disappointed

You heard there was a secret chord That you could use to meet the Lord 'Cause you don't care about power safety, do ya? You plugged it in without a thought And then you saw a bright blue spark And from your lips you screamed a loud "Hallelujah!"

Hallelujah, Hallelujah Hallelujah, Hallelu-u-u-u-jah

Your room was dark, you smelled some smoke You realized you made a joke Of basic rules of electricity, didn't ya? You tried to find another plug But all you got was just a shrug And from your phone you heard a low "Hallelujah!"

Hallelujah, Hallelujah Hallelujah, Hallelu-u-u-u-jah

You called the landlord right away He said he'd come and fix the fray But he would charge you extra for the labor, yeah You felt a pang of guilt and shame You knew you only had yourself to blame And from your wallet you let out a sigh "Hallelujah!"

Hallelujah, Hallelujah Hallelujah, Hallelu-u-u-u-jah

[–] AVincentInSpace@pawb.social 21 points 9 months ago* (last edited 9 months ago) (2 children)

How do I exit Vim?

escape colon w q

One of life's great mysteries

escape colon w q

I'm pretty sure it's impossible

it is literally. the first result on google.

The best way is to change to another terminal and forcequit it from there

escape then Shift+Z twice also works. or shift+Z shift+Q to quit without saving.

Or hard restart your entire computer

Are you people allergic to search engines or someth--

Bill Joy made vi impossible to exit because he wanted the source to always be open

siiiiiiiiigh

Yes, I'm an old man yelling at cloud, but Vim and Neovim are fantastic text editors that really are worth the half hour you'll spend running through the tutorial to learn them, and the subsequent two weeks you'll spend installing plugins and configuring it exactly to your liking. It really does make writing software more efficient and really doesn't deserve the reputation it gets from "vim is hard to exit lmao" memes made by people who haven't bothered to change their $EDITOR to nano, had it launch automatically when they tried to write a commit message, and instantly decided it was just yet another piece of arcane 80s Unix bullshit

[–] glizzyguzzler@lemmy.blahaj.zone 2 points 9 months ago

First time using Linux and in a job setting isn’t the time to get Vim’d, so yeah I dipped. Don’t judge too hard pls!

[–] reverendsteveii@lemm.ee 1 points 9 months ago (1 children)

it's literally the first result on Google

Okay, how do I Google in vim?

[–] AVincentInSpace@pawb.social 1 points 9 months ago* (last edited 9 months ago)

step 1. alt
step 2. tab

alternately:
step 1. switch VTs back to your desktop environment and Google it there

if you're using vim without a GUI running at all (I hate embedded systems too):
step 1. you still have your phone on you, right

[–] bestonecrazy@lemmy.zip 14 points 9 months ago (1 children)
[–] itslilith@lemmy.blahaj.zone 22 points 9 months ago* (last edited 9 months ago) (1 children)
[–] bestonecrazy@lemmy.zip 13 points 9 months ago (1 children)
[–] itslilith@lemmy.blahaj.zone 14 points 9 months ago

you have escaped

[–] Novman@feddit.it 12 points 9 months ago (1 children)

I develop only in vim, i find it way better that any modern gui.

[–] janabuggs 1 points 9 months ago (1 children)

Native vim? Or with an elaborate preference file?

I personally have grown so accustomed to vim that if I have to ssh to a new (to me) server I would rather use stock vi (which in most systems is actually an alias for vim) to any other editor. But honestly I have made an alias for a script that ports over my elaborate vimrc file for every first login to a new server or instance lol. It makes me feel a little like a diva 💁💅

[–] Novman@feddit.it 2 points 9 months ago

Vim with a minimal preference file, but sometimes vim only, i don't like vi cause it lacks syntax highlighting

[–] phorq@lemmy.ml 8 points 9 months ago

Who told you to add a job to your root crontab? Vim was just protecting you from yourself

[–] biscuitswalrus@aussie.zone 8 points 9 months ago

Quitting Vim is called 'escaping' because it was designed to be a trap and you've escaped. Congratulations to everyone who has.

[–] cupcakezealot@lemmy.blahaj.zone 8 points 9 months ago (2 children)

lawful good: alias vim=nano

chaotic evil: alias nano=vim

[–] AVincentInSpace@pawb.social 7 points 9 months ago

If I typed vim and it opened nano I would start looking for people to kill

[–] glizzyguzzler@lemmy.blahaj.zone 2 points 9 months ago

I would detonate if someone chaotic evil’d me

[–] al177@lemmy.sdf.org 6 points 9 months ago

[CTRL][ALT][PrtSc]-K-S-U-B

or [ESC] :q!

YMMV

[–] Draconic_NEO@lemmy.dbzer0.com 4 points 9 months ago* (last edited 9 months ago)

:q it's very easy. You could also just close the terminal window and easily escape that way.

[–] Kerb@discuss.tchncs.de 4 points 9 months ago

:killall -9 vim

[–] Smorty@lemmy.blahaj.zone 4 points 9 months ago

Type :q to exit.

[–] HappySloth@discuss.tchncs.de 2 points 9 months ago

This is the way!