Open Konfekt opened 6 years ago
:help i_CTRL-G_U gives examples of movement mappings in insert mode that respect the dot operator, for example <home>, <end>, <left>, <right>. How about vim-rsi piggybacking on these, for example,
:help i_CTRL-G_U
<home>, <end>, <left>, <right>
vim-rsi
inoremap <expr> <C-A> col('.') == match(getline('.'), '\S') + 1 ? \ repeat('<C-G>U<Left>', col('.') - 1) : \ (col('.') < match(getline('.'), '\S') ? \ repeat('<C-G>U<Right>', match(getline('.'), '\S') + 0) : \ repeat('<C-G>U<Left>', col('.') - 1 - match(getline('.'), '\S'))) inoremap <expr> <C-E> col('.')>strlen(getline('.'))<bar><bar>pumvisible()?"\<Lt>C-E>":repeat("\<Lt>C-G>U\<Lt>Right>", col('$') - col('.')) inoremap <expr> <C-B> getline('.')=~'^\s*$'&&col('.')>strlen(getline('.'))?"0\<Lt>C-D>\<Lt>Esc>kJs":"\<Lt>C-G>U\<Lt>Left>" inoremap <expr> <C-F> col('.')>strlen(getline('.'))?"\<Lt>C-F>":"\<Lt>C-G>U\<Lt>Right>"
:help i_CTRL-G_U
gives examples of movement mappings in insert mode that respect the dot operator, for example<home>, <end>, <left>, <right>
. How aboutvim-rsi
piggybacking on these, for example,