Gary Johnson wrote:
On 2006-08-27, cga2000 <[EMAIL PROTECTED]> wrote:
On Sat, Aug 26, 2006 at 05:09:35AM EDT, Gary Johnson wrote:
On 2006-08-24, cga2000 <[EMAIL PROTECTED]> wrote:

Is there any way I could map a simple toggle to (de)activate fo+=a
(auto-format) .. so I can get rid of it quickly when it starts causing
problems .. such as editing mail headers in mutt .. eg. ??
Try this:

    map <silent> <F1> :if match(&fo, 'a') != -1 <bar> set fo+=a <bar> else <bar> set fo-=a 
<bar> endif<CR>
should be:

 .. if match() == -1 ..

Right. Thanks for catching and fixing that. I had actually fixed that in the mapping I was playing with in another vim window, then I forgot to fix it here.

Is there a way I can list current keyboard mappings?

You can get a list of user-defined mappings by executing

    :map

... for Normal and Visual modes, and

        :map!

for Insert/Replace and Command-line modes.

In addition, in Vim 7 (but not in Vim 6 or earlier), ":verbose map" or ":verbose map!" will tell you which script (if any) defined each mapping. (If it doesn't tell you, it means you entered it from the keyboard.)


and a list of the default bindings here:

    :help index

See also:

    :help map-listing
    :help map-which-keys
    :help 40.1

Regards,
Gary




Best regards,
Tony.

Reply via email to