Closed mawkler closed 2 years ago
What is the exact autocmd that you're using? It works fine for me with
autocmd FileType DressingInput imap <buffer> <C-j> <Down>
autocmd FileType DressingInput imap <buffer> <C-k> <Up>
You're right. The mistake I made was basically to use inoremap
instead of imap
. I have just switched from using vim.api.nvim_buf_set_keymap
to vim.keymap.set
and the latter sets the the opts
argument to { remap = false }
by default.
I there any way to configure key mappings for
vim.ui.input
? I would like to be able to use<C-k>
/<C-j>
to move up/down in history by mapping them to<Up>
/<Down>
.I tried using an
autocmd FileType DressingInput
to set the mappings buffer-locally but for some reason it didn't work for me. The autocommand gets triggered but the mappings don't appear.