Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacVim is stuck to one locale, can't switch between keyboard inputs anymore and menus are displayed in same locale #1526

Open
2 of 7 tasks
Sakari369 opened this issue Jan 18, 2025 · 2 comments

Comments

@Sakari369
Copy link

Steps to reproduce

I am using macOS 14.6.1 with locale settings set to Finnish, like my datetime and keyboard settings.
My display language is still english.

But since couple of version of MacVim, for some reason the MacVIm menus are in totally in Finnish, and now with the latest update r180, for some reason I cannot anymore even switch my keyboard locales inside MacVim. Seems like it is dead stuck in that my locale is Finnish, show the menus in Finnish and also other warnings and so on are in Finnish.

But now I can't even switch between english and finnish keyboard inside the app, have not seen this behaviour before with any other macOS app. It is stuck to Finnish.

Even though I manually select "US" keyboard layout from the widget in the menubar, Vim is still stuck in Finnish keyboard layout.
This makes it unusable for me, as I use the US layout to program and write.

I don't know where MacVim gets this setting,
In the terminal, running locale gives:

❯ locale
LANG="fi_FI.UTF-8"
LC_COLLATE="fi_FI.UTF-8"
LC_CTYPE="fi_FI.UTF-8"
LC_MESSAGES="fi_FI.UTF-8"
LC_MONETARY="fi_FI.UTF-8"
LC_NUMERIC="fi_FI.UTF-8"
LC_TIME="fi_FI.UTF-8"
LC_ALL=

So maybe it is trying to pick it up from there, but I only set this in the terminal to be able to display Finnish characters and so on in the terminal, I don't want to see any Finnish text in my OS anywhere else.

I do remember MacVim with Vim 8 still working properly, I think it changed somewhere along when updating to Vim 9, so like not so many releases ago.

Expected behaviour

I expect MacVim to display in English and me to be able to switch between keyboard input locales in the app.

Version of Vim and architecture

MacVim r180

Environment

macOS 14.6.1
arm64
xterm-256color

How MacVim was installed

I don't remember, downloaded from homepages

Logs and stack traces

Vim configuration where issue is reproducable

No response

Issue has been tested with given configuration

  • by running MacVim.app from GUI macOS interface
  • by running vim/gvim/etc installed by MacVim
  • by running other versions of vim (e.g. /usr/bin/vim)

Issue has been tested with no configuration

  • by running mvim --clean (or gvim, supplied by MacVim distribution)
  • by running vim --clean (in terminal, supplied by MacVim distribution)
  • by running vim --clean (in terminal, other suppliers, e.g. /usr/bin/vim)

Other conditions

  • The both Homebrew packages "vim" and "macvim" are installed
@Sakari369
Copy link
Author

Downgrading to MacVim r179 fixes this issue, so sticking with that for now.
r179 also displays the menus in correct language.

@ychin
Copy link
Member

ychin commented Jan 18, 2025

I can't think of any difference between MacVim r179 and r180 on this. Are you sure you were not using MacVim in a different way between the two?

For example, how are you launching MacVim? Are you launching from the Dock and then selecting new window within MacVim? Or are you using the mvim script from within the terminal? When you launch mvim or regular Vim from terminal it will inherit the locale settings from the terminal (meaning Finnish). This is intentional and as designed. You can look up :help langmenu and :help :language to see how to configure Vim's locale to use something other than the provided locale.

So maybe it is trying to pick it up from there, but I only set this in the terminal to be able to display Finnish characters and so on in the terminal, I don't want to see any Finnish text in my OS anywhere else.

I'm a little confused by that statement. macOS supports Unicode so you should be able to display Finnish characters regardless of your locale setting. What program doesn't work without these custom setting?

Here are a few questions:

  1. Have you tried running a clean version of Vim? If you go to "File" -> "New Window (Clean)" it will do that, or you can do mvim --clean from terminal.
  2. Have you tried both launching MacVim from the Dock and selecting File -> New Window versus calling mvim from terminal and is there any difference?
  3. Can you take a screenshot about what you mean by "MacVim is using Finnish menu"?
  4. What exactly does "Even though I manually select "US" keyboard layout from the widget in the menubar, Vim is still stuck in Finnish keyboard layout." mean? Do you have a screenshot of a recording? Are you in normal or insert mode? I'm not understanding exactly what the described behavior is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants