Waffelson@lemmy.world to linuxmemes@lemmy.world · 1 year ago:wq!lemmy.worldimagemessage-square56fedilinkarrow-up1187arrow-down171
arrow-up1116arrow-down1image:wq!lemmy.worldWaffelson@lemmy.world to linuxmemes@lemmy.world · 1 year agomessage-square56fedilink
minus-square👍Maximum Derek👍@discuss.tchncs.delinkfedilinkEnglisharrow-up15arrow-down2·1 year ago:ggdGwq (please don’t do this)
minus-squareIgnotum@lemmy.worldlinkfedilinkarrow-up10·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-squarefiliberto_kunstlinger@lemmy.worldlinkfedilinkarrow-up12·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-squareJustinAngel@lemmy.worldlinkfedilinkarrow-up11arrow-down1·1 year agoVIM Golf… Same outcome, fewer strokes: %d|wq
minus-squarei_am_tired_boss@lemmy.worldlinkfedilinkarrow-up2arrow-down1·1 year agoggdGZZ This actually does what you intend to do. On nvim atleast.
:ggdGwq (please don’t do this)
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
Huh… I always just used :1
VIM Golf… Same outcome, fewer strokes:
%d|wq
ggdGZZ
This actually does what you intend to do. On nvim atleast.