21

I'm running vim on Windows 7. It works, but when I type vimtutor on the command line, a window opens and closes immediately, and nothing else happens.

Is there a way to run vimtutor with Vim for Windows?

1
  • I get different, but still broken behavior when I try to run the vimtutor.bat file. I have submitted a report to the Vim Developers' mailing list.
    – Heptite
    Apr 14, 2011 at 18:57

8 Answers 8

17

Run gVim from the Start Menu, then File->Open

C:\Program Files\Vim\vim73\tutor\tutor

(may be different with another version or install location, it doesn't have a file extension). Save a copy of the file to My Documents using the menu.

The vimtutor command is a merely a shortcut command to do this, as well as automatically showing the correct translations if necessary. You don't need it.

1
  • For me the path was C:\Program Files (x86)\Vim\vim81\tutor\tutor
    – Stefan
    Jul 11, 2018 at 19:38
8

Vim 8

This script will start Vim on a copy of the tutor file!

C:\Program Files (x86)\Vim\vim80\vimtutor.bat

enter image description here

1
  • 5
    The Technology has improved since 5 years
    – yass
    Mar 30, 2017 at 12:32
4

How to run vimtutor on windows?

  • Install cygwin with vim, open a Cygwin Terminal and type vimtutor.

(That's how simple it was ever meant to be).

Explanation: I'm suggesting you should use the right tool for the job, that's why I'm "promoting" Cygwin, which is one of the best ways of having not only vim, but a whole UNIX-like environment on Windows. It is apparent from the question that you are using some graphical vim implementation, and it cannot run vimtutor without a workaround. I say it's a great opportunity of trying out something different: a collection of tools that are not only coherent among themselves, but also quite well-integrated with the host environment (Windows). This is my heartfelt suggestion, which I hope will not only enable you to run vimtutor without a hassle, but possibly give you further satisfactions once you start using it. It has given me a great many, and no problems at all over the course of years, hence my enthusiasm in sharing my experience.

P.S. In your recent comment you mention not having a Windows machine, so I guess this question is no longer relevant to you. Maybe this suggestion can be of some use to others.

3
  • Not sure why you are repeating answers on a 6 year old question. Mar 30, 2017 at 16:04
  • 3
    @EricWilson I believe I'm giving a different answer from the existing ones. I agree that this is not going to get a lot of visibility given the post age.
    – simlev
    Mar 30, 2017 at 16:10
  • Didn't notice, I see now. It might be useful to add some information about what has changed (version of cygwin or vim, etc.) I'll not accept the answer, as I don't have a Windows machine, so I can't test. Mar 30, 2017 at 16:16
1

This can happen when Vim doesn't have a translation of a tutor file into the language set by the system, when you have installed additional language files during Vim installation (if installing through the Windows installer) and use Windows with an unsupported locale. I was able to run vimtutor without problems when I reinstalled Vim with the checkbox to install additional language files unchecked.

0

For those who prefer to launch the tutor directly, here's a simple no-frills replacement (adjust Vim install directory):

@echo off
copy "C:\program Files\Vim\vim74\tutor\tutor" "%TEMP%\tutor"
gvim -u NONE -c "set nocp" "%TEMP%\tutor"
0

Find the vimtutor BAT file (usually $VIM/vim74) and then double click it. A daemon cmd windows opens, and the vimtutor window will open and not close immediately.

0

If you've installed Vim through Git for Windows, then you're out of luck (currently, i.e. Git v2.12.2). The only vimtutor command installed is the bash script. So if you're running the Linux subsystem on Windows or you're in Cygwin then you might be ok, but otherwise not.

The tutor directory does exist in C:\Program Files\Git\usr\share\vim\vim80, but you'll obviously have to copy it manually to a temp directory as the vimtutor script does.

1
  • 1
    The command vimtutor actually works for me in git-bash (MINGW64) for some reason. Aug 12, 2019 at 1:08
0

I'm using gvim portable. If your portable gvim is on your c: drive, then vimtutor is located:

c:\Portable\gVimPortable\App\vim\vim80\vimtutor.bat

Add c:\Portable\gVimPortable\App\vim\vim80 to your path, then you can run vimtutor from cmd. No need to manually or even script a temp folder.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .