From 829eda7d381e5f635169c927103568b335cd599d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ph=E1=BA=A1m=20B=C3=ACnh=20An?= Date: Sun, 13 Apr 2025 17:30:59 +0200 Subject: [PATCH] runtime(new-tutor): update tutor and correct comandline completion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: Some parts of the tutor are outdated. - For example, pressing `` after typing `:e` does not complete the command `:edit`, but shows a completion menu with the first entry being `:earlier`. closes: #17107 Signed-off-by: Phạm Bình An Signed-off-by: Christian Brabandt --- runtime/tutor/en/vim-01-beginner.tutor | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/runtime/tutor/en/vim-01-beginner.tutor b/runtime/tutor/en/vim-01-beginner.tutor index 85d693d5f3..86efa78561 100644 --- a/runtime/tutor/en/vim-01-beginner.tutor +++ b/runtime/tutor/en/vim-01-beginner.tutor @@ -458,7 +458,7 @@ Now go on to the next lesson. # Lesson 4.1: CURSOR LOCATION AND FILE STATUS ** Type ``{normal} to show your location in a file and the file status. - Type `G`{normal} to move to a line in the file. ** + Type `{count}G`{normal} to move to line {count} in the file. ** NOTE: Read this entire lesson before executing any of the steps!! @@ -933,11 +933,20 @@ default. To start using more features you have to create a "vimrc" file. 3. Press ``{normal} and Vim will show a list of commands that start with "e". - 4. Press ``{normal} and Vim will complete the command name to ":edit". + 4. Press ``{normal} and Vim will show a menu with possible completions + (or complete the match, if the entered command is unique, e.g. + ":ed``{normal}" will be completed to ":edit"). - 5. Now add a space and the start of an existing file name: `:edit FIL`{vim} + 5. Use ``{normal} or ``{normal} to go to the next match. Or use + ``{normal} or ``{normal} to go to the previous match. - 6. Press ``{normal}. Vim will complete the name (if it is unique). + 6. Choose the entry `edit`{vim}. Now you can see that the word `edit`{vim} + have been automatically inserted to the command line. + + 7. Now add a space and the start of an existing file name: `:edit FIL`{vim} + + 8. Press ``{normal}. Vim will show a completion menu with list of file + names that start with `FIL` NOTE: Completion works for many commands. It is especially useful for `:help`{vim}. @@ -956,7 +965,7 @@ NOTE: Completion works for many commands. It is especially useful for 5. Create a vimrc startup script to keep your preferred settings. 6. While in command mode, press ``{normal} to see possible completions. - Press ``{normal} to use one completion. + Press ``{normal} to use the completion menu and select a match. # CONCLUSION