Monday, January 21, 2013

Re: Limiting ftplugins to relevant buffers

On Monday, January 21, 2013 3:24:33 PM UTC-6, neilh...@gmail.com wrote:
> I tried this:
> au BufRead,BufNewFile *.cf setlocal ft=cf3
>
> The maps from the cf plugin still worked if my buffer was *.html.

You need to set up buffer-local mappings if you don't want them to be defined globally to all of Vim.

:help :map-local

If you want to be extra careful you can undo them in the b:undo_ftplugin variable but if you're loading a new buffer this should not be necessary for your purposes. :he undo_ftplugin.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: