Christian Brabandt | 8a52587 | 2024-12-04 20:06:45 +0100 | [diff] [blame] | 1 | *vietnamese.txt* For Vim version 9.1. Last change: 2024 Dec 04 |
Phạm Bình An | 189e24b | 2024-12-03 21:59:52 +0100 | [diff] [blame] | 2 | |
| 3 | |
| 4 | VIM REFERENCE MANUAL by Phạm Bình An |
| 5 | |
| 6 | |
| 7 | Vietnamese language support in Vim *vietnamese* *Vietnamese* |
| 8 | |
| 9 | 1. Introduction |vietnamese-intro| |
| 10 | 2. Vietnamese keymaps |vietnamese-keymap| |
Christian Brabandt | 72212c9 | 2024-12-07 15:57:34 +0100 | [diff] [blame] | 11 | 3. Localization |vietnamese-l10n| |
Phạm Bình An | 189e24b | 2024-12-03 21:59:52 +0100 | [diff] [blame] | 12 | |
| 13 | =============================================================================== |
| 14 | 1. Introduction |
| 15 | *vietnamese-intro* |
Phạm Bình An | 189e24b | 2024-12-03 21:59:52 +0100 | [diff] [blame] | 16 | Vim supports Vietnamese language in the following ways: |
| 17 | |
| 18 | - Built-in |vietnamese-keymap|, which allows you to type Vietnamese characters |
| 19 | in |Insert-mode| and |search-commands| using US keyboard layout. |
Christian Brabandt | 72212c9 | 2024-12-07 15:57:34 +0100 | [diff] [blame] | 20 | - Localization in Vietnamese. See |vietnamese-l10n| |
Phạm Bình An | 189e24b | 2024-12-03 21:59:52 +0100 | [diff] [blame] | 21 | |
| 22 | =============================================================================== |
| 23 | 2. Vietnamese keymaps |
| 24 | *vietnamese-keymap* |
Phạm Bình An | 189e24b | 2024-12-03 21:59:52 +0100 | [diff] [blame] | 25 | To switch between languages you can use your system native keyboard switcher, |
| 26 | or use one of the Vietnamese keymaps included in the Vim distribution, like |
| 27 | below > |
| 28 | :set keymap=vietnamese-telex_utf-8 |
| 29 | < |
| 30 | See |'keymap'| for more information. |
| 31 | |
| 32 | In the latter case, you can type Vietnamese even if you do not have a |
| 33 | Vietnamese input method engine (IME) or you want Vim to be independent from a |
| 34 | system-wide keyboard settings (when |'imdisable'| is set). You can also |:map| |
| 35 | a key to switch between keyboards. |
| 36 | |
| 37 | Vim comes with the following Vietnamese keymaps: |
| 38 | - *vietnamese-telex_utf-8* Telex input method, |UTF-8| encoding. |
| 39 | - *vietnamese-viqr_utf-8* VIQR input method, |UTF-8| encoding. |
| 40 | - *vietnamese-vni_utf-8* VNI input method, |UTF-8| encoding. |
| 41 | |
| 42 | *vietnamese-ime_diff* |
Phạm Bình An | 189e24b | 2024-12-03 21:59:52 +0100 | [diff] [blame] | 43 | Since these keymaps were designed to be minimalistic, they do not support all |
| 44 | features of the corresponding input methods. The differences are described |
| 45 | below: |
| 46 | |
| 47 | - You can only type each character individually, entering the base letter first |
| 48 | and then the diacritics later. For example, to type the word `nến` using |
| 49 | |vietnamese-vni_utf-8|, you must type `ne61n`, not `nen61` or `ne6n1` |
| 50 | - For characters with more than 1 diacritic, you need to type vowel mark before |
| 51 | tone mark. For example, to type `ồ` using |vietnamese-telex_utf-8|, you need |
| 52 | to type `oof`, not `ofo`. |
| 53 | - With |vietnamese-telex_utf-8|, you need to type all uppercase letters to |
| 54 | produce uppercase characters with diacritics. For example, `Ừ` must be typed |
| 55 | as `UWF`. |
| 56 | - With |vietnamese-telex_utf-8|, the escape character `\` from VNI is added, |
| 57 | hence the confusing `ooo` input to type `oo` is removed, which could lead to |
| 58 | ambiguities. For example, to type the word `Đoòng`, you would type |
| 59 | `DDo\ofng`. |
| 60 | - Simple Telex (both v1 and v2), including the `w[]{}` style, is not |
| 61 | supported. |
| 62 | - Removing diacritics using `z` in Telex or `0` in VNI and VIQR is not supported. |
| 63 | |
| 64 | =============================================================================== |
| 65 | 3. Localization |
Christian Brabandt | 72212c9 | 2024-12-07 15:57:34 +0100 | [diff] [blame] | 66 | *vietnamese-l10n* |
Christian Brabandt | 8a52587 | 2024-12-04 20:06:45 +0100 | [diff] [blame] | 67 | Vim |messages| are also available in Vietnamese. If you wish to see messages |
| 68 | in Vietnamese, you can run the command |:language| with an argument being the |
| 69 | name of the Vietnamese locale. For example, > |
Phạm Bình An | 189e24b | 2024-12-03 21:59:52 +0100 | [diff] [blame] | 70 | :language vi_VN |
| 71 | < or > |
| 72 | :language vi_VN.utf-8 |
| 73 | < |
| 74 | Note that the name of the Vietnamese locale may vary depending on your system. |
| 75 | See |mbyte-first| for details. |
| 76 | |
| 77 | |vimtutor| is also available in Vietnamese. To start Vimtutor in Vietnamese, |
Christian Brabandt | 8a52587 | 2024-12-04 20:06:45 +0100 | [diff] [blame] | 78 | run the following command in terminal: > |
Phạm Bình An | 189e24b | 2024-12-03 21:59:52 +0100 | [diff] [blame] | 79 | vimtutor vi |
| 80 | < |
| 81 | =============================================================================== |
| 82 | vim:tw=78:ts=8:noet:ft=help:norl: |