Closed yaohappiness closed 5 years ago
This should probably be configurable, but right now it’s hardcoded. You can change this in athame_util.h:906 by swapping “iR” with “iRn” or whatever vim modes you want athame to check for readline keys. Not 100% sure how well tab completion will work in normal mode.
It does work by replacing “iR” with “iRn” but got a little buggy. After passing keys to readline, vim will automatically enter insert mode. ( "Start each line in insert mode" in ~/.athamerc has been removed so it should start in normal mode.) "Tab" will cause the character under the cursor to be duplicated:
The switch to insert mode is because athame_util.h:532 is passing in 0 for preserve_mode when it should be passing in 1. This might be an easy fix or changing it to a 1 might break something else (Probably the later, but I don’t have my laptop with me)
I think the weird tab behavior you’re seeing is “correct” from readline’s point of view. It’s not duplicating the e, the cursor is just before the e. Zsh will probably not have this problem because it tab completes at end of word instead of the cursor position.
The problem seems to be solved by passing in 1. I haven't seen any unusual so far.
Thanks for your reply.
Is thare any way for keys such as Ctrl-L, Ctrl-D in normal mode to be passed on to readline? It can be used in insert mode, of course, I've tried
nnoremap <C-l> iclear<CR>
andnnoremap <C-l> i<C-l><CR>
,but not working.