view runtime/doc/rileft.txt @ 32721:94f4a488412e v9.0.1683

Updated runtime files Commit: https://github.com/vim/vim/commit/6efb1980336ff324e9c57a4e282530b952fca816 Author: Christian Brabandt <cb@256bit.org> Date: Thu Aug 10 05:44:25 2023 +0200 Updated runtime files This is a collection of various PRs from github that all require a minor patch number: 1) https://github.com/vim/vim/pull/12612 Do not conflate dictionary key with end of block 2) https://github.com/vim/vim/pull/12729: When saving and restoring 'undolevels', the constructs `&undolevels` and `:set undolevels` are problematic. The construct `&undolevels` reads an unpredictable value; it will be the local option value (if one has been set), or the global option value (otherwise), making it unsuitable for saving a value for later restoration. Similarly, if a local option value has been set for 'undolevels', temporarily modifying the option via `:set undolevels` changes the local value as well as the global value, requiring extra work to restore both values. Saving and restoring the option value in one step via the construct `:let &undolevels = &undolevels` appears to make no changes to the 'undolevels' option, but if a local option has been set to a different value than the global option, it has the unintended effect of changing the global 'undolevels' value to the local value. Update the documentation to explain these issues and recommend explicit use of global and local option values when saving and restoring. Update some unit tests to use `g:undolevels`. 3) https://github.com/vim/vim/pull/12702: Problem: Pip requirements files are not recognized. Solution: Add a pattern to match pip requirements files. 4) https://github.com/vim/vim/pull/12688: Add indent file and tests for ABB Rapid 5) https://github.com/vim/vim/pull/12668: Use Lua 5.1 numeric escapes in tests and add to CI Only Lua 5.2+ and LuaJIT understand hexadecimal escapes in strings. Lua 5.1 only supports decimal escapes: > A character in a string can also be specified by its numerical value > using the escape sequence \ddd, where ddd is a sequence of up to three > decimal digits. (Note that if a numerical escape is to be followed by a > digit, it must be expressed using exactly three digits.) Strings in Lua > can contain any 8-bit value, including embedded zeros, which can be > specified as '\0'. To make sure this works with Lua 5.4 and Lua 5.1 change the Vim CI to run with Lua 5.1 as well as Lua 5.4 6) https://github.com/vim/vim/pull/12631: Add hurl filetype detection 7) https://github.com/vim/vim/pull/12573: Problem: Files for haskell persistent library are not recognized Solution: Add pattern persistentmodels for haskell persistent library closes: #12612 closes: #12729 closes: #12702 closes: #12688 closes: #12668 closes: #12631 closes: #12573 Co-authored-by: lacygoill <lacygoill@lacygoill.me> Co-authored-by: Michael Henry <drmikehenry@drmikehenry.com> Co-authored-by: ObserverOfTime <chronobserver@disroot.org> Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de> Co-authored-by: James McCoy <jamessan@jamessan.com> Co-authored-by: Jacob Pfeifer <jacob@pfeifer.dev> Co-authored-by: Borys Lykah <lykahb@fastmail.com>
author Christian Brabandt <cb@256bit.org>
date Thu, 10 Aug 2023 06:30:06 +0200
parents 3295247d97a5
children 4635e43f2c6f
line wrap: on
line source

*rileft.txt*    For Vim version 9.0.  Last change: 2022 Oct 12


		  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

								*E26*
{only available when compiled with the |+rightleft| feature}


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

As many people working on the code do not use the right-to-left mode, this
feature may not work in some situations.  If you can describe what is wrong
and how it would work when fixed, please create an issue on github, see
|bug-reports|.


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|, |farsi.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: