Do you know about local mappings? You can use them to make mappings that
only work in a single buffer, so you could use autocommands to define
such mappings per filetype and you wouldn't need to call a function to
change them: just moving your cursor into the appropriate window would
activate all the mappings for that filetype.

:help map-local

I don't think it sounds completely like what you want, but it's
something to be aware of.

Ben.



David Liang wrote:
> Ahh, that will do the trick. Thanks!
> 
> --David
> 
> On Nov 11, 3:42 am, "François Ingelrest"
> <[EMAIL PROTECTED]> wrote:
>> On Tue, Nov 11, 2008 at 12:31, David Liang <[EMAIL PROTECTED]> wrote:
>>> I'm not trying to change any mappings when I switch filetypes.
>>> Instead, I want to define a set of alternate mappings unique to the
>>> filetype which I can later switch to by calling SetAltMaps().
>> Then maybe you can define only one SetAltMaps() function, outside of
>> any autocommand, and inside that function you use an if/elseif
>> structure to set the mappings based on the current filetype.




--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to