Hi Tony! On So, 31 Jul 2016, Tony Mechelynck wrote:
> Bug or feature? I see the following in my Huge gvim with GTK2/Gnome > GUI (and as many features as I could get, including +keymap and +xim): > > I have the following in my keymap: > > map <F8> :let &l:imi = !&l:imi<CR> > sunmap <F8> > map! <F8> <C-O><F8> > > I would expect that with this set of mappings, hitting F8 should > toggle the local setting between keymap and no keymap, without > changing the global setting. But this is not the case. At startup, > after loading my editfiles and setting their keymaps where > appropriate, I see &g:imi == 2 (IM active) and &l:imi == 1 (keymap > active). So there exist a global and a local setting for this > (buffer-local) option, and they are distinct. However, as soon as I > hit F8 (in Normal or Insert mode it behaves identically), not only > &l:imi toggles to 0 (neither keymap nor IM) and subsequently back to 1 > (keymap) but &g:imi follows the local value. This is what I expected > for the local setting but not for the global setting. > > Bug or feature? And if it is a feature, how does it work? In > particular, if a feature, how can I circumvent it to toggle only the > local value? > > FWIW, I'm displaying the values with > :setl imi? > :setg imi? > to see what they are after hitting F8, and ":verbose map <F8>" and > ":verbose map! <F8>" tell me that the mappings are still as the keymap > defined them. That has been discussed before: https://groups.google.com/d/msg/vim_dev/HpwZWJojl3E/4zCBH3qWQ5IJ Best, Christian -- Die Vergangenheit sollten wir als Sprungbrett benutzen, nicht als Sofa. -- -- You received this message from the "vim_dev" 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 --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
