9

My vimtutor is in portuguese. I don't know why, because my Windows OS is in english, so as everything else. I don't remember to have chosen "portuguese" anywhere in the vim installing process.

How do I change it to english?

  • It may be a ... VI.rus ! (just kidding). I'd simply install a recent Vim, e.g. bintray.com/veegee/generic/vim_x64. – VanLaser Aug 12 '15 at 21:39
  • 1
    @VanLaser Haha - no. vimtutor en starts it in english, however this is not the default. If I do vimtutor only, it opens up in portuguese. – Afonso Matos Aug 12 '15 at 21:44
  • 1
    What the value of v:lang? :echo v:lang. – Martin Tournoij Aug 13 '15 at 8:12
  • @Carpetsmoker It's PT (portuguese). Is this what I need to change? – Afonso Matos Aug 13 '15 at 11:38
  • So that's the source of the problem ;-) :help v:lang tells me it should be inherited from the OS (Windows in your case), or set explicitly by the user with the :language command ... But that won't help you, since the tutor file has already been loaded in the wrong language... – Martin Tournoij Aug 13 '15 at 11:53
6

1'st method

Run vimtutor (from command line) with 2 letter language code like:

vimtutor en (for English)

vimtutor pt (for Portuguese)

etc...

2'nd method

Open tutor with different language with:

vim /usr/share/vim/vim74/tutor/tutor (for English)

vim /usr/share/vim/vim74/tutor/tutor.pt (for Portuguese)

etc...

(The same default path applies to Cygwin on Windows. You may want to change vim74 part if you have different version)

Using this method you may actually want to copy the file somewhere else first and then open the copy, because you are going to modify it.

3'rd method

Vimtutor opens in Portuguese by default because you probably have some environmental variable set to Portugese like: LC_ALL, LANG, LANGUAGE (check it with env | grep -P 'LC_ALL|LANG'. You may want to change it like this:

export LC_ALL=en_US.utf-8

and then run vimtutor.

  • Note that directly editing the tutor files (your "2nd method") is probably not a good idea. The vimtutor program copies this file to a temporary file, so you can muck about at your leisure and not foul anything up ;-) I recommend you do that, instead. – Martin Tournoij Aug 13 '15 at 22:04
  • Yes, it is written in the answer (copying the file somewhere else). – Kossak Aug 13 '15 at 23:32
  • By the way, the language code has minimally, not necessarily, two letters. Open, e. g., the vimtutor in Bavarian with "vimtutor bar". – Josef Hell Apr 4 '19 at 22:50
0

This method works well:

export LC_ALL=en_US.utf-8

For the Russian language, for example, then it is necessary to dial the following line:

vimtutor ru

for Portuguese

vimtutor pt  
  • Thanks for your effort but both of the methods you describe here were described one year ago in the other answer. – statox Sep 14 '16 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.