this post was submitted on 27 Jan 2024
674 points (98.1% liked)

linuxmemes

21472 readers
1090 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 members of the community for any reason.
  • 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.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 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. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.
  •  

    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 fork-bomb your computer.

    founded 1 year ago
    MODERATORS
     
    top 50 comments
    sorted by: hot top controversial new old
    [–] SzethFriendOfNimi 41 points 10 months ago* (last edited 10 months ago) (6 children)

    It’s easy.

    Escape to exit edit mode : to prefix a command
    q to quit
    ! to confirm

    Now emacs… those people are crazy.

    [–] [email protected] 20 points 10 months ago

    Asking someone to quit emacs when they never tried before is a great method to generate random strings for a secure password.

    [–] turbowafflz 16 points 10 months ago (2 children)

    I used emacs when I first started programming because it was what my dad showed me and I always thought it was easier than vim. Then I used a bunch of other things for a while and mostly use vim now and whenever I try to use emacs I am so confused because it makes so much less sense than vim after actually using both

    [–] [email protected] 10 points 10 months ago (1 children)

    You could always use emacs with evil-mode to have vim key bindings

    [–] [email protected] 5 points 10 months ago* (last edited 10 months ago)

    Evil mode, I like that 🤣🤣🤣.

    [–] SzethFriendOfNimi 4 points 10 months ago

    For me vi was my first experience with it.

    So yeah, I think it’s often about what you’re used to

    [–] [email protected] 11 points 10 months ago* (last edited 10 months ago) (2 children)

    I've always preferred vi commands, they make sense and are mostly abbreviations or regex, all the other editors have the strangest commands...

    To write and quit in vi :wq

    To write and quit in nano: ctrl-o, confirmation dialog about tmp files, ctrl-x, confirmation dialog about exiting... weird feeling that I didn't actually save the file... reopen, okay it saved, ctrl-x, confirmation dialog, weird feeling that I accidently edited the file...

    [–] pete_the_cat 3 points 10 months ago

    I used nano for years until I forced myself to learn the basics of vi(m), now whenever something opens nano by default it annoys me and I immediately change the editor to vim 😂

    load more comments (1 replies)
    [–] [email protected] 10 points 10 months ago

    ! = Force

    Meaning quit without saving. If no changes have been made, you can :q and that will work. If you've fumbled and made any change to the file, you'll need the ! to get it to quit without saving.

    [–] brlemworld 7 points 10 months ago (1 children)
    [–] [email protected] 6 points 10 months ago* (last edited 10 months ago) (1 children)

    WQ = Write and Quit Q! = quit and do nothing else

    Multiline cut, copy, paste is where I forget commands.

    load more comments (1 replies)
    [–] [email protected] 5 points 10 months ago

    with Emacs you're never out of Control

    [–] capital 29 points 10 months ago (2 children)

    I just reboot. Is that not right?

    [–] iAvicenna 10 points 10 months ago

    No you have to shut off from the main circuit breaker, that is the only way to make sure

    [–] [email protected] 7 points 10 months ago

    It's fine if it works for you 👍.

    [–] [email protected] 19 points 10 months ago (3 children)

    In the year 2057, human civilization had made significant strides in technological advancements that transformed their way of living. Computers were no longer just machines but extensions of one's mind, and programming languages became a fundamental part of society. A prominent figure within this world was Vincent, a passionate programmer who swore by his beloved text editor Vi.

    Meanwhile, in another galaxy far away, an advanced alien race called Zorblaxx, discovered Earth during a cosmic journey. With their keen interest in studying intelligent life forms, they intercepted a data stream containing the source code for Emacs. They immediately fell in love with its simplicity and user-friendliness. From that point onwards, the entire Zorblaxx race began using it as their primary tool for coding.

    The first contact between humans and Zorblaxx occurred when a spaceship piloted by a group of fearless astronauts encountered a fleet of alien vessels. The initial meeting was cordial, and both species shared their knowledge of the cosmos. However, when humans revealed they used Vi, the Zorblaxx responded with disdain. They claimed that the Vi editor lacked the basic functionality that Emacs provided.

    This dispute grew beyond petty differences over software preference. Debates erupted amongst developers worldwide. Some advocated for Vi's efficiency while others preached the power of Emacs. Passions ran high, turning what could have been a friendly argument into a worldwide conflict.

    Political leaders took notice and saw an opportunity to rally support for their respective countries. With the rise of nationalistic sentiments, humanity split into two factions: Team Vi and Team Emacs. Nations aligned themselves, and soon war broke out.

    As the violence escalated, Vincent knew there had to be another way. He realized that both sides had something valuable to offer one another, and that a healthy collaboration would lead to better results. He developed a new text editor called Vim, combining the best features of both Vi and Emacs.

    With Vim demonstrating the benefits of unity, both human factions united, joining forces against the invading Zorblaxx. In this unforeseen twist, the two races found themselves fighting side by side, bonding through their love for programming and shared vision for progress.

    The battle raged on for months, but in the end, humanity emerged victorious. Faced with a common enemy, they learned to embrace diversity and to see past their differences. The same spirit was adopted by the Zorblaxx race, leading them to adopt Vim as their primary editor. A new era of peace and cooperation began between the two civilizations, now connected by technology and their mutual passion for programming.

    [–] [email protected] 4 points 10 months ago

    Man, you have to publish this somewhere more prominent than Lemmy 👍.

    Funny, and educational 😂 👍.

    load more comments (1 replies)
    [–] Mango 15 points 10 months ago* (last edited 10 months ago) (2 children)

    I manufacture the material for those suits!

    Edit: I can tell that they're the real thing too. I'm surprised they wouldn't just use a prop. These things are $1600 each!

    [–] [email protected] 9 points 10 months ago

    That's very cool. And I think the studios rent this kind of stuff

    [–] [email protected] 6 points 10 months ago (4 children)

    Shit, really? They went all in for the movie, huh... it's a great movie BTW.

    [–] Mango 3 points 10 months ago* (last edited 10 months ago) (5 children)
    [–] [email protected] 3 points 10 months ago (1 children)
    [–] [email protected] 2 points 10 months ago (1 children)

    no. NO. I LEFT THAT MINDVIRUS BEHIND IN 2021 YOU CAN'T DO THIS TO ME

    [–] [email protected] 2 points 10 months ago

    Does not protect against cognitohazards

    load more comments (4 replies)
    [–] [email protected] 2 points 10 months ago (4 children)
    load more comments (4 replies)
    load more comments (2 replies)
    [–] [email protected] 15 points 10 months ago

    It's a rite of passage! I had to learn it so now you do too! Why, when I was young I used to have to walk to school, uphill both ways, in the snow... :-P

    [–] WhatsHerBucket 9 points 10 months ago (1 children)

    But I wanted to save that :(

    [–] pete_the_cat 6 points 10 months ago (1 children)
    [–] [email protected] 3 points 10 months ago
    [–] [email protected] 7 points 10 months ago (1 children)

    How to exit Vim? C-x C-c and follow instructions...

    [–] cashews_best_nut 3 points 10 months ago (1 children)

    I feel like Emacs is going to suffer with the prevalence of window managers that are shortcut heavy. I looked at learning Emacs but the keyboard shortcuts all interfere with Awesome so it's a nightmare. The only way I'd manage is by switching TTY to terminal with Ctrl+Alt+F-key which kinda ruins it!

    load more comments (1 replies)
    [–] [email protected] 4 points 10 months ago (1 children)

    IMO it’s easier than closing notepad

    [–] [email protected] 3 points 10 months ago

    But not easier than closing npp. Which is just open eternally with 1000+ tabs.

    [–] [email protected] 3 points 10 months ago (2 children)

    Do people use esc for this? It's so far out of the way. Ctrl-c is the "correct" way.

    [–] Opisek 5 points 10 months ago* (last edited 10 months ago)

    C-c is incredibly uncomfortable and bad for your carpal tunnels. What people actually do is remap Esc to Caps-Lock and vice-versa. Nobody needs Caps-Lock in such a prominent spot. Alternatively you remap it to Ctrl, then C-c becomes viable, too.

    load more comments (1 replies)
    [–] Possible_EmuWrangler 2 points 10 months ago

    If in doubt, ^Z

    load more comments
    view more: next ›