sagemathinc / viz

A very fast and lightweight vim like editor written in C and lua with multiple cursors and syntax highlight
Other
5 stars 0 forks source link

to next match is very annoying / broken #2

Closed williamstein closed 1 year ago

williamstein commented 1 year ago

A basic feature of vim that I use a lot is "/foo" then keep hitting / to see all other matches for foo.

In viz this doesn't work. You search once and then next time you type / the current search is blank and you have to type it in again. This technically matches with what the main page https://martanne.github.io/vis/man/vis.1.html says.

"[/](https://martanne.github.io/vis/man/vis.1.html#/_2)pattern to next match of pattern in forward direction"

However, it's super annoying. I should change this behavior.

WORKAROUND: hit control+n repeatedly to select matches. This results in searching.

There's the same problem with "?" to search backwards.

williamstein commented 1 year ago

See https://github.com/martanne/vis/wiki/Differences-from-Vi(m)#search-direction-of-n-and-n

Just use n and N rather than / again. Note that vim also has n and N.