Skip to content

Commit d8974bd

Browse files
committed
Repeated star movement should move to the next word
1 parent 18f760f commit d8974bd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

plugin/slash.vim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,19 @@ function! s:wrap(seq)
3030
endfunction
3131

3232
function! s:immobile(seq)
33+
if exists('b:repeated_move')
34+
return a:seq
35+
endif
36+
3337
let s:winline = winline()
38+
let b:repeated_move = 1
3439
return a:seq."\<plug>(slash-prev)"
3540
endfunction
3641

3742
function! s:trailer()
3843
augroup slash
3944
autocmd!
40-
autocmd CursorMoved,CursorMovedI * set nohlsearch | autocmd! slash
45+
autocmd CursorMoved,CursorMovedI * set nohlsearch | unlet b:repeated_move | autocmd! slash
4146
augroup END
4247

4348
let seq = foldclosed('.') != -1 ? 'zo' : ''

0 commit comments

Comments
 (0)