vim-patch:829eda7: runtime(new-tutor): update tutor and correct comandline completion (#33449)

Problem: Some parts of the tutor are outdated.

- For example, pressing `<Tab>` after typing `:e` does not complete the
command `:edit`, but shows a completion menu with the first entry being
`:earlier`.

closes: vim/vim#17107

829eda7d38
This commit is contained in:
Phạm Bình An
2025-04-15 14:11:17 +07:00
committed by GitHub
parent 9272dc9597
commit c58c650adf
3 changed files with 30 additions and 13 deletions

View File

@@ -464,7 +464,7 @@ Now go on to the next lesson.
# Lesson 4.1: CURSOR LOCATION AND FILE STATUS
** Type `<C-g>`{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 the entire lesson before executing any of these steps!!
@@ -934,11 +934,20 @@ For more information type `:help init.vim`{vim}.
3. Press `<C-d>`{normal} and Neovim will show a list of commands beginning with "e".
4. Press `<Tab>`{normal} and Neovim will complete the command name to ":edit".
4. Press `<Tab>`{normal} and Neovim will show a menu with possible completions
(or complete the match, if the entered command is unique, e.g.
":ed`<Tab>`{normal}" will be completed to ":edit").
5. Now add a space and the start of an existing file name: `:edit FIL`{vim}
5. Use `<Tab>`{normal} or `<C-n>`{normal} to go to the next match. Or use
`<S-Tab>`{normal} or `<C-p>`{normal} to go to the previous match.
6. Press `<Tab>`{normal}. Neovim will complete the name ("FIL" -> "FILE", 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 `<Tab>`{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 `:help`{vi
5. Create an init.vim startup script to keep your preferred settings.
6. While in command mode, press `<C-d>`{normal} to see possible completions.
Press `<Tab>`{normal} to use one completion.
Press `<Tab>`{normal} to use the completion menu and select a match.
# CONCLUSION