JABS.nvim
JABS.nvim copied to clipboard
Opening the preview window overwrites keymap for 'q'
When you open the preview window in JABS the keymap for q
get's overwritten for that buffer. That's hard coded:
-- function M.previewBuf()
[...]
-- Close preview with "q"
api.nvim_buf_set_keymap(buf, "n", "q",
[[:lua require'jabs'.closePreviewBuf()<CR>]],
{ nowait = true, noremap = true, silent = true })
[...]
The mapping still exists after the preview window is closed and if you open the same buffer in a different window -- for editing -- the mapping is still active (and calls closePreviewBuf
).
If q
would not be mapped to any other command this might not be toooooo bad, but q
is mapped to start a recording by default and that's not possible anymore.......
https://vi.stackexchange.com/questions/7734/how-to-save-and-restore-a-mapping