[CLUE-Tech] VIM Question

Matt Gushee mgushee at havenrock.com
Tue Jul 30 21:16:15 MDT 2002


On Tue, Jul 30, 2002 at 10:39:41AM -0600, Jeremiah Stanley wrote:
> Okay, then how can I map that key command? And do you know of any sites
> that give examples of more mappings that I could use?

As far as online resources go, www.vim.org has a lot of links to
documentation and sample config files. However, the site is quite hard
to navigate, and the linked resources mostly cater to people who already
have some experience configuring VIM.

But if you have VIM 6.x*, there's a very helpful user's manual,
accessible through :help. You might want to read the "Tuning Vim"
section.

With that said, here are my key mappings (which I put in ~/.vimrc).

  map {Alt-/} :nohl{Enter}
  map! {Alt-/} {Esc}:nohl{Enter}i

This needs a little explanation. The stuff in curly braces is not the
actual characters in the file, because those characters are
unintelligible. They are the key sequences you type--except that when 
typing your config file you must precede each of them with Ctrl-V: that 
inserts a text representation of the key sequence in the buffer; without 
Ctrl-V, the key sequence would perform its usual action as you typed it.

If that's not clear enough, well, it should be once you've read the
user's manual.

    %             %             %              %             %

On Tue, Jul 30, 2002 at 11:42:45AM -0700, Keith Hellman wrote:
> In your ${HOME}/.vimrc, place the line
> 
> set nohlsearch
> 
> no need to map it if you never want it on.

That's a good point, but some of us want it on when we're searching and
off when we're finished.

    %             %             %              %             %

  * Maybe it was there all along, but I had never noticed it before
    installing Vim 6.1.

-- 
Matt Gushee
Englewood, Colorado, USA
mgushee at havenrock.com
http://www.havenrock.com/



More information about the clue-tech mailing list