vis icon indicating copy to clipboard operation
vis copied to clipboard

Feature request: option for wrapping search

Open qunka opened this issue 8 years ago • 1 comments

In sam, :/regex/ will search forward in the document, wrapping around to the start of the file if regex is not found before the end of the file.

I find this behavior convenient, and would like a configuration option that enables this behavior in vis.

qunka avatar Jan 15 '18 15:01 qunka

The main reason why it currently doesn't wrap is to avoid strange overlappings in cases such as :-/extend-backward/,+/extend-forward/.

For now you might be able to use /regex (notice the omission of :) instead. It doesn't switch to visual mode, but wraps around. Also both variants set the last used search pattern. Thus the n and N motions can be used to repeat the search which also wraps.

martanne avatar Jan 24 '18 08:01 martanne