diff --git a/autoload/SpaceVim/plugins/iedit.vim b/autoload/SpaceVim/plugins/iedit.vim index f590e0beb..eabbd744c 100644 --- a/autoload/SpaceVim/plugins/iedit.vim +++ b/autoload/SpaceVim/plugins/iedit.vim @@ -189,16 +189,16 @@ function! s:handle_normal(char) abort let s:cursor_stack[i].cursor = matchstr(s:cursor_stack[i].end, '^.') let s:cursor_stack[i].end = substitute(s:cursor_stack[i].end, '^.', '', 'g') endfor - elseif a:char == 48 " 0 + elseif a:char == 48 || a:char == "\" " 0 or for i in range(len(s:cursor_stack)) + let s:cursor_stack[i].cursor = matchstr(s:cursor_stack[i].begin . s:cursor_stack[i].cursor . s:cursor_stack[i].end, '^.') let s:cursor_stack[i].end = substitute(s:cursor_stack[i].begin . s:cursor_stack[i].cursor . s:cursor_stack[i].end , '^.', '', 'g') - let s:cursor_stack[i].cursor = matchstr(s:cursor_stack[i].begin, '^.') let s:cursor_stack[i].begin = '' endfor - elseif a:char == 36 " $ + elseif a:char == 36 || a:char == "\" " $ or for i in range(len(s:cursor_stack)) + let s:cursor_stack[i].cursor = matchstr(s:cursor_stack[i].begin . s:cursor_stack[i].cursor . s:cursor_stack[i].end, '.$') let s:cursor_stack[i].begin = substitute(s:cursor_stack[i].begin . s:cursor_stack[i].cursor . s:cursor_stack[i].end , '.$', '', 'g') - let s:cursor_stack[i].cursor = matchstr(s:cursor_stack[i].end, '.$') let s:cursor_stack[i].end = '' endfor elseif a:char == 68 " D diff --git a/docs/documentation.md b/docs/documentation.md index 2f465f5b0..4ca9831bb 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -1553,25 +1553,25 @@ The default color for iedit is `red`/`green` which is based on the current color `iedit-Normal` mode inherits from `Normal` mode, the following key bindings are specific to `iedit-Normal` mode. -| Key Binding | Description | -| ----------- | ------------------------------------------------------------------------------- | -| `Esc` | go back to `Normal` mode | -| `i` | switch to `iedit-Insert` mode, same as `i` | -| `a` | switch to `iedit-Insert` mode, same as `a` | -| `I` | go to the beginning of the current occurrence and switch to `iedit-Insert` mode | -| `A` | go to the end of the current occurrence and switch to `iedit-Insert` mode | -| `` | Move cursor to left | -| `` | Move cursor to right | -| `0` | go to the beginning of the current occurrence | -| `$` | go to the end of the current occurrence | -| `D` | delete the occurrences | -| `S` | delete the occurrences and switch to iedit-Insert mode | -| `gg` | go to first occurrence | -| `G` | go to last occurrence | -| `n` | go to next occurrence | -| `N` | go to previous occurrence | -| `p` | replace occurrences with last yanked (copied) text | -| `` | toggle current occurrence | +| Key Binding | Description | +| ------------ | ------------------------------------------------------------------------------- | +| `Esc` | go back to `Normal` mode | +| `i` | switch to `iedit-Insert` mode, same as `i` | +| `a` | switch to `iedit-Insert` mode, same as `a` | +| `I` | go to the beginning of the current occurrence and switch to `iedit-Insert` mode | +| `A` | go to the end of the current occurrence and switch to `iedit-Insert` mode | +| `` | Move cursor to left | +| `` | Move cursor to right | +| `0`/`` | go to the beginning of the current occurrence | +| `$`/`` | go to the end of the current occurrence | +| `D` | delete the occurrences | +| `S` | delete the occurrences and switch to iedit-Insert mode | +| `gg` | go to first occurrence | +| `G` | go to last occurrence | +| `n` | go to next occurrence | +| `N` | go to previous occurrence | +| `p` | replace occurrences with last yanked (copied) text | +| `` | toggle current occurrence | **In iedit-Insert mode:**