648
vimrule (lemmy.blahaj.zone)

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 50 comments
sorted by: hot top controversial new old
[-] nightwatch_admin@feddit.nl 40 points 10 months ago

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

[-] glizzyguzzler@lemmy.blahaj.zone 53 points 10 months ago
[-] nightwatch_admin@feddit.nl 24 points 10 months ago

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

[-] blackluster117@possumpat.io 11 points 10 months ago

You'll have about 6ft of ground afterwards.

[-] SatansMaggotyCumFart@lemmy.world 4 points 10 months ago

That cord is two feet long at best.

[-] Kase@lemmy.world 5 points 10 months ago

It's actually 40 ft long, it's just really big

[-] Kidplayer_666@lemm.ee 3 points 10 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

[-] wander1236@sh.itjust.works 8 points 10 months ago

It's safer than losing your sanity to vim

[-] bestonecrazy@lemmy.zip 17 points 10 months ago
[-] itslilith@lemmy.blahaj.zone 25 points 10 months ago* (last edited 10 months ago)
[-] cupcakezealot@lemmy.blahaj.zone 17 points 10 months ago

lawful good: alias vim=nano

chaotic evil: alias nano=vim

[-] glizzyguzzler@lemmy.blahaj.zone 6 points 10 months ago

I would detonate if someone chaotic evil’d me

[-] Pipoca@lemmy.world 6 points 10 months ago

Setting vim to alias to nano seems just about as chaotic evil as making the VS Code icon take you to notepad.

[-] Pipoca@lemmy.world 4 points 10 months ago

I dunno, those both seem pretty chaotic evil to me.

[-] AVincentInSpace@pawb.social 1 points 10 months ago

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

[-] biscuitswalrus@aussie.zone 15 points 10 months ago

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

[-] Novman@feddit.it 14 points 10 months ago

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

[-] replicat@lemmy.world 8 points 10 months ago

VSCode with the VIM mode plugin is kind of the best of both worlds.

[-] Novman@feddit.it 6 points 10 months ago

I dislike the graphical interface. Console helps me to be more productive.

[-] soupuos@sopuli.xyz 1 points 10 months ago

Maybe it was just me, but I found VSCode's undo/redo vim trees (u/r) to be kind of awkward when compared to real vim.

[-] janabuggs@beehaw.org 1 points 10 months ago

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 10 months ago

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

[-] Anti_Weeb_Penguin@sh.itjust.works 13 points 10 months ago

How to use Vim: 1- Don't use it. 2- Use Nano or Gedit lmao.

[-] takeda@lemmy.world 9 points 10 months ago

Until those are not available.

This is a pisspoor attitude to have, just fire up vimtutor and you will know how to use it in no time.

[-] Sanyanov@lemmy.world 7 points 10 months ago

Unless you're a sysadmin who deals with very obscure systems, you'll always have access to nano, so why bother?

Vim elitists love to brag about how cool Vim is, but pretty much never properly elaborate. Why should I learn all those obscure commands to just edit some text? What's the point?

[-] Jumuta@sh.itjust.works 6 points 10 months ago

it feels smooth
the movement is very fast and precise
you don't need to move your hand for arrow keys so it's nice when you're lazy
i dont use vim anymore though, i use helix because it's purple

[-] Sanyanov@lemmy.world 3 points 10 months ago

Lol

Gotcha!

[-] thews@lemmy.world 3 points 10 months ago

I learned them and basically never use vim.

I use sed if i need to change things with a pattern, cat the file if i need to see the contents, use head or tail if its too much to fit on the screen.

If I am writing code, I use a code editor. Emacs and vim can do a lot, but they can also fuck off.

[-] Pipoca@lemmy.world 3 points 10 months ago

Even not being a vim wizard, editing code without vim keybindings feels... slow.

Yeah, I could grab the mouse, highlight everything between the arguments to a function and hit delete. Or I could just go to the open paren and just hit d%. I could grab the mouse, highlight the line and hit delete, or I could literally just type dd.

And trying to edit things in nano is positively masochistic.

[-] Sanyanov@lemmy.world 1 points 10 months ago

Why would someone edit the actual code (not configs) from the terminal? That by itself sounds like a masochistic endeavor. But I might be missing something.

[-] Pipoca@lemmy.world 2 points 10 months ago* (last edited 10 months ago)

I used to do it more back in college where I'd ssh into the schools computers to work on assignments. It's still sometimes useful if you're in the console and want to edit something quickly.

However, there's e.g. macvim and gvim which are literally just vim in a gui; they give you menus and the ability to drag panes and click to move your cursor. With a decent LSP setup they can actually be pretty nice.

And most other decent editors have vim emulation of various quality levels. Emacs is a bit buggy, but it's really useful if you want to code in agda or clojure. And VS Code has fairly decent vim emulation.

[-] Sanyanov@lemmy.world 1 points 10 months ago

I see, thank you for clarification!

[-] Slotos@feddit.nl 1 points 10 months ago
[-] GluWu@lemm.ee 2 points 10 months ago

Why, just use notepad, they're just text editors.

[-] phorq@lemmy.ml 9 points 10 months ago

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

[-] Dasnap@lemmy.world 7 points 10 months ago
[-] Draconic_NEO@lemmy.dbzer0.com 6 points 10 months ago* (last edited 10 months ago)

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

[-] zorro@lemmy.world 6 points 10 months ago

I think someone else mentioned this but just run vimtutor in your command line for a pretty exhaustive tutorial.

[-] AeonFelis@lemmy.world 5 points 10 months ago

Doesn't work with laptops.

[-] glitches_brew@lemmy.world 10 points 10 months ago

It does, but it takes longer

[-] reverendsteveii@lemm.ee 2 points 10 months ago

Yeah it does, it just takes longer

[-] al177@lemmy.sdf.org 5 points 10 months ago

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

or [ESC] :q!

YMMV

[-] Smorty@lemmy.blahaj.zone 4 points 10 months ago

Type :q to exit.

[-] Kerb@discuss.tchncs.de 4 points 10 months ago

:killall -9 vim

[-] HappySloth@discuss.tchncs.de 2 points 10 months ago

This is the way!

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

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

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

196

16440 readers
1643 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