Closed aj3423 closed 2 years ago
This may be caused by a combination of both lexima.vim and vim-multiple-cursors. It is difficult to fix this problem but I can suggest a work around.
If you are familiar with .
(dot repeat), you don't need to use vim-multiple-cursor. If no, you can throw away a dot repeat feature of lexima by the following setting.
let g:lexima_map_escape = ""
let g:lexima_map_escape = ""
May I suggest this should be default? Unwritten rule of vim plugins is no mappings by default. Current defaults (mapping ESC) is very problematic for many plugins.
habamax/vim-select is such an example (Closing window by <esc>
) breaks.
Thanks for the suggestion.
You have a point. It is true that this mapping is often asked and often conflicts with other plugins. However, lexima.vim's raison d'etre is unrestricted dot-repeatability, so I don't want to lose it by default.
I will put it in the README or help doc as a frequently asked question.
Thats your choice, I respect that.
You can maybe decide the mapping on buftype
I already see lexima is not completing on buftype=nofile
so if mapping is also <buffer>
-local then its breaking "less" or at least leaving a door of opportunity for other plugins to mark a buffer unaffected by the default mapping by lexima.
I understand the problem of buftype=nofile
. <buffer>
mapping is one of solution but I'd like to think about a better one.
I'm using lexima with vim-multiple-cursors plugin, after doing some modification and press Esc to quit multi-cursor mode, lexima inserts a line "lexima#insmode#escape()" at the cursor position.![lexima](https://user-images.githubusercontent.com/4710875/164683732-7cb2d083-1f72-40c6-8764-9047ed5610b7.gif)
The strange thing is, the problem only happens when the Vim buffer has been opened for a while. It works all fine when the vim is just started. As the problem in the image above, I closed and restarted the vim, the problem is gone.
How to debug this?
Neovim version: 0.6.1