58

Someone recommended me that I should use vimtutor to learn the basics of vim. But I have no idea how to use it. Is it an application? A website?

This is the only link that was given during the discussion here and I can't find a link to anything.

Any suggestions?

0

5 Answers 5

83

Yes, vimtutor is literally the name of a program that runs you through a tutorial for vim. If installed on a Unix environment, that command should be sufficient. On windows, there's an entry in the start menu folder just titled "Vim tutor" which is a shortcut for vimtutor

5
  • So I guess my question is, how do I even install it? There is no link on the website.
    – Sergio Tapia
    Feb 16, 2011 at 0:02
  • 20
    It comes with Vim. If you've installed Vim successfully, you've installed vimtutor as well. Feb 16, 2011 at 0:04
  • 1
    :help vimtutor describes a few tricks as well Aug 3, 2016 at 17:14
  • On windows you can open the file C:\Program Files (x86)\Vim\vim81\tutor\tutor (from superuser.com/questions/270938/how-to-run-vimtutor-on-windows/… )
    – Stefan
    Jul 11, 2018 at 20:16
  • Also when installing vim check the "Install .bat files" box to run it form powershell
    – knoftrix
    May 5, 2020 at 17:29
8

vimtutor is a program that usually gets installed when you install the normal vim/gvim package. You should be able to just run "vimtutor" on the command line, assuming that it got built and installed correctly, and is on your path, etc... If you can't run it on the command line, or it doesn't work for you, you'll have to do some digging to figure out why. In my experience vimtutor doesn't always work as expected. I would start by looking in the install folder for Vim, and see what you can find.

At its core, it's basically just a text file that has some examples that walk you through the basic commands available in vim. It shows you have to navigate using the keyboard, how to edit text, and use some other basic commands. If you can't get vimtutor to work immediately, you can either just keep messing with it, do some more searching (there are plenty of results when you search for vimtutor in google) or just give up on it and learn vim using another type of tutorial. Vimtutor is fairly limited anyway, so it's definitely not that important to get working.

4

If you're using neovim, the way to enter in Tutor file directly from terminal is typing:

    nvim +Tutor

I've learned just reading the "nvim -h"

1

I have neovim (nvim) and executing vimtutor command from terminal doesn't launch the tutor. If it's the case you can execute nvim first and inside the running editor execute :Tutor command which bring you to VIM Tutor.

-4

Type:

yum install vim

Even if you have VIM already installed.
This will install additional files including the "vimtutor".