The 'keymap' and 'iminsert' saga (cont.)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The 'keymap' and 'iminsert' saga (cont.)

Tony Mechelynck

gvim 7.2.148 (Huge)

When splitting a window using ":new" or ":new filename" from a window
for which a keymap is defined, the 'iminsert' status is cloned but the
'keymap' isn't. This looks inconsistent to me. I'm not sure whether
these options ought to be cloned or not, but I feel pretty certain that
it ought to be both or neither - not just one without the other.

Opinions?


Best regards,
Tony.
--
        "What the hell are you getting so upset about?  I thought you
didn't believe in God."
        "I don't," she sobbed, bursting violently into tears, "but the
God I don't believe in is a good God, a just God, a merciful God.  He's
not the mean and stupid God you make Him out to be."
                -- Joseph Heller, "Catch-22"

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

Reply | Threaded
Open this post in threaded view
|

Re: The 'keymap' and 'iminsert' saga (cont.)

Bram Moolenaar


Tony Mechelynck wrote:

> gvim 7.2.148 (Huge)
>
> When splitting a window using ":new" or ":new filename" from a window
> for which a keymap is defined, the 'iminsert' status is cloned but the
> 'keymap' isn't. This looks inconsistent to me. I'm not sure whether
> these options ought to be cloned or not, but I feel pretty certain that
> it ought to be both or neither - not just one without the other.
>
> Opinions?

I assume you have set 'keymap' with ":setlocal".  Then the global value
will be used for ":new".  The same happens for 'iminsert'.  Perhaps you
have somehow a global value of 'iminsert'?  I can't reproduce the effect
you describe except when using ":setlocal keymap=name".

--
"A mouse can be just as dangerous as a bullet or a bomb."
             (US Representative Lamar Smith, R-Texas)

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

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

Reply | Threaded
Open this post in threaded view
|

Re: The 'keymap' and 'iminsert' saga (cont.)

Tony Mechelynck

On 13/04/09 21:50, Bram Moolenaar wrote:

>
> Tony Mechelynck wrote:
>
>> gvim 7.2.148 (Huge)
>>
>> When splitting a window using ":new" or ":new filename" from a window
>> for which a keymap is defined, the 'iminsert' status is cloned but the
>> 'keymap' isn't. This looks inconsistent to me. I'm not sure whether
>> these options ought to be cloned or not, but I feel pretty certain that
>> it ought to be both or neither - not just one without the other.
>>
>> Opinions?
>
> I assume you have set 'keymap' with ":setlocal".  Then the global value
> will be used for ":new".  The same happens for 'iminsert'.  Perhaps you
> have somehow a global value of 'iminsert'?  I can't reproduce the effect
> you describe except when using ":setlocal keymap=name".
>

Ah, thanks for the clarification. Yes, I set 'keymap' locally, since I
have a number of files loaded in split-windows, and only one of them
uses a non-Latin script. As for 'iminsert', I'm less sure, since here
are the mappings by means of which I toggle it:

        :noremap <F8> :let &l:imi = !&l:imi<CR>
        :noremap! <F8> <C-^>

(I use F8 because I'm not sure there's a Ctrl-^ on my AZERTY keyboard.)

If the Ctrl-^ key toggles the global value in Insert mode, then that's
the culprit. Maybe it too, ought to act only locally. But for the
moment, I'll copy my map to a map! but with a Ctrl-O in front of it.


Best regards,
Tony.
--
It is something to be able to paint a particular picture, or to carve a
statue, and so to make a few objects beautiful; but it is far more
glorious to carve and paint the very atmosphere and medium through
which we look, which morally we can do.  To affect the quality of the
day, that is the highest of arts.
                -- Henry David Thoreau, "Where I Live"

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