I’m trying out Obsidian for taking notes, and this made me laugh.

  • OpenStars@kbin.social
    link
    fedilink
    arrow-up
    10
    arrow-down
    3
    ·
    1 year ago

    :wq will save and then exit, while :x will save only if the file has been modified and then exit, and then there’s ZZ that does the same as :x, plus there are probably others:-)

    • ray@kbin.social
      link
      fedilink
      arrow-up
      17
      ·
      1 year ago

      The question specifically asked for “the command to quit Vim without saving

    • uzay
      link
      fedilink
      arrow-up
      8
      ·
      1 year ago

      They explicitly ask for the one that quits without saving, so I’d say :q! is the obvious choice

      • GiantRobotTRex@lemmy.sdf.org
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        I agree that it’s the most obvious choice, but it also doesn’t work when there are hidden buffers open. :qa! and :cq should always work so they are arguably more correct