-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Labels
Description
set foldopen-=search
makes searching not open folds. This is expected behavior, which sneak follows. However, if you look in the vim docs, with search
off, searching will consider the fold to be a single target even if there are multiple matches within the fold. Sneak doesn't do this.
Minimal vim setup:
- Start vim with (see /u/welle's post on Reddit for an explanation here)
vim -Nu <(cat << VIMRC
set runtimepath+=~/.vim/bundle/vim-sneak/
set foldopen-=search
VIMRC)
- Type some random repeating text like
asdfasdfasdf
asdfasdfasdf
asdfasdfasdf
asdfasdfasdf
- Fold a few lines with ggzf3j or whatever
- sas
- ;;;;;; and your cursor doesn't move until all targets in fold have been encountered
- gg
- /af
- nnnn and your cursor moves immediately.
Also as a related issue, sneak should open folds when we have set foldopen+=search
but it doesn't. Instead it behaves in the same undesirable way as set foldopen-=search
.
Asheq, ggandor and tssm