this post was submitted on 27 Dec 2023
157 points (76.4% liked)

linuxmemes

24292 readers
991 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. πŸ‡¬πŸ‡§ Language/язык/Sprache
  • This is primarily an English-speaking community. πŸ‡¬πŸ‡§πŸ‡¦πŸ‡ΊπŸ‡ΊπŸ‡Έ
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  • Β 

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 2 years ago
    MODERATORS
     
    top 50 comments
    sorted by: hot top controversial new old
    [–] [email protected] 65 points 1 year ago (9 children)

    I feel like the images should be switched.

    load more comments (9 replies)
    [–] [email protected] 50 points 1 year ago (5 children)

    If you wanna save changes: :wq

    If not: :q!

    Else: :SpanishInquisition

    [–] [email protected] 5 points 1 year ago

    Hmm, I didn't expect that last one.

    [–] [email protected] 5 points 1 year ago (6 children)

    Why do so many people prefer :wq over :x?

    [–] [email protected] 12 points 1 year ago

    Cause I don't like to think about my x

    [–] [email protected] 7 points 1 year ago

    Because :wq to me means "Issue command write, followed by command quit." "Issue command x" to me means nothing in the context of vim, and ctrl + x on most systems is reserved for cutting, so it just "feels" wrong.

    [–] [email protected] 5 points 1 year ago

    :x was a gamechanger. And it doesn’t update the file’s modify date if you made no changes.

    Sometimes I just sit back and think about all that saved time and effort so much that I have actually lost time by switching from :wq.

    load more comments (3 replies)
    load more comments (3 replies)
    [–] [email protected] 32 points 1 year ago* (last edited 1 year ago) (2 children)

    I prefer the extremely intuitive:

    [C-R]=system("grep -P "PPid:\t(\d+)" /proc/$$/status | cut -f2 | xargs kill -9")

    or

    i:!grep -P "PPid:\t(\d+)" /proc/$$/status | cut -f2 | xargs kill -9[esc]Y:@"[cr]

    It just rolls off the fingers, doesn't it?

    Edit: damn it lemmy didn't like my meme because it assumes that characters between angle brackets are html tags :( you ruined it lemmy

    EDIT 2: rewrote it, just assume that square brackets are buttons not characters

    load more comments (2 replies)
    [–] [email protected] 28 points 1 year ago (25 children)

    I always get annoyed when I'm on some system and nano pops up and I need to figure out how to kill that thing.

    [–] [email protected] 27 points 1 year ago (7 children)

    Nano literally tells you all the shortcuts to your face.

    load more comments (7 replies)
    [–] [email protected] 7 points 1 year ago

    Same. As a vim user I now can't quit nano.

    load more comments (23 replies)
    [–] [email protected] 24 points 1 year ago (1 children)

    There's a button to exit vim on your pc. Just hold it 7 seconds and vim is closed. πŸ˜…

    [–] [email protected] 7 points 1 year ago

    it's right next to the turbo button

    [–] [email protected] 21 points 1 year ago (2 children)

    you don't need the ! when you have the w, because your changes already get saved.

    [–] [email protected] 16 points 1 year ago

    If anything it is dangerous as it will still exit even if changes cannot be saved.

    [–] [email protected] 6 points 1 year ago (2 children)

    Try editing a file in /etc as a regular user. It happens sometimes and you really want that warning that the write failed.

    Anyway, :x is superior. It only writes if there are changes. So, your mtime doesn't change unnecessarily.

    load more comments (2 replies)
    [–] [email protected] 12 points 1 year ago (6 children)
    <ESC>
    <CTRL>+Z
    killall -9 vim
    
    [–] [email protected] 11 points 1 year ago (1 children)

    And then sudo apt install nano

    load more comments (1 replies)
    load more comments (5 replies)
    [–] [email protected] 9 points 1 year ago* (last edited 1 year ago) (1 children)
    load more comments (1 replies)
    [–] [email protected] 9 points 1 year ago
    load more comments
    view more: next β€Ί