mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 22:40:04 +08:00
Add support Left/Right in iedit-insert mode
This commit is contained in:
parent
41f58eba01
commit
7ecd85a8a0
@ -127,6 +127,14 @@ function! s:handle_insert(char) abort
|
||||
elseif a:char == 11
|
||||
let s:symbol_cursor = ''
|
||||
let s:symbol_end = ''
|
||||
elseif a:char == "\<Left>"
|
||||
let s:symbol_end = s:symbol_cursor . s:symbol_end
|
||||
let s:symbol_cursor = matchstr(s:symbol_begin, '.$')
|
||||
let s:symbol_begin = substitute(s:symbol_begin, '.$', '', 'g')
|
||||
elseif a:char == "\<Right>"
|
||||
let s:symbol_begin = s:symbol_begin . s:symbol_cursor
|
||||
let s:symbol_cursor = matchstr(s:symbol_end, '^.')
|
||||
let s:symbol_end = substitute(s:symbol_end, '^.', '', 'g')
|
||||
else
|
||||
let s:symbol_begin .= nr2char(a:char)
|
||||
endif
|
||||
|
@ -1299,13 +1299,13 @@ To Highlight the current symbol under point press `SPC s h`.
|
||||
|
||||
Navigation between the highlighted symbols can be done with the commands:
|
||||
|
||||
| Key Binding | Description |
|
||||
| ----------- | -------------------------------------------------------------------------------- |
|
||||
| `*` | initiate navigation transient state on current symbol and jump forwards |
|
||||
| `#` | initiate navigation transient state on current symbol and jump backwards |
|
||||
| `SPC s e` | edit all occurrences of the current symbol |
|
||||
| `SPC s h` | highlight the current symbol and all its occurrence within the current range |
|
||||
| `SPC s H` | go to the last searched occurrence of the last highlighted symbol |
|
||||
| Key Binding | Description |
|
||||
| ----------- | ---------------------------------------------------------------------------- |
|
||||
| `*` | initiate navigation transient state on current symbol and jump forwards |
|
||||
| `#` | initiate navigation transient state on current symbol and jump backwards |
|
||||
| `SPC s e` | edit all occurrences of the current symbol |
|
||||
| `SPC s h` | highlight the current symbol and all its occurrence within the current range |
|
||||
| `SPC s H` | go to the last searched occurrence of the last highlighted symbol |
|
||||
|
||||
In highlight symbol transient state:
|
||||
|
||||
@ -1453,6 +1453,8 @@ The defalut color for iedit is `red`/`green` which is based on the current color
|
||||
| Key Binding | Description |
|
||||
| ----------- | ------------------------------ |
|
||||
| `Esc` | go back to `iedit-Normal` mode |
|
||||
| `<Left>` | Move cursor to left |
|
||||
| `<Right>` | Move cursor to right |
|
||||
|
||||
##### Examples
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user