Hello, how can I remap :wq
to not quit nvim? This answer suggests you use cnoabbrev
, which would look something like this, in .vim
:cnoreabbrev wq <nop>
But I haven’t been able to do the “noabbrev” part in lua, i.e. these all fail and browsing for a solution in the :h
pages has failed me.
vim.keymap.set('cnoreabbrev', 'wq', '<nop>') -- Shortname is too long: cnoreabbrev
vim.keymap.set('c', 'wq', '<nop>', { abbrev = false } ) -- invalid key: abbrev
thanks!