Christian Brabandt | 9c3330d | 2024-12-17 20:24:24 +0100 | [diff] [blame] | 1 | *pi_tutor.txt* For Vim version 9.1. Last change: 2024 Dec 17 |
Yegappan Lakshmanan | a54816b | 2024-11-03 10:49:23 +0100 | [diff] [blame] | 2 | |
| 3 | INTERACTIVE TUTORIALS FOR VIM *vim-tutor-mode* |
| 4 | |
| 5 | vim-tutor-mode provides a system to follow and create interactive tutorials |
h-east | 624bb83 | 2024-11-09 18:37:32 +0100 | [diff] [blame] | 6 | for vim and third party plugins. It replaces the venerable `vimtutor` system. |
Yegappan Lakshmanan | a54816b | 2024-11-03 10:49:23 +0100 | [diff] [blame] | 7 | |
Christian Brabandt | ac2bb9d | 2024-11-04 19:37:24 +0100 | [diff] [blame] | 8 | ============================================================================= |
Yegappan Lakshmanan | a54816b | 2024-11-03 10:49:23 +0100 | [diff] [blame] | 9 | 1. Usage *vim-tutor-usage* |
| 10 | |
| 11 | vim-tutor-mode tutorials are hypertext documents, they have rich text and |
h-east | 624bb83 | 2024-11-09 18:37:32 +0100 | [diff] [blame] | 12 | contain links. To stand out from the rest of the text, links are underlined. |
Yegappan Lakshmanan | a54816b | 2024-11-03 10:49:23 +0100 | [diff] [blame] | 13 | You can follow them by placing the cursor over them and pressing <Enter>, or |
| 14 | by double-clicking them. |
| 15 | |
| 16 | 1.1 Commands |
| 17 | ------------ |
| 18 | *:Tutor* |
Christian Brabandt | 3f7d584 | 2024-12-16 20:11:04 +0100 | [diff] [blame] | 19 | :Tutor [tutorial] Opens a tutorial. Command-line completion for |
| 20 | [tutorial] is provided, the candidates are a list of |
| 21 | ".tutor" files found in the "tutor/<lang>/" folder in |
| 22 | the 'runtimepath'. Tutorials prefixed with "vim-" |
h-east | 624bb83 | 2024-11-09 18:37:32 +0100 | [diff] [blame] | 23 | will always be shown first. |
Yegappan Lakshmanan | a54816b | 2024-11-03 10:49:23 +0100 | [diff] [blame] | 24 | |
Christian Brabandt | 3f7d584 | 2024-12-16 20:11:04 +0100 | [diff] [blame] | 25 | If no [tutorial] is provided, the command starts the |
| 26 | "vim-01-beginner" tutorial, which is equivalent to |
| 27 | Vim's `vimtutor`, chapter 1. |
Yegappan Lakshmanan | a54816b | 2024-11-03 10:49:23 +0100 | [diff] [blame] | 28 | |
Christian Brabandt | 3f7d584 | 2024-12-16 20:11:04 +0100 | [diff] [blame] | 29 | Uses the translated tutorial for the current message |
| 30 | language if possible (|v:lang|), e.g. to open the |
| 31 | chapter 1 of the Italian tutor, use: > |
| 32 | |
Christian Brabandt | 9c3330d | 2024-12-17 20:24:24 +0100 | [diff] [blame] | 33 | :lang it_IT.UTF-8 |
Christian Brabandt | 3f7d584 | 2024-12-16 20:11:04 +0100 | [diff] [blame] | 34 | :Tutor |
| 35 | < |
Yegappan Lakshmanan | a54816b | 2024-11-03 10:49:23 +0100 | [diff] [blame] | 36 | ============================================================================= |
| 37 | 2. Creating tutorials *vim-tutor-create* |
| 38 | |
h-east | 624bb83 | 2024-11-09 18:37:32 +0100 | [diff] [blame] | 39 | Writing vim-tutor-mode tutorials is easy. For an overview of the format used, |
Christian Brabandt | 3f7d584 | 2024-12-16 20:11:04 +0100 | [diff] [blame] | 40 | please consult the "tutor.tutor" file: > |
Yegappan Lakshmanan | a54816b | 2024-11-03 10:49:23 +0100 | [diff] [blame] | 41 | |
| 42 | :Tutor tutor |
| 43 | < |
| 44 | New tutorials must be placed in the 'tutor/' folder in the 'runtimepath' |
| 45 | to be detected by the :Tutor command. |
| 46 | |
| 47 | It is recommended to use a less formal style when writing tutorials than in |
| 48 | regular documentation (unless the content requires it). |
| 49 | |
Christian Brabandt | ac2bb9d | 2024-11-04 19:37:24 +0100 | [diff] [blame] | 50 | ============================================================================= |
Yegappan Lakshmanan | a54816b | 2024-11-03 10:49:23 +0100 | [diff] [blame] | 51 | 3. Contributing |
| 52 | |
| 53 | Development of the plugin is done over at github [1]. Feel free to report |
| 54 | issues and make suggestions. |
| 55 | |
| 56 | [1]: https://github.com/fmoralesc/vim-tutor-mode |
| 57 | |
Christian Brabandt | ac2bb9d | 2024-11-04 19:37:24 +0100 | [diff] [blame] | 58 | ============================================================================= |
| 59 | vim:tw=78:ts=8:noet:ft=help:norl: |