• @filiberto_kunstlinger
    link
    15
    edit-2
    1 year ago

    exactly.

    gg -> go to top of document

    d -> delete (actually, it’s cut, but it destroys the mnemonic)

    G -> here is a modifier to “d” and tells it do “delete until end of document”

    w -> write current state of buffer to disk

    q -> exit program

    • meow
      link
      fedilink
      171 year ago

      Actually not, binds and commands aren’t the same. ggdG only works as a series of inputs, while wq only works as a command (with the colon).

      • Victor
        link
        81 year ago

        Exactly. The colon needs to be just before the w, not at the front of the sequence…

        • CaptainBlagbird
          link
          61 year ago

          And while you’re at it, throw an ESC in there at the beginning, will ya?

          • Victor
            link
            21 year ago

            If you want to cover every case (mode), indeed. 😊