[PLUG] stupid vi question

Zot O'Connor zot at whiteknighthackers.com
Sun Feb 8 22:40:02 UTC 2004


On Sat, 2004-01-31 at 22:07, Sandy Herring wrote:

> As Matt pointed out, you can do a failed search to get rid of the
> highlighting on an adhoc basis. You can also,
> 
>     :noh

To clarify, from the vim help guide (:help :noh)
:noh[lsearch]           Stop the highlighting for the 'hlsearch' option.  It
                        is automatically turned back on when using a search
                        command, or setting the 'hlsearch' option.
                        This command doesn't work in an autocommand, because
                        the highlighting state is saved and restored when
                        executing autocommands |autocmd-searchpat|.

So if you want to get rid of the current search, use /sjsjsjsj or :noh

This is more useful than editing vimrc IMHO since if you switch systems,
this still works, whereas .vimrc will require fore-action.

BTW the # cause the links due to:

#                       Same as "*", but search backward.  The pound sign
                        (character 163) also works.  If the "#" key works as
                        backspace, try using "stty erase <BS>" before starting
                        Vim (<BS> is CTRL-H or a real backspace).  {not in Vi}

and forto solve the reference to *

*                       Search forward for the [count]'th occurrence of the
                        word nearest to the cursor.  The word used for the
                        search is the first of:
                                1. the keyword under the cursor |'iskeyword'|
                                2. the first keyword after the cursor, in the
                                   current line
                                3. the non-blank word under the cursor
                                4. the first non-blank word after the cursor,
                                   in the current line
                        Only whole keywords are searched for, like with the
                        command "/\<keyword\>".  (exclusive)  {not in Vi}
                        'ignorecase' is used, 'smartcase' is not.


This is a feature I have not used.  I might.  Though with VI in a term
windows, it is easy to double click the pointer, hit :, middle bottun,
enter......




> 
> hth,
> Sandy
-- 
Zot O'Connor

http://www.ZotConsulting.com
http://www.WhiteKnightHackers.com





More information about the PLUG mailing list