keyboard layout changes when I open macvim

74 views
Skip to first unread message

pqs

unread,
Jul 6, 2008, 12:43:28 PM7/6/08
to vim_mac
Hello,

I'm using Mac OS X Leopard, and I have macvim installed. I use it a
lot.

As I write in several languages, I have several keyboard layouts.

The strange problem I have is that when I open macvim, the system
keyboard switches to the spanish keyboard (even though it is not my
default). Its quite annoying, because each time I have to change the
keyboard layout again.

Does anybodody have any idea about what could cause this strange
behavior?

Thanks

Pere
http://pere.quintanasegui.com

Nico Weber

unread,
Jul 6, 2008, 2:09:52 PM7/6/08
to vim...@googlegroups.com
Hi,

> As I write in several languages, I have several keyboard layouts.
>
> The strange problem I have is that when I open macvim, the system
> keyboard switches to the spanish keyboard (even though it is not my
> default). Its quite annoying, because each time I have to change the
> keyboard layout again.
>
> Does anybodody have any idea about what could cause this strange
> behavior?

hm, did you upgrade to Leopard from Tiger? If I remember correctly,
Tiger had an option to remember keyboard layouts per-application.
Perhaps you set that up in Tiger, and then did upgrade, and the pref
is still there…

I don't know where this preference is stored though (what's the output
of `cat ~/.CFUserTextEncoding`?). Perhaps it helps if you remove the
spanish layout in System Preferences->International, launch MacVim,
quit MacVim, and then add spanish again?

Nico

pqs

unread,
Jul 6, 2008, 3:29:39 PM7/6/08
to vim_mac
On Jul 6, 8:09 pm, Nico Weber <nicolaswe...@gmx.de> wrote:
> hm, did you upgrade to Leopard from Tiger? If I remember correctly,  
> Tiger had an option to remember keyboard layouts per-application.  
> Perhaps you set that up in Tiger, and then did upgrade, and the pref  
> is still there…

Yes I upgraded from Tiger to Leopard, and your idea looks good.

But I tryed to remove the keyboard layout and I couldn't, it was gray.
Look at this screenshot:
http://farm4.static.flickr.com/3163/2643377742_60c1affde4_o.png

> I don't know where this preference is stored though (what's the output  
> of `cat ~/.CFUserTextEncoding`?). Perhaps it helps if you remove the  
> spanish layout in System Preferences->International, launch MacVim,  
> quit MacVim, and then add spanish again?

cat ~/.CFUserTextEncoding
0:0

What does this mean?

Thanks

Pere

björn

unread,
Jul 6, 2008, 3:52:03 PM7/6/08
to vim...@googlegroups.com
2008/7/6 pqs <p...@illadelaire.org>:

Have you tried adding the line

set imd

to your ~/.gvimrc file?

Björn

Nico Weber

unread,
Jul 6, 2008, 5:29:18 PM7/6/08
to vim...@googlegroups.com
Hi,

> Yes I upgraded from Tiger to Leopard, and your idea looks good.
>
> But I tryed to remove the keyboard layout and I couldn't, it was gray.
> Look at this screenshot:
> http://farm4.static.flickr.com/3163/2643377742_60c1affde4_o.png

Try checking activating a different "Roman" keyboard that is not
international (e.g. "Canadian English"). Can you now disable Spanish?
If so, start MacVim, quit it, re-enable spanish, disable Canadian and
see if that helps.

>> I don't know where this preference is stored though (what's the
>> output
>> of `cat ~/.CFUserTextEncoding`?). Perhaps it helps if you remove the
>> spanish layout in System Preferences->International, launch MacVim,
>> quit MacVim, and then add spanish again?
>
> cat ~/.CFUserTextEncoding
> 0:0
>
> What does this mean?

I'm not sure, but it's somehow related to language and text encoding.
"0:0" means "default", so that's ok.

Nico

pqs

unread,
Jul 7, 2008, 4:27:14 PM7/7/08
to vim_mac
Hi,

On Jul 6, 11:29 pm, Nico Weber <nicolaswe...@gmx.de> wrote:
> Try checking activating a different "Roman" keyboard that is not  
> international (e.g. "Canadian English"). Can you now disable Spanish?  

Yes, this worked. Why should I have a Roman keyboard always activated?

> If so, start MacVim, quit it, re-enable spanish, disable Canadian and  
> see if that helps.

Unfortunatelly, this did nothing. When I re-enabled the Spanish
keyboard I had the same problem again.

But I didn't logout between the changes. Should I?

> > cat ~/.CFUserTextEncoding
> > 0:0
> > What does this mean?
>
> I'm not sure, but it's somehow related to language and text encoding.  
> "0:0" means "default", so that's ok.

Ok, thanks.

Pere

pqs

unread,
Jul 7, 2008, 4:24:42 PM7/7/08
to vim_mac
Hi

On Jul 6, 9:52 pm, "björn" <bjorn.winck...@gmail.com> wrote:
> Have you tried adding the line
>
> set imd
>
> to your ~/.gvimrc file?

I don't have a .gvimrc file. I have a .vimrc. Is that equivalent?

