• Endmaker
    link
    fedilink
    English
    31
    edit-2
    5 days ago

    Personally, I have seen so many memes about exiting vim that by the time I got to use it for the first time, exiting it was a no-brainer.

    For any newbies out there, the command is

    :wq
    
    • @[email protected]
      link
      fedilink
      305 days ago

      Just to add: possible need to tap esc first, as your random flailing probably put you in insert mode, or something more exotic.

      And only add w if you want to save the file. :q! If you don’t

    • dohpaz42
      link
      fedilink
      English
      16
      edit-2
      5 days ago

      😳

      :w = write; or overwrite if the file already exists.

      Please don’t give blanket destructive advice.

    • @[email protected]
      link
      fedilink
      135 days ago

      also worth noting you open vim the first time, you get a huge ass splash screen telling you how to exit

    • @[email protected]
      cake
      link
      fedilink
      English
      55 days ago

      :x is also an alternative to save and quit.

      Equally valid for the facial expression you’d make upon finding that out.

    • Badabinski
      link
      fedilink
      55 days ago

      There’s also ZZ 👉😎👉 Same caveats apply, smash that fukken esc key (for bonus points rebind caps lock as esc) then ZZ Top your way out of that shit.

      • @[email protected]
        link
        fedilink
        25 days ago

        This is the most correct answer.

        Rebind Caps to Esc.

        ZZ (or ZQ if you don’t want to save the file).

    • Barbecue Cowboy
      link
      fedilink
      English
      14 days ago

      I’m going to stick with my current process of accidentally opening vim, typing semi-random things that feel like they should work for a minute and then eventually looking up how to quit on my phone.