In gVim, enter vimtutor in command mode and enter the vehicle. If you cannot open the official vim tutorial, you will enter visual mode.

  question, vim

It is said that the official Vim tutorial can be opened by directly entering vimtutor in vim command mode and then entering the car. However, as soon as the letter V is entered, it will automatically switch to the visual mode, and the purpose of opening the vimtutor tutorial cannot be realized at all.

Another argument is to enter first: enter command mode, then enter vimtutor, but still cannot be opened.

How on earth should vimtutor be opened directly by command? Can it only be opened by mouse?

-The problem has been solved-
Originally referring to entering vimtuter at the shell’s command line prompt, I understood it as entering vimtuter in vim command mode. Jiong ……

vimtutorIt is not a file or a pattern, but an executable programshellEnter on the command linevimtutorEnter directly.

To usegvimTo usevimtutor, you can add-gParameters. That is, incmdOrshellImplementationvimtutor -g.

vimtutorIn essence, it is only opened in non-compatible mode without using the user profile.tutorFiles. ClassesUNIXUnder the system$VIMRUNTIME/tutor/tutor,WindowsNext is%HOME%/vimfiles/tutor(This is not certain). You can always be atvimExecution in:set runtimepathEnter to get the runtime path.

You can copy and paste the file in the file manager or execute it under command. The main consideration is to try not to modify the original file:

vim -u NONE -c "e $VIMRUNTIME/tutor/tutor" -c "w!  TUTORCOPY" -c "q"
 vim -u NONE -c "set nocp" TUTORCOPY

Description:

  • -uSpecify user profile hereNONEIndicates that the user profile is not used

  • -cexecutive command

  • The first one: the one that opens the runtime pathtutorFile, saved asTUTORCOPYFile, exit;

  • Article 2: Open the file and identify the incompatible mode.