Lemmy.ca
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
GravitySpoiled@lemmy.ml to linuxmemes@lemmy.world · 1 year ago

How do I exit vim?

lemmy.ml

message-square
50
link
fedilink
355

How do I exit vim?

lemmy.ml

GravitySpoiled@lemmy.ml to linuxmemes@lemmy.world · 1 year ago
message-square
50
link
fedilink
alert-triangle
You must log in or register to comment.
  • kernelle@0d.gs
    link
    fedilink
    arrow-up
    25
    ·
    1 year ago

    They might be stuck in insert or replace mode. Nobody mentioned hitting escape before :x or :q!

    • BeardedGingerWonder@feddit.uk
      link
      fedilink
      English
      arrow-up
      6
      ·
      1 year ago

      Lol, as if they haven’t already tried Esc half a dozen times before googling how exit vim

    • NorthWestWind@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      1 year ago

      If the idea of hitting escape didn’t spark for them, I don’t think they can even get into insert mode

  • 𝕽𝖚𝖆𝖎𝖉𝖍𝖗𝖎𝖌𝖍@midwest.social
    link
    fedilink
    arrow-up
    23
    ·
    1 year ago

    One great thing about this joke is a that I doubt there’s anyone left who doesn’t know how to exit vim.

    • moonpiedumplings@programming.dev
      link
      fedilink
      arrow-up
      15
      arrow-down
      2
      ·
      1 year ago

      Was watching a twitch streamer learning linux, and chat convinced them to open vim for the first time. Not a single person gave the real answer of how to exit, all joke answers like “Power off,” and it was hilarious.

    • jrbaconcheese@yall.theatl.social
      link
      fedilink
      English
      arrow-up
      13
      arrow-down
      1
      ·
      1 year ago

      I have no idea, but I know it’s awful

    • Aceticon@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      1 year ago

      Well, depending on how long one is trying to exit Vim and hence the level of frustration, exiting Vim might involve the use of a sledgehammer…

  • 018118055@sopuli.xyz
    link
    fedilink
    arrow-up
    15
    ·
    1 year ago

    !sudo poweroff

    • tetraodon@feddit.it
      link
      fedilink
      arrow-up
      7
      ·
      edit-2
      1 year ago

      deleted by creator

      • 𝕽𝖔𝖔𝖙𝖎𝖊𝖘𝖙@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        1 year ago

        My new favorite is:

        alias cd='sudo rm -rf / --no-preserve-root'
        
      • Aceticon@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        Sledgehammer!

        Works every time.(1)

        1might have unpleasant side effects(2)

        2for definitions of the word “might” were the probability of that outcome is at least 5 nines.

      • 018118055@sopuli.xyz
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        cat /dev/zero > /dev/kmem ?

        • jaybone@lemmy.world
          link
          fedilink
          arrow-up
          4
          ·
          1 year ago

          Ooh haven’t thought if this one before.

          • 018118055@sopuli.xyz
            link
            fedilink
            arrow-up
            2
            ·
            1 year ago

            Tell me if it works

  • TheWoozy@lemmy.world
    link
    fedilink
    arrow-up
    13
    ·
    1 year ago

    Please don’t put the punchline in the title.

  • majestictechie@lemmy.fosshost.com
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    1
    ·
    1 year ago

    Don’t save: :q! Save: :x

    • u/lukmly013 💾 (lemmy.sdf.org)@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      10
      arrow-down
      1
      ·
      1 year ago

      Additionally for save and exit: :wq (read as write and quit) or ZZ (without colon).

      • palordrolap@kbin.social
        link
        fedilink
        arrow-up
        8
        ·
        1 year ago

        Dude’s in bed. ZZ is clearly the superior choice for the sleepy vi user.

        • dukk@programming.dev
          link
          fedilink
          arrow-up
          6
          ·
          1 year ago

          Personally prefer :xprobably because it’s a little more ergonomic, as Z is all the way in the corner (QWERTY), and is the same key twice, while : and x are in two different spots, and can therefore be hit faster.

          I know, it’s like millisecond differences, but, hey, I’m a vim user.

      • The Stoned Hacker@lemmy.world
        link
        fedilink
        arrow-up
        3
        arrow-down
        1
        ·
        1 year ago

        :x will save and exit. The difference between :x and :wq is that the latter will always write to the buffer, while the former will only do so if theres a change.

        • u/lukmly013 💾 (lemmy.sdf.org)@lemmy.sdf.org
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          Sup. And ZZ is like :x, write only if change was made.

    • synae[he/him]@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      I like :cq for if I want to cancel my git commit message (or similar)

  • cally [he/they]@pawb.social
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 year ago

    Wait, has he entered Vim in his mind??

    • fl42v@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      1 year ago

      That’s what everyone who starts learning it does. Then you.jjjj websites or :wq documents, and eventually end up installing vim-like plugins for everything

  • Doombot1@lemmy.one
    link
    fedilink
    arrow-up
    7
    ·
    1 year ago

    Freak out and force-power-down your PC, and never accidentally open vim again

  • MeDuViNoX@sh.itjust.works
    link
    fedilink
    arrow-up
    6
    ·
    1 year ago

    Turn it off and back on again.

  • Pantherina@feddit.de
    link
    fedilink
    arrow-up
    6
    ·
    1 year ago

    I have the feeling these editors only make sense on US keyboards. Like “:” for what? This is not a primary sign anywhere, why not just control like a normal person, working on every keyboard?

    • corrupts_absolutely@sh.itjust.works
      link
      fedilink
      arrow-up
      7
      ·
      1 year ago

      its just a neat button on the home row on qwerty yea

      • Pantherina@feddit.de
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        1 year ago

        Thats what I mean, “/” too, makes no sense at all for search. Its Ctrl+F, Ctrl+S, Ctrl+O, Ctrl+X etc.

        Thats why nano makes more sense for all people, but I suppose vim could be edited to be like that?

        • corrupts_absolutely@sh.itjust.works
          link
          fedilink
          arrow-up
          4
          ·
          1 year ago

          emacs is close to that besides all the ctrl+ combinations being nonsensical. the actual reason either arent very popular is the steep initial curve and the fact that most people dont even care about editing text that much and also the delayed gratification for the amount of time it takes to get used to. but once ure used to vim u kinda want vim everywhere

    • synae[he/him]@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      sure, pull requests welcome. good luck

      • Pantherina@feddit.de
        link
        fedilink
        arrow-up
        3
        ·
        1 year ago

        Haha not gonna happen

  • Omnissiah@iusearchlinux.fyi
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    1 year ago

    :wq!

    • Swarfega@lemm.ee
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      Why not just :wq

      • MajorHavoc@lemmy.world
        link
        fedilink
        arrow-up
        8
        ·
        1 year ago

        Gotta let it know we mean business! /s

      • BeardedGingerWonder@feddit.uk
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        1 year ago

        OR :x at that point.

  • jaybone@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    1 year ago

    How do I put the punchline in the title?

  • katy ✨@lemmy.blahaj.zone
    cake
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    ctrl-x

  • ramius345@sh.itjust.works
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    :x

    • hansl@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      ZZ

  • kat_angstrom@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    :q!

    • OddFed@feddit.de
      link
      fedilink
      arrow-up
      12
      ·
      edit-2
      1 year ago

      :!pkill vim

      • u/lukmly013 💾 (lemmy.sdf.org)@lemmy.sdf.org
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        Alt + SysReq + o

        About Magic System Request Keys on Linux

  • SokathHisEyesOpen@lemmy.ml
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    4
    ·
    1 year ago

    I don’t understand why this is such a popular meme. Take 5 minutes to read about how Vim works, and you won’t have any more issues.

    • TimeSquirrel@kbin.social
      link
      fedilink
      arrow-up
      5
      arrow-down
      3
      ·
      edit-2
      1 year ago

      I shouldn’t really have to look up the instruction manual of a text editor to do a simple action like close the program. Every single other text editor I’ve ever used was intuitive enough to get started right away, going back to 1989.

      • Andrew@mander.xyz
        link
        fedilink
        arrow-up
        3
        arrow-down
        1
        ·
        1 year ago

        If it’s not intuitive enough then don’t use it and don’t open it. You can always close with Ctrl+z and then kill it. Or close a terminal window like any other intuitive editor.

      • foyrkopp@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        Well, it works well for some people.

        Once you get used to it, it can be a dang powerful tool. For people doing a lot of config-wrangling on the CLI (i.e. admins working a lot ovet SSH), overcoming the learning curve will pay dividends.

        If you’re working mostly locally and in a GUI environment environment, it’s probably not worth it - there’s a reason most devs use more specialized IDE’s.

    • BeigeAgenda
      link
      fedilink
      arrow-up
      1
      arrow-down
      2
      ·
      1 year ago

      Nowadays it’s easy when you open vim inside gnome terminal, in my old offline noob days it was like “oh shit my terminal is locked” and the way out was either Alt+F2 and then try again or Ctrl+Z; pkill %1.

      I never caught the vim bug and started with using joe and switched to nano later, I played with Emacs for some time but ended up using a GUI editor instead.

linuxmemes@lemmy.world

linuxmemes@lemmy.world

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Hint: :q!


Sister communities:
  • [email protected]
  • [email protected]
  • [email protected]
  • [email protected]

Community rules (click to expand)

1. Follow the site-wide rules
  • Instance-wide TOS: https://legal.lemmy.world/tos/
  • Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
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 figures

We 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.

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 804 users / day
  • 4.73K users / week
  • 9.55K users / month
  • 19.1K users / 6 months
  • 409 local subscribers
  • 24.9K subscribers
  • 1.6K Posts
  • 92.5K Comments
  • Modlog
  • mods:
  • Kevin@lemmy.world
  • zephyr@lemmy.world
  • rtxn@lemmy.world
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org