1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 22:20:06 +08:00

Add support for n/N in iedit-Normal mode

This commit is contained in:
wsdjeg 2018-01-12 21:20:20 +08:00
parent 1d1aa42712
commit 8240878968
2 changed files with 16 additions and 0 deletions

View File

@ -136,6 +136,20 @@ function! s:handle_normal(char) abort
let s:Operator = 'g'
call s:timeout()
endif
elseif a:char == 110 " n
if s:index == len(s:stack) - 1
let s:index = 0
else
let s:index += 1
endif
call cursor(s:stack[s:index][0], s:stack[s:index][1] + len(s:symbol_begin))
elseif a:char == 78 " N
if s:index == 0
let s:index = len(s:stack) - 1
else
let s:index -= 1
endif
call cursor(s:stack[s:index][0], s:stack[s:index][1] + len(s:symbol_begin))
endif
silent! call s:highlight_cursor()
endfunction

View File

@ -1454,6 +1454,8 @@ The defalut color for iedit is `red`/`green` which is based on the current color
| `D` | delete the occurrences |
| `gg` | go to first occurrence |
| `G` | go to last occurrence |
| `n` | go to next occurrence |
| `N` | go to previous occurrence |
**In iedit-Insert mode:**