1

I have a file (a minified Javascript file) that is essentially one long line.

When I run a search in this file with mc (by pressing F7 in the builtin viewer) or with less (by typing a slash) apparently it takes me to the start of the line, even though wrapping is activated. That is not helpful.

Is there a commonly available (I'm using Ubuntu) viewer that can take me to the line after wrapping where the search term was found?

AndreKR
  • 1,100

1 Answers1

2

vim's and nvi's implementations of view at least will scroll the wrapped line representation to let you see at least the start of the match (set hls in ~/.vimrc/~/.exrc to highlight searches).

Use view - to view stdin (as in seq 10000 | paste -sd ' ' - | view - as an example of viewing an overlong line)

So will the most pager (with -w to wrap) and the more implementation from util-linux.