Vim's font and resolution are error in Windows Bash Subsystem

Viewed 274

I'm using vim in Windows Linux Subsystem bash. I had some font configs like this: Terminal's font settings But when I open vim, I finds the font and screen dimensions are wrong: Wrong font and screen dimensions It seems that the settings are overridden by vim: enter image description here I don't know where is the root cause, anyone encounter this situation? How can I fix this?

1 Answers

googling OP's problem, I found two links that described and solved a similar problem in the exact same way. I asked OP if works even for him and he said yes, so I'm reporting the solution here for future reference.

from a blog post (https://www.unoiou.com/articles/2019/04/18/time-wasting-stuff/fix-windows-wsl-vim-font-issue/):

Fourtunately, I found a solution by editing Registry on Windows 10.

  • Add a new DWORD record in HKEY_CURRENT_USER\Console\C:_Program Files_WindowsApps_CanonicalGroupLimited.UbuntuonWindows_1804.2018.817.0_x64__79rhkp1fndgsc_ubuntu.exe named CodePage
  • Set it to Decimal and value 65001 or Hexadecimal and value fde9
  • Restart the wsl window

from a WSL github issue comment (https://github.com/Microsoft/WSL/issues/757#issuecomment-359867729):

in the (registry) path HKEY_CURRENT_USER\Console\C:_Program Files_WindowsApps_CanonicalGroupLimited.UbuntuonWindows_xxxx.ubuntu.exe, add CodePage->(DWORD)FDE9(65001) then I start Ubuntu directly from start menu, It's Consolas ! PS: I use the new Ubuntu distribution from windows appstore, not the old one from Windows Subsystem for Linux

Related