On 2006-12-03, Meino Christian Cramer <[EMAIL PROTECTED]> wrote:
> Hi
>
> As far as I understood augroups I can do specific actions
> for a specific filetype.
>
> I now came accross the situation to define a keymapping for all
> filetypes except for one.
>
> Is there a more elegant (and suitable for a lot more than one single
> keybinding) way to do this as to define the keymapping and delete it
> afterwards in a augroup for the filetype where it is not wanted ?
>
> (By the way: Is there any command for "restore the old keymapping"
> and - if not - how can I backup a keymapping before changing it with
> *map-commands?)
I don't know under what conditions you want to restore a previous
mapping, but if you set any filetype-specific mappings with the
<buffer> option (see ":help map-<buffer>"), then they will apply
only to the buffer in which they were defined. Other buffers, or
any new buffers you create with a different file type, will use the
mappings defined for their file type, or will use the global
mappings if none are defined for their file type.
So, if your old keymappings were global and your new keymappings are
buffer-local, the old keymappings will be restored when you open a
new buffer (if not overridden by a new set of local keymappings).
HTH,
Gary
--
Gary Johnson | Agilent Technologies
[EMAIL PROTECTED] | Wireless Division
| Spokane, Washington, USA