justinmk / vim-sneak

The missing motion for Vim :athletic_shoe:
http://www.vim.org/scripts/script.php?script_id=4809
MIT License
3.24k stars 88 forks source link

Limit Sneak_[f,F,t,T] matches highlighting to certain number of lines only? #260

Closed ghost closed 4 years ago

ghost commented 4 years ago

Currently, invoking Sneak_[f,F,t,T] highlights all the matches it founds. It is not a big issue, but is there a quick way I can limit it to one or two lines above or below the current line? Or say highlight only first 'N' occurrences?

P.S. Thanks for vim-sneak and neovim.

justinmk commented 4 years ago

The plumbing is there in the form of the hasmatches() function: https://github.com/justinmk/vim-sneak/blob/afe94543bb3bb95ef9ae2a58eebcbc17d69eb304/plugin/sneak.vim#L228

But these kinds of nice-to-have features are generally out of scope.

Thanks for the kind words :)