Closed NNBnh closed 2 years ago
This could be accomplished by adding these to your config file:
command save-quit @{
save @arg(*)
quit@arg(!)
}
command sq @{ save-quit@arg(!) @arg(*) }
command save-quit-all @{
save-all
quit@arg(!)
}
command sqa @{ save-quit-all@arg(!) @arg(*) }
I'll add this to the config recipes page!
Thanks! I somehow missed that user can create custom commands...
I surprise that there is no way to save and quit at with one command like
wq
on Vim, Kakoune or Helix when this is a very commonly used operation:save-quit
Saves buffer to file then quits this client. If
<path>
is present, it will use that path so save the buffer's content, making it the new buffer's associated filepath (it will also enable saving for that buffer from now on).save-quit [<path>]
sq
save-quit-all
Saves all buffers to file then quits all clients.
save-quit-all
sqa
These commands will be very convenient but I could see why this command doesn't exist in the first place, it's a bit redundant and seem like something the user could config to achieve...:
Defind alias(currently not support).If you find this suggestion it's suitable to be built-in with the editor, feel free to label this issue with "Plugin" or "Plugin Idea".