comparison runtime/doc/arabic.txt @ 11473:bd6ff5246c71

Update runtime files. commit https://github.com/vim/vim/commit/6aa8cea46d4179b2617daae034063dd0d8054e35 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 5 14:44:35 2017 +0200 Update runtime files.
author Christian Brabandt <cb@256bit.org>
date Mon, 05 Jun 2017 14:45:04 +0200
parents 9f48eab77d62
children 1174611ad715
comparison
equal deleted inserted replaced
11472:7b3e6e31fbb6 11473:bd6ff5246c71
8 8
9 {Vi does not have any of these commands} 9 {Vi does not have any of these commands}
10 10
11 *E800* 11 *E800*
12 In order to use right-to-left and Arabic mapping support, it is 12 In order to use right-to-left and Arabic mapping support, it is
13 necessary to compile VIM with the |+arabic| feature. 13 necessary to compile Vim with the |+arabic| feature.
14 14
15 These functions have been created by Nadim Shaikli <nadim-at-arabeyes.org> 15 These functions have been created by Nadim Shaikli <nadim-at-arabeyes.org>
16 16
17 It is best to view this file with these settings within VIM's GUI: > 17 It is best to view this file with these settings within Vim's GUI: >
18 18
19 :set encoding=utf-8 19 :set encoding=utf-8
20 :set arabicshape 20 :set arabicshape
21 21
22 22
40 the user interface remains the standard Vi interface. 40 the user interface remains the standard Vi interface.
41 41
42 42
43 Highlights 43 Highlights
44 ---------- 44 ----------
45 o Editing left-to-right files as in the original VIM hasn't changed. 45 o Editing left-to-right files as in the original Vim hasn't changed.
46 46
47 o Viewing and editing files in right-to-left windows. File 47 o Viewing and editing files in right-to-left windows. File
48 orientation is per window, so it is possible to view the same 48 orientation is per window, so it is possible to view the same
49 file in right-to-left and left-to-right modes, simultaneously. 49 file in right-to-left and left-to-right modes, simultaneously.
50 50
51 o No special terminal with right-to-left capabilities is required. 51 o No special terminal with right-to-left capabilities is required.
52 The right-to-left changes are completely hardware independent. 52 The right-to-left changes are completely hardware independent.
53 Only Arabic fonts are necessary. 53 Only Arabic fonts are necessary.
54 54
55 o Compatible with the original VIM. Almost all features work in 55 o Compatible with the original Vim. Almost all features work in
56 right-to-left mode (there are liable to be bugs). 56 right-to-left mode (there are liable to be bugs).
57 57
58 o Changing keyboard mapping and reverse insert modes using a single 58 o Changing keyboard mapping and reverse insert modes using a single
59 command. 59 command.
60 60
64 entering a none number character, that character will be inserted 64 entering a none number character, that character will be inserted
65 just into the left of the last number. 65 just into the left of the last number.
66 66
67 o Arabic keymapping on the command line in reverse insert mode. 67 o Arabic keymapping on the command line in reverse insert mode.
68 68
69 o Proper Bidirectional functionality is possible given VIM is 69 o Proper Bidirectional functionality is possible given Vim is
70 started within a Bidi capable terminal emulator. 70 started within a Bidi capable terminal emulator.
71 71
72 72
73 Arabic Fonts *arabicfonts* 73 Arabic Fonts *arabicfonts*
74 ------------ 74 ------------
75 75
76 VIM requires monospaced fonts of which there are many out there. 76 Vim requires monospaced fonts of which there are many out there.
77 Arabic requires ISO-8859-6 as well as Presentation Form-B fonts 77 Arabic requires ISO-8859-6 as well as Presentation Form-B fonts
78 (without Form-B, Arabic will _NOT_ be usable). It is highly 78 (without Form-B, Arabic will _NOT_ be usable). It is highly
79 recommended that users search for so-called 'ISO-10646-1' fonts. 79 recommended that users search for so-called 'ISO-10646-1' fonts.
80 Do an Internet search or check www.arabeyes.org for further 80 Do an Internet search or check www.arabeyes.org for further
81 info on where to attain the necessary Arabic fonts. 81 info on where to attain the necessary Arabic fonts.
94 % xset +fp path_name_of_arabic_fonts_directory 94 % xset +fp path_name_of_arabic_fonts_directory
95 95
96 96
97 Usage 97 Usage
98 ----- 98 -----
99 Prior to the actual usage of Arabic within VIM, a number of settings 99 Prior to the actual usage of Arabic within Vim, a number of settings
100 need to be accounted for and invoked. 100 need to be accounted for and invoked.
101 101
102 o Setting the Arabic fonts 102 o Setting the Arabic fonts
103 103
104 + For VIM GUI set the 'guifont' to your_ARABIC_FONT. This is done 104 + For Vim GUI set the 'guifont' to your_ARABIC_FONT. This is done
105 by entering the following command in the VIM window. 105 by entering the following command in the Vim window.
106 > 106 >
107 :set guifont=your_ARABIC_FONT 107 :set guifont=your_ARABIC_FONT
108 < 108 <
109 NOTE: the string 'your_ARABIC_FONT' is used to denote a complete 109 NOTE: the string 'your_ARABIC_FONT' is used to denote a complete
110 font name akin to that used in Linux/Unix systems. 110 font name akin to that used in Linux/Unix systems.
113 You can append the 'guifont' set command to your .vimrc file 113 You can append the 'guifont' set command to your .vimrc file
114 in order to get the same above noted results. In other words, 114 in order to get the same above noted results. In other words,
115 you can include ':set guifont=your_ARABIC_FONT' to your .vimrc 115 you can include ':set guifont=your_ARABIC_FONT' to your .vimrc
116 file. 116 file.
117 117
118 + Under the X Window environment, you can also start VIM with 118 + Under the X Window environment, you can also start Vim with
119 '-fn your_ARABIC_FONT' option. 119 '-fn your_ARABIC_FONT' option.
120 120
121 o Setting the appropriate character Encoding 121 o Setting the appropriate character Encoding
122 To enable the correct Arabic encoding the following command needs 122 To enable the correct Arabic encoding the following command needs
123 to be appended, 123 to be appended,
124 > 124 >
125 :set encoding=utf-8 125 :set encoding=utf-8
126 < 126 <
127 to your .vimrc file (entering the command manually into you VIM 127 to your .vimrc file (entering the command manually into you Vim
128 window is highly discouraged). In short, include ':set 128 window is highly discouraged). In short, include ':set
129 encoding=utf-8' to your .vimrc file. 129 encoding=utf-8' to your .vimrc file.
130 130
131 Attempts to use Arabic without UTF-8 will result the following 131 Attempts to use Arabic without UTF-8 will result the following
132 warning message, 132 warning message,
135 Arabic requires UTF-8, do ':set encoding=utf-8' 135 Arabic requires UTF-8, do ':set encoding=utf-8'
136 136
137 o Enable Arabic settings [short-cut] 137 o Enable Arabic settings [short-cut]
138 138
139 In order to simplify and streamline things, you can either invoke 139 In order to simplify and streamline things, you can either invoke
140 VIM with the command-line option, 140 Vim with the command-line option,
141 141
142 % vim -A my_utf8_arabic_file ... 142 % vim -A my_utf8_arabic_file ...
143 143
144 or enable 'arabic' via the following command within VIM 144 or enable 'arabic' via the following command within Vim
145 > 145 >
146 :set arabic 146 :set arabic
147 < 147 <
148 The two above noted possible invocations are the preferred manner 148 The two above noted possible invocations are the preferred manner
149 in which users are instructed to proceed. Barring an enabled 'termbidi' 149 in which users are instructed to proceed. Barring an enabled 'termbidi'
187 keyboard to look-n-feel like a standard Arabic one), set the 187 keyboard to look-n-feel like a standard Arabic one), set the
188 'keymap' command to "arabic". This is done by entering 188 'keymap' command to "arabic". This is done by entering
189 > 189 >
190 :set keymap=arabic 190 :set keymap=arabic
191 < 191 <
192 in your VIM window. You can also append the 'keymap' set command to 192 in your Vim window. You can also append the 'keymap' set command to
193 your .vimrc file. In other words, you can include ':set keymap=arabic' 193 your .vimrc file. In other words, you can include ':set keymap=arabic'
194 to your .vimrc file. 194 to your .vimrc file.
195 195
196 To turn toggle (or switch) your keymapping between Arabic and the 196 To turn toggle (or switch) your keymapping between Arabic and the
197 default mapping (English), it is advised that users use the 'CTRL-^' 197 default mapping (English), it is advised that users use the 'CTRL-^'
200 next to your insertion mode (e.g. -- INSERT Arabic --) indicating 200 next to your insertion mode (e.g. -- INSERT Arabic --) indicating
201 your current keymap. 201 your current keymap.
202 202
203 + Arabic deletion of a combined pair character 203 + Arabic deletion of a combined pair character
204 204
205 By default VIM has the 'delcombine' option disabled. This option 205 By default Vim has the 'delcombine' option disabled. This option
206 allows the deletion of ALEF in a LAM_ALEF (LAA) combined character 206 allows the deletion of ALEF in a LAM_ALEF (LAA) combined character
207 and still retain the LAM (i.e. it reverts to treating the combined 207 and still retain the LAM (i.e. it reverts to treating the combined
208 character as its natural two characters form -- this also pertains 208 character as its natural two characters form -- this also pertains
209 to harakat and their combined forms). You can enable this option 209 to harakat and their combined forms). You can enable this option
210 by entering 210 by entering
211 > 211 >
212 :set delcombine 212 :set delcombine
213 < 213 <
214 in our VIM window. You can also append the 'delcombine' set command 214 in our Vim window. You can also append the 'delcombine' set command
215 to your .vimrc file. In other words, you can include ':set delcombine' 215 to your .vimrc file. In other words, you can include ':set delcombine'
216 to your .vimrc file. 216 to your .vimrc file.
217 217
218 + Arabic right-to-left Mode 218 + Arabic right-to-left Mode
219 219
220 By default VIM starts in Left-to-right mode. 'rightleft' is the 220 By default Vim starts in Left-to-right mode. 'rightleft' is the
221 command that allows one to alter a window's orientation - that can 221 command that allows one to alter a window's orientation - that can
222 be accomplished via, 222 be accomplished via,
223 223
224 - Toggling between left-to-right and right-to-left modes is 224 - Toggling between left-to-right and right-to-left modes is
225 accomplished through ':set rightleft' and ':set norightleft'. 225 accomplished through ':set rightleft' and ':set norightleft'.
251 composing, combining) which the Arabic language requires, enable 251 composing, combining) which the Arabic language requires, enable
252 the 'arabicshape' command. This is done by entering 252 the 'arabicshape' command. This is done by entering
253 > 253 >
254 :set arabicshape 254 :set arabicshape
255 < 255 <
256 in our VIM window. You can also append the 'arabicshape' set 256 in our Vim window. You can also append the 'arabicshape' set
257 command to your .vimrc file. In other words, you can include 257 command to your .vimrc file. In other words, you can include
258 ':set arabicshape' to your .vimrc file. 258 ':set arabicshape' to your .vimrc file.
259 259
260 260
261 Keymap/Keyboard *arabickeymap* 261 Keymap/Keyboard *arabickeymap*
262 --------------- 262 ---------------
263 263
264 The character/letter encoding used in VIM is the standard UTF-8. 264 The character/letter encoding used in Vim is the standard UTF-8.
265 It is widely discouraged that any other encoding be used or even 265 It is widely discouraged that any other encoding be used or even
266 attempted. 266 attempted.
267 267
268 Note: UTF-8 is an all encompassing encoding and as such is 268 Note: UTF-8 is an all encompassing encoding and as such is
269 the only supported (and encouraged) encoding with 269 the only supported (and encouraged) encoding with
292 +-------------------------------------------------+ 292 +-------------------------------------------------+
293 293
294 Restrictions 294 Restrictions
295 ------------ 295 ------------
296 296
297 o VIM in its GUI form does not currently support Bi-directionality 297 o Vim in its GUI form does not currently support Bi-directionality
298 (i.e. the ability to see both Arabic and Latin intermixed within 298 (i.e. the ability to see both Arabic and Latin intermixed within
299 the same line). 299 the same line).
300 300
301 301
302 Known Bugs 302 Known Bugs