• Endmaker
    link
    fedilink
    English
    36
    edit-2
    10 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
    
    • @Malix@sopuli.xyz
      link
      fedilink
      3010 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
      10 days ago

      😳

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

      Please don’t give blanket destructive advice.

    • Elvith Ma'for
      link
      fedilink
      610 days ago

      And if you panicked before and fucked up the opened file while hammering on the keyboard:

      :q!
      
    • Badabinski
      link
      fedilink
      510 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.

    • @T156@lemmy.world
      link
      fedilink
      English
      59 days ago

      :x is also an alternative to save and quit.

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

    • Barbecue Cowboy
      link
      fedilink
      English
      19 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.