mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-23 01:09:56 +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
|
elseif a:char == 11
|
||||||
let s:symbol_cursor = ''
|
let s:symbol_cursor = ''
|
||||||
let s:symbol_end = ''
|
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
|
else
|
||||||
let s:symbol_begin .= nr2char(a:char)
|
let s:symbol_begin .= nr2char(a:char)
|
||||||
endif
|
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:
|
Navigation between the highlighted symbols can be done with the commands:
|
||||||
|
|
||||||
| Key Binding | Description |
|
| Key Binding | Description |
|
||||||
| ----------- | -------------------------------------------------------------------------------- |
|
| ----------- | ---------------------------------------------------------------------------- |
|
||||||
| `*` | initiate navigation transient state on current symbol and jump forwards |
|
| `*` | initiate navigation transient state on current symbol and jump forwards |
|
||||||
| `#` | initiate navigation transient state on current symbol and jump backwards |
|
| `#` | initiate navigation transient state on current symbol and jump backwards |
|
||||||
| `SPC s e` | edit all occurrences of the current symbol |
|
| `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` | 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 |
|
| `SPC s H` | go to the last searched occurrence of the last highlighted symbol |
|
||||||
|
|
||||||
In highlight symbol transient state:
|
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 |
|
| Key Binding | Description |
|
||||||
| ----------- | ------------------------------ |
|
| ----------- | ------------------------------ |
|
||||||
| `Esc` | go back to `iedit-Normal` mode |
|
| `Esc` | go back to `iedit-Normal` mode |
|
||||||
|
| `<Left>` | Move cursor to left |
|
||||||
|
| `<Right>` | Move cursor to right |
|
||||||
|
|
||||||
##### Examples
|
##### Examples
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user