Matthew Winn wrote:
On Tue, 09 Jan 2007 17:45:56 +0200, Albie <[EMAIL PROTECTED]> wrote:

First, run (in normal mode):

:let mapleader

That command will reveal the key you currently have configured to be your <Leader>. Assuming the output of the above command is:

mapleader             ,

You should then be able to execute the first command by going:

v
[moving around for selection]
,=

For the second command, replace ",=" above with ",g=".

The <Leader> defaults to \ on some installations, I believe.

\ is the default value, and that's the value used if mapleader is
empty. It's a bad idea to set mapleader to , unless you have a
keyboard where \ is hard to type, as , is already a Vim command.

Absolutely. I apologise for the bad recommendation. In my defense, I hardly use f, F, t, T (most because I didn't really know them - that might change now) and even then, "," has a derivative function based on those commands. So, in my case at least, it's a pretty safe key to remap, and quite necessary in general, since \ is far out of the way (keyboard makers seem to just follow their own noses when designing - standards? WHAT standards?!). I have mapped \ (in normal mode) to

:let @/=''<CR>

as I occasionally need to clear the search buffer to see what I'm doing.

I will refrain from recommending "," as <Leader> from now on. Sorry for any trouble!

--
Albie Janse van Rensburg (neonpill)

Registered Linux User 438873 | <http://counter.li.org>

Reply via email to