Home Explore Blog CI



neovim

2nd chunk of `runtime/doc/rileft.txt`
bbbc5e7937e37eaf8ef4f97f2e244e9b286aed5a705fb2440000000100000db7

------------------------------------------------------------------------------
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|.


------------------------------------------------------------------------------
Of Interest...

o  Invocations

   + 'rightleft' ('rl') sets window orientation to right-to-left.
   + 'delcombine' ('deco'), boolean, if editing UTF-8 encoded languages,
     allows one to remove a composing character which gets superimposed
     on those that preceded them (some languages require this).
   + 'rightleftcmd' ('rlc') sets the command-line within certain modes
     (such as search) to be utilized in right-to-left orientation as well.

o  Typing backwards					*ins-reverse*

   In lieu of using the full-fledged 'rightleft' option, one can opt for
   reverse insertion.  When the 'revins' (reverse insert) option is set,
   inserting happens backwards.  This can be used to type right-to-left
   text.  When inserting characters the cursor is not moved and the text
   moves rightwards.  A <BS> deletes the character under the cursor.
   CTRL-W and CTRL-U also work in the opposite direction.  <BS>, CTRL-W
   and CTRL-U do not stop at the start of insert or end of line, no matter
   how the 'backspace' option is set.

   There is no reverse replace mode (yet).

   If the 'showmode' option is set, "-- REVERSE INSERT --" will be shown
   in the status line when reverse Insert mode is active.

o  Pasting when in a rightleft window

   When cutting text with the mouse and pasting it in a rightleft window
   the text will be reversed, because the characters come from the cut buffer
   from the left to the right, while inserted in the file from the right to
   the left.   In order to avoid it, toggle 'revins' before pasting.


------------------------------------------------------------------------------
Bugs

o  Does not handle CTRL-A and CTRL-X commands (add and subtract) correctly
   when in rightleft window.

o  Does not support reverse insert and rightleft modes on the command-line.
   However, functionality of the editor is not reduced, because it is
   possible to enter mappings, abbreviations and searches typed from the
   left to the right on the command-line.

o  Somewhat slower in right-to-left mode, because right-to-left motion is
   emulated inside Vim, not by the controlling terminal.

o  When both 'rightleft' and 'revins' are on: 'textwidth' does not work.
   Lines do not wrap at all; you just get a single, long line.

o  There is no full bidirectionality (bidi) support.


 vim:tw=78:ts=8:noet:ft=help:norl:

Title: RTL Functionalities, Reverse Insert, and Known Bugs
Summary
This section details the functionality of right-to-left (RTL) mode in Vim, including window orientation ('rightleft'), combining character handling ('delcombine'), and RTL command-line support ('rightleftcmd'). It also covers reverse insertion ('revins') as an alternative to full RTL mode, explaining how it affects text insertion and deletion. Additionally, it provides instructions on how to handle pasting text in RTL windows. Finally, it lists known bugs and limitations of RTL support, such as issues with CTRL-A/CTRL-X commands, command-line support, performance, 'textwidth' incompatibility, and lack of full bidirectionality.