On Jul 3, 6:02 pm, Tony Mechelynck <[EMAIL PROTECTED]>
wrote:
> On 03/07/08 15:20, Ben Fritz wrote:
>
> > Is there any particular reason that the 'revins' option only works in
> > insert mode, and not replace mode as well?
>
> > I would certainly find the option more useful if it did, but it isn't
> > really a big deal if it remains as-is.
>
> Normally you shouldn't use it anyway, because the usual convention is
> that text appears in the file in "logical" order: the "first" letter of
> every word appears before the "last" one on disk, even in languages like
> Hebrew and Arabic (where the "first" letter is at right) and even when
> mixing LTR and RTL characters in a single text (as in Arabic, where text
> is written RTL but digits, includic Arabic-Indic digits, are written LTR).
>
> See for example my homepagehttp://users.skynet.be/antoine.mechelynck/
> -- look how the HTML is rendered, how your browser displays the source
> if it has a "view source" function, and then download the page and see
> how Vim displays it: normally all Arabic text appears reversed in Vim,
> except if you toggle the 'rightleft' option the Arabic is OK buit the
> non-arabic is end-first (siht ekil).
>
> gvim doesn't do "true" bidi: it will display the whole text of a window
> either LTR (if 'norightleft') or RTL (if 'rightleft') regardless of the
> LTR, RTL or ambiguous nature of each character. You can display a single
> buffer in both directions in different windows, but you should reverse
> the text direction (":set invrightleft" or ":set rightleft!" -- or else
> change windows if you have both directions side-by-side) when going from
> LTR editing (as in most languages) to RTL (as in Hebrew, Arabic, Farsi,
> Urdu, etc.) or vice-versa.
>
I don't "normally" use it. I've just seen it in a clever mapping (from
Dr. Chip I think) to reverse a line, and I just attempted to use it in
the following situation:
I had a comment line that was aligned right within the comment, like
this:
/****************************** Object Definitions */
I wanted to change it to:
/*************************** Function Declarations */
Where the length of the line is preserved.
I thought the fastest way would be to go into replace mode at the end
of the comment and type the words backwards, with 'revins' set.
But 'revins' does not apply in replace mode for some reason.
No big deal, just an unexpected quirk that I figure might be simple to
change. Then again, this would be something that could easily break a
lot of plugins, if they use insert mode, because there would suddenly
be another option they need to check and/or restore.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---