On 03/07/09 21:05, J.A.J. Pater wrote:
> Bram Moolenaar wrote:
>  > The display is not the only part.  Suppose you move your cursor to the
>  > start of a word and type "dw".  You expect the word to be deleted.
>  > Since "start of the word" depends on what direction the word is to be
>  > read, the editor needs to understand the meaning of the word to be able
>  > to decide what to do.  And it gets worse: What if some of the characters
>  > in the word are LTR and some are RTL?  This quickly gets very
>  > complicated.
>  >
>  > So Vim uses a simple and reliable method: Display the text either as LTR
>  > or RTL and do the editing assuming all text is to be read that way.
>
> These are good reason for gvim to work the way its works!
> So this editing 'mode' should be default.
>
> But it still would be nice if there would be an optional 'real-bidi mode'.
>
>  > It would be really messy to display the text with mixed directions and
>  > then have all edits work one way or perhaps fail with an error.
>
> Using the ViGedit plugin for gedit I'm also able to do some real-bidi
> typing. :-)
> Works almost the same as "mlterm+vim+set termbidi"
> With an exception: in command mode the h always goes left, the l always
> goes right, just as I want it.
> (It just feels weird pressing h and cursor goes right).

Hm, I think it's one of those things one could get used to in time, no 
harder than deleting with d rather than Ctrl-X, pasting with P rather 
than Ctrl-V, and copying with y rather than Ctrl-C. I know there is 
mswin.vim for the latter three, but IMO it is the result of a misguided 
attempt to make Vim more like Notepad. Indeed, in true-bidi terminals 
with 'termbidi' on (which should be the Vim default for mlterm) Vim has 
no knowledge of character direction, so lllll goes uniformly 
first-to-last, and hhhhh last-to-first, even if the movement is a little 
jerky when meeting a direction change within a line of text. (Or did I 
misunderstand? AFAICT I haven't got mlterm installed)

> Indeed as far as I'm concerned a command like "dw" in RTL mode should
> delete from R to L.
>
> Since gedit seems to be real-bidi I guess GTK+ has the algorithm
> mentioned by Ali sort of implemented.
> Guess this could be used in gvim.

My notion would be that a true-bidi gvim should work exactly like 
vim+mlterm with 'termbidi'.

>
> Indeed it will be quite hard to figure out how vim commands should work.
> So maybe a 'real-bidi mode' could use only a subset of vim commands?
>
> Well just my 2 cents.
>
> Adriaan


Best regards,
Tony.
-- 
Meskimen's Law:
        There's never time to do it right, but there's always time to
do it over.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to