Home Explore Blog CI



neovim

1st chunk of `runtime/doc/rileft.txt`
3310b21f12a7c4edad63f188c1a757299c776baab894a9180000000100000991
*rileft.txt*    Nvim


		  VIM REFERENCE MANUAL    by Avner Lottem
					  updated by Nadim Shaikli


Right to Left display mode for Vim				*rileft*


These functions were originally created by Avner Lottem:
   E-mail: alottem@iil.intel.com
   Phone:  +972-4-8307322

------------------------------------------------------------------------------
Introduction

Some languages such as Arabic, Farsi, Hebrew (among others) require the
ability to display their text from right-to-left.  Files in those languages
are stored conventionally and the right-to-left requirement is only a
function of the display engine (per the Unicode specification).  In
right-to-left oriented files the characters appear on the screen from
right to left.

Bidirectionality (or bidi for short) is what Unicode offers as a full
solution to these languages.  Bidi offers the user the ability to view
both right-to-left as well as left-to-right text properly at the same time
within the same window.  Vim currently, due to simplicity, does not offer
bidi and is merely opting to present a functional means to display/enter/use
right-to-left languages.  An older hybrid solution in which direction is
encoded for every character (or group of characters) are not supported either
as this kind of support is out of the scope of a simple addition to an
existing editor (and it's not sanctioned by Unicode either).


------------------------------------------------------------------------------
Highlights

o  Editing left-to-right files as in the original Vim, no change.

o  Viewing and editing files in right-to-left windows.  File orientation
   is per window, so it is possible to view the same file in right-to-left
   and left-to-right modes, simultaneously.  (Useful for editing mixed files
   in which both right-to-left and left-to-right text exist).

o  Compatibility to the original Vim.  Almost all features work in
   right-to-left mode (see Bugs below).

o  Backing from reverse insert mode to the correct place in the file
   (if possible).

o  No special terminal with right-to-left capabilities is required.  The
   right-to-left changes are completely hardware independent.

o  Many languages use and require right-to-left support.  These languages
   can quite easily be supported given the inclusion of their required
   keyboard mappings and some possible minor code change.  Some of the
   current supported languages include - |arabic.txt| and |hebrew.txt|.

Title: Introduction to Right-to-Left (RTL) Display Mode in Vim
Summary
This section introduces the right-to-left display mode for Vim, designed to support languages like Arabic, Farsi, and Hebrew. It explains that Vim offers a functional, albeit simplified, approach to displaying and editing RTL languages without full Bidirectional (Bidi) support. The highlights include the ability to edit RTL files in RTL windows, compatibility with original Vim features, correct backspace behavior in reverse insert mode, no requirement for special RTL terminals, and support for various languages with appropriate keyboard mappings.