Home Explore Blog CI



neovim

3rd chunk of `runtime/doc/arabic.txt`
457490397f9948545ee2f5b4bc6b581fa5528fc1b7b64b480000000100000cad
 mode

   NOTE: the 'arabic' command takes into consideration 'termbidi' for
	 possible external bi-directional (bidi) support from the
	 terminal ("mlterm" for instance offers such support).
	 'termbidi', if available, is superior to rightleft support
	 and its support is preferred due to its level of offerings.
	 'arabic' when 'termbidi' is enabled only sets the keymap.

	 For vertical window isolation while setting 'termbidi' an LTR
	 vertical separator like "l" or "𝖨" may be used.  It may also be
	 hidden by changing its color to the foreground color: >
		:set fillchars=vert:l
		:hi WinSeparator ctermbg=White
<	Note that this is a workaround, not a proper solution.

   If, on the other hand, you'd like to be verbose and explicit and
   are opting not to use the 'arabic' short-cut command, here's what
   is needed (i.e. if you use ':set arabic' you can skip this section) -

   +  Arabic Keymapping Activation

      To activate the Arabic keymap (i.e. to remap your English/Latin
      keyboard to look-n-feel like a standard Arabic one), set the
      'keymap' command to "arabic".  This is done by entering
>
		:set keymap=arabic
<
      in your VIM window.  You can also append the 'keymap' set command to
      your vimrc file.  In other words, you can include ':set keymap=arabic'
      to your vimrc file.

      To turn toggle (or switch) your keymapping between Arabic and the
      default mapping (English), it is advised that users use the 'CTRL-^'
      key press while in insert (or add/replace) mode.	The command-line
      will display your current mapping by displaying an "Arabic" string
      next to your insertion mode (e.g. -- INSERT Arabic --) indicating
      your current keymap.

   +  Arabic deletion of a combined pair character

      By default Vim has the 'delcombine' option disabled.  This option
      allows the deletion of ALEF in a LAM_ALEF (LAA) combined character
      and still retain the LAM (i.e. it reverts to treating the combined
      character as its natural two characters form -- this also pertains
      to harakat and their combined forms).  You can enable this option
      by entering
>
		:set delcombine
<
      in our VIM window.  You can also append the 'delcombine' set command
      to your vimrc file.  In other words, you can include ':set delcombine'
      to your vimrc file.

   +  Arabic right-to-left Mode

      By default VIM starts in Left-to-right mode.  'rightleft' is the
      command that allows one to alter a window's orientation - that can
      be accomplished via,

      - Toggling between left-to-right and right-to-left modes is
	accomplished through ':set rightleft' and ':set norightleft'.

      - While in Left-to-right mode, enter ':set rl' in the command line
	('rl' is the abbreviation for rightleft).

      - Put the ':set rl' line in your vimrc file to start Vim in
        right-to-left mode permanently.

   +  Arabic right-to-left command-line Mode

      For certain commands the editing can be done in right-to-left mode.
      Currently this is only applicable to search commands.

      This is controlled with the 'rightleftcmd' option.  The default is
      "search", which means that windows in which 'rightleft' is set will

Title: Detailed Arabic Configuration in Vim: Keymapping, Deletion, and RTL Mode
Summary
This section explains how to configure Vim for Arabic without using the ':set arabic' shortcut. It details how to activate the Arabic keymap using ':set keymap=arabic', toggle between Arabic and English keymaps using CTRL-^, and enable combined character deletion with ':set delcombine'. It also covers setting right-to-left (RTL) mode using ':set rightleft' and ':set norightleft', and configuring right-to-left command-line mode using the 'rightleftcmd' option. The interaction of the 'arabic' command with 'termbidi' for external bi-directional support is also mentioned.