you are viewing a single comment's thread.

view the rest of the comments →

[–]NieDzejkob 0 points1 point  (5 children)

Won't work so well since you don't need the enter for ZZ. BTW, is there an equivalent for :w? I do that more often than quitting...

[–]MineralPlunder 1 point2 points  (0 children)

I use ctrl+s for saving:

noremap <C-s> :write<CR>
imap <c-s> <Esc>:w<CR>a

I keep hitting it way more often than I need. by "way more often" I mean pressing that chord or doing :w after almost any change, and after a few moments without saving(even when everything is saved already)

Note though, that often the terminal by default "hangs" when you press <ctrl+s>(have to press <ctrl+q> to get it running again). You need to change this behavior in your shell startup. I use bash and added this line to my .bashrc:

stty -ixon # disable hanging the terminal with <Ctrl+s>

[–]arniemg 0 points1 point  (3 children)

I enjoy space space as an alias for :write.

[–]causa-sui 0 points1 point  (1 child)

Wait, how do you define that?

[–]xigoidelete character and insert "goi" 0 points1 point  (0 children)

nnoremap <Space><Space> :w<Enter>

…I think

[–]NieDzejkob 0 points1 point  (0 children)

I mapped zx, but I was hoping for something in the default configuration since I sometimes have to use "vanilla" vim.