On 7/30/06, Preben Randhol <[EMAIL PROTECTED]> wrote:
Hi

I'm trying to make a small function which should search for a pattern
in the current buffer. I want that all matches are highlighted by
hlsearch and that I can jump to the next by pressing 'n'

Is this possible? When I try to use execute or normal it searches, but
neither hlsearch work or 'n' works.

Hmm. Let's take these two issues separately.

First, the 'hlsearch' thing.It depends on the 'nocompatible' option.
Is 'nocompatible' option set for you ? In 'compatible' mode
(which is *not* what you want,  you want ':set nocompatible')
hlsearch does not mode.

Regarding 'n' for next search, it must work in any mode,
unless somebody remapped it. (try :map n)

Yakov

Reply via email to