Meino Christian Cramer wrote:
From: Tim Chase <[EMAIL PROTECTED]>
Subject: Re: half of hlsearch
Date: Fri, 11 Aug 2006 05:37:38 -0500
Hi Tim,
that raises a question I am often feeling to ask:
If one is learning vim he first uses the help function by
common "keywords" like "searching" and command sequences,
from which s/he wants to know, what they do.
If one needs to know the command sequences to be able to find
the information s/he needs to know the command sequences or
needs help to use help, then.....Huston, we have a problem !
ye and yE may help in searching a certain piece of context.
I was searchin for a global solution to switch off hlsearch in
"non direct search" actions.
As for the simple using of backspace (my previous question) in normal
mode this ends up in writing complicated scripts, which even fail to
work in certain situations (NO critism against those, who postes
answers to my questions!!!)
At certain points vim is shooting canonballs against flies...and even
fail to hit the mark sometimes.
Kind regards,
mcc
Vim has the most extensive help system of any program that I've yet
seen. EVERYTHING is covered. That help system is so extensive, however,
that finding the needed information is sometimes akin to finding one's
own little needle in a huge stack of hay. But even for that, there are
Vim tools:
1. (assuming 'nocompativle' is already set) :set wildmenu
2. Help tag completion: if you think 'foo' is part of something which
has a hyperlink in the help system, use
:help foo<Tab>
where <Tab> means "hit the Tab key", and if there is only one possible
completion Vim fills it in for you; if there is more than one the bottom
status line is replaced by a menu which can be navigated by hitting the
Left and Right arrow keys; accept a selection by hitting Enter, abort by
hitting Esc.
3. The ":helpgrep" function: if you think that some regular expression
describe text you want to search for in the text of all the help files, use
:helpgrep <pattern>
where <pattern> is a Vim regular expression, like what you can use after
/ or ? . It may take some time for Vim to look up all its help files,
and it may or may not display interim information which may require you
to hit Enter to clear the |more-prompt| (q.v.) When the blinking cursor
reappears in your editfile, it means Vim has compiled the list of all
help locations where your regexp matches. See them by means of the
following commands:
:cfirst or :cr
:cnext or :cn
:cprevious or :cprev or :cN
:clast or :cla
To make it faster, I use the following mappings (which I have placed in
my vimrc):
:map <F2> :cn<CR>
:map <S-F2> :cN<CR>
Here, <CR> represents the four characters less-than, C-for-Charlie,
R-for-Romeo, greater-than. Thanks to these mappings, after using
:helpgrep (or any other command which creates a |quickfix| list (q.v.),
I can use F2 to see the next "place of interest" ans Shift-F2 to see the
previous one. Replace <F2> and <S-F2> by any other hotkey you want to use.
Best regards,
Tony.