Hello, Meino Christian Cramer <[EMAIL PROTECTED]> wrote:
> As far as I understood augroups I can do specific actions > for a specific filetype. Or none -> * > 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 ? I think the best approach consists in having a general autcommand that matches all files. The action of the aucommand would be someting like if ft!='specificFT' \| runtime! macros/yourScript.vim \|endif > (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'm not aware of any feature like this one. We can obtain the associated action of a mapping before it is overriden, but after that it would be too late. Moreover, we have no guarantee that another mapping will not try to override the association. HTH, -- Luc Hermitte http://hermitte.free.fr/vim/