I added "set imd" to my .vimrc and it didn't work. Then I created a
new .gvimrc with this line at it didn't work neither.

pere

Nico Weber

unread,
Jul 7, 2008, 4:37:16 PM7/7/08
to vim...@googlegroups.com
>> Try checking activating a different "Roman" keyboard that is not
>> international (e.g. "Canadian English"). Can you now disable Spanish?
>
> Yes, this worked. Why should I have a Roman keyboard always activated?

Ask Apple. Probably because they want that you can always type stuff
into a terminal.

>> If so, start MacVim, quit it, re-enable spanish, disable Canadian and
>> see if that helps.
>
> Unfortunatelly, this did nothing. When I re-enabled the Spanish
> keyboard I had the same problem again.
>
> But I didn't logout between the changes. Should I?

It's worth a try. You could also try removing the file ~/Library/
Preferences/org.vim.MacVim.plist and then restarting MacVim (you'll
the list of recent files and MacVim will ask you again if it should
check for updates. That's normal when you remove the prefs file). Does
that help? If this works, I'd be interested in seeing the plist file.
Can you send it to the list? (only if it helps, though).

Nico

Nico Weber

unread,
Jul 7, 2008, 4:50:24 PM7/7/08
to vim...@googlegroups.com
Hi,

On 07.07.2008, at 22:24, pqs wrote:
> On Jul 6, 9:52 pm, "björn" <bjorn.winck...@gmail.com> wrote:
>> Have you tried adding the line
>>
>> set imd
>>
>> to your ~/.gvimrc file?
>
> I don't have a .gvimrc file. I have a .vimrc. Is that equivalent?

.gvimrc is the same as a .vimrc, but for GUI mode. .vimrc is read if
you start vim in terminal (`vim`) or in gui mode (`mvim` or `gvim` on
linux), .gvimrc is read only in gui mode (in gui mode, .vimrc is read
before .gvimrc).

Nic

pqs

unread,
Jul 12, 2008, 9:19:33 AM7/12/08
to vim_mac


On 7 Jul, 22:37, Nico Weber <nicolaswe...@gmx.de> wrote:
> It's worth a try. You could also try removing the file ~/Library/
> Preferences/org.vim.MacVim.plist and then restarting MacVim (you'll  
> the list of recent files and MacVim will ask you again if it should  
> check for updates. That's normal when you remove the prefs file). Does  
> that help? If this works, I'd be interested in seeing the plist file.  
> Can you send it to the list? (only if it helps, though).
>

No, I didn't help.

Thanks

Pere


> Nico

Hushpuppy

unread,
Aug 14, 2008, 11:08:08 AM8/14/08
to vim_mac
I am having a similar problem. I just installed VIM 7.0.224 on my
MacBook running OSX 10.5.4. I use Dvorak keyboard layout. Now,
whenever I fire up VIM it changes my keyboard layout. No other app I
have run so far has done this. The machine is less than a month old
so I have not loaded VIM on it before. This layout switching, again,
is a brand new thing that arose with MacVIM.

björn

unread,
Aug 15, 2008, 9:09:39 AM8/15/08
to vim...@googlegroups.com
2008/8/14 Hushpuppy <msch...@gmail.com>:

>
> I am having a similar problem. I just installed VIM 7.0.224 on my
> MacBook running OSX 10.5.4. I use Dvorak keyboard layout. Now,
> whenever I fire up VIM it changes my keyboard layout. No other app I
> have run so far has done this. The machine is less than a month old
> so I have not loaded VIM on it before. This layout switching, again,
> is a brand new thing that arose with MacVIM.

First of all: it sounds to me like you are using the old Carbon Vim
(the one on macvim.org) so first of all go to code.google.com/p/macvim
and download MacVim.app instead.

Assuming you still have the same problems with MacVim.app, can you
please tell me _exactly_ what language settings you have. Open System
Preferences -> International

1. What keyboard layouts are active under the "Input Menu" tab?
2. Which language is at the top of the list under the "Language" tab?

Finally, what's the content of the file ~/.CFUserTextEncoding (open
Terminal and type cat .CFUserTextEncoding)?

pqs, if you are still reading this thread, can you also tell me the
answers to 1 and 2?

Thanks,
Björn

Hushpuppy

unread,
Aug 19, 2008, 1:57:13 PM8/19/08
to vim_mac
Thanks! Yes, the Google version works great! And it looks cooler,
too :-). I appreciate your response.

On Aug 15, 8:09 am, "björn" <bjorn.winck...@gmail.com> wrote:
> 2008/8/14 Hushpuppy <mschw...@gmail.com>:
>
> > I am having a similar problem.
>
> First of all: it sounds to me like you are using the old Carbon Vim
> (the one on macvim.org) so first of all go to code.google.com/p/macvim
> and download MacVim.app instead.
>
> 1. What keyboard layouts are active under the "Input Menu" tab?
> 2. Which language is at the top of the list under the "Language" tab?

In case you still want them, the answers are:
1. Dvorak, and U.S.
2. English

Thanks again,
-the Pupp
Reply all
Reply to author
Forward
0 new messages