Persian (aka Farsi) Vim

19 views
Skip to first unread message

Hamidreza Jafari

unread,
Oct 20, 2017, 8:42:21 PM10/20/17
to vim_use
Hello,

I can prepare vim to type right-to-left and change keyboard to Persian but there are some glitches with the font. Some letters that are specific to Persian are used in Arabic form. That's why I think it is picking up the Arabic font instead of the Persian. How can I fix that?

I am using GVim in Kubuntu for the moment.

Tony Mechelynck

unread,
Oct 20, 2017, 9:07:40 PM10/20/17
to vim...@googlegroups.com
Try selecting a specific Persian font face, as opposed to an Arabic
one or a generic Unicode font (which will usually display Arabic
styles of letters from the Arabic family of abjads, including Persian,
urdu, etc.).

See
http://vim.wikia.com/wiki/Setting_the_font_in_the_GUI
:help 'guifont'

The arabeyes project, mentioned in the arabic.txt helpfile, may (or
may not) have an abjad style that suits you. Have a look at it, you
know your needs better than I do.

Note that the fixed-width letter requirement of Vim is really
ill-suited to a highly cursive script like the Arabic-family abjads.
As long as each letter is recognizable, I'd regard the rest as icing
on the cake. When you display your text in a GUI which knows about
proportional fonts, for instance when you display your arabic HTML
pages, created with Vim, in a web browser, the result should be much
prettier than in Vim.

Also, Vim (and gvim) can display a window of text either LTR or RTL,
and even a single file LTR in one window and RTL in a different window
but not both in a single window depending on which script is used
where in the text. If you want to mix Persian with some Latin script
in a single text, you may get better results by running Vim in console
mode in an mlterm terminal, where the terminal, and not Vim, takes
care of arranging the text LTR or RTL on the screen: see :help
'termbidi'


Best regards,
Tony.
Reply all
Reply to author
Forward
0 new messages