insert mode action
mentioned in #46
a way to perform complicated action in insert mode & update the cursors
I feel the missing part is left/right movement in insert mode, which is not recorded in dot register (imo a flaw in nvim itself).
I feel the missing part is left/right movement in insert mode, which is not recorded in dot register (imo a flaw in nvim itself).
You can fix this by remapping left/right movement keys to avoid making a new undo sequence (this is what <C-g>U does):
inoremap <Left> <C-g>U<Left>
inoremap <Right> <C-g>U<Right>
https://github.com/bew/dotfiles/blob/42c33af7bc8ac31e64704549b59475aac37598b0/nvim-wip/lua/mycfg/mappings.lua#L410-L415
Wow, this works, thanks! (vertical movement still not work, but that's very uncommon)
I feel the missing part is left/right movement in insert mode, which is not recorded in dot register (imo a flaw in nvim itself).
You can fix this by remapping left/right movement keys to avoid making a new undo sequence (this is what
<C-g>Udoes):inoremap <Left> <C-g>U<Left> inoremap <Right> <C-g>U<Right> https://github.com/bew/dotfiles/blob/42c33af7bc8ac31e64704549b59475aac37598b0/nvim-wip/lua/mycfg/mappings.lua#L410-L415
@xzbdmw @bew
Thanks for this bew.
I've made this a default mapping. It is only mapped if nothing is already mapped to <left>... or <right>... in insert mode.
im busy or lazy