@Waffelson@lemmy.world to linuxmemes@lemmy.world • 1 year ago:wq!lemmy.worldimagemessage-square147fedilinkarrow-up1227arrow-down174
arrow-up1153arrow-down1image:wq!lemmy.world@Waffelson@lemmy.world to linuxmemes@lemmy.world • 1 year agomessage-square147fedilink
minus-squareIgnotumlinkfedilink11•1 year agoI use Vim daily, and i have absolutely no clue what that command would do, what would it do? Delete the document, save and quit?
minus-square@filiberto_kunstlinger@lemmy.worldlinkfedilink15•edit-21 year agoexactly. 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
minus-squareMiku Luna \ she/itlinkfedilink17•1 year agoActually 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).
minus-squareVictorlinkfedilink8•1 year agoExactly. The colon needs to be just before the w, not at the front of the sequence…
minus-squareCaptainBlagbirdlinkfedilink6•1 year agoAnd while you’re at it, throw an ESC in there at the beginning, will ya?
I use Vim daily, and i have absolutely no clue what that command would do, what would it do? Delete the document, save and quit?
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
Actually not, binds and commands aren’t the same.
ggdG
only works as a series of inputs, whilewq
only works as a command (with the colon).Exactly. The colon needs to be just before the
w
, not at the front of the sequence…And while you’re at it, throw an
ESC
in there at the beginning, will ya?If you want to cover every case (mode), indeed. 😊
yeah, I screwed it up
Huh… I always just used :1