Saturday, December 1, 2018

Re: Typing Persian (Farsi) in Vim

Bram and Tony,

I found the problem! :) In short the solution was to 'set termbidi' in the vimrc file and I had to remove any vim configuration files and folders. Previously my vim was acting so strangely when I built it using brew and was typing Persian and it was inserting question marks. To fix it I deleted the .vim folder and and also the .vimrc file and build the vim from scratch. So I got a fresh vim install, then I started to try the solutions Tony described, because what you said made me realise I was doing something different from you. So the problem I guess was vim not recognising the terminal. Now it's working great just like I expect it when I 'set termbidi' in the vimrc file. I couldn't make it work in the iTerm though which is not a bidi terminal. Sorry for taking you time again. 

Thanks a lot,
Bahman

On 1 Dec 2018, at 11:50, Bram Moolenaar <Bram@moolenaar.net> wrote:


Bahman Eslami wrote:

Sorry for late reply and also taking your time on this,

Tony:
I added the configuration as you mentioned. After that when I typed Persian everything got typed as question marks and still as before every character I typed resulted in more than one character. So I still prefer to have the feature 'arabic' and 'persian' off. Sorry but thanks!

Bram:
Maybe I didn't understand you question correctly? I cloned the vim
from GitHub and without any changes to the source if I build it using
the 'huge' feature, it includes +arabic and +farsi. Even if I use
homebrew to install it I get those features. According to this
<http://www.drchip.org/astronaut/vim/vimfeat.html> vim includes
'farsi' and 'arabic' in the 'huge' features. I don't explicitly add
'arabic' nor 'farsi' since I don't know how it's done without changing
the feature and config file in the src. I hope this answered the
question.

Yes, I understand that your Vim is build with +arabic and +farsi.  That
is fine, I also build with these features.

The question is: When Vim has these features, what is different from a
Vim without these features?  Both Vim binaries should do exactly the
same thing, unless you set options such as 'arabic' and 'fkmap'.  Are
these options set automatically for you perhaps?  Try this:

verbose set arabic? fkmap?

Or just try disabling them:

verbose set noarabic norightleft nofkmap


--
LETTERS TO THE EDITOR (The Times of London)

Dear Sir,

I am firmly opposed to the spread of microchips either to the home or
to the office.  We have more than enough of them foisted upon us in
public places.  They are a disgusting Americanism, and can only result
in the farmers being forced to grow smaller potatoes, which in turn
will cause massive unemployment in the already severely depressed
agricultural industry.

Yours faithfully,
        Capt. Quinton D'Arcy, J. P.
        Sevenoaks

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
\\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

No comments:

Post a Comment