[vim/vim] support rtl languages (Issue #9761)

117 views
Skip to first unread message

Motahhar.Mokfi

unread,
Feb 13, 2022, 2:02:53 AM2/13/22
to vim/vim, Subscribed

Describe the solution you'd like
hi everyone.
Right-to-left languages ​​are not properly supported by Vim
But Iranians, Arabs, etc. need to write Persian or Arabic.
like this:
prob
We would like the output to look like this:

hello

سلام

سلام العلیکم

ایران، عربستان، افغانستان، ترکمنستان

Describe alternatives you've considered
i not have spcial idea but i think UTF-8 support rtl languages.

Additional context
vim now:
prob
we like to be:
prob


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9761@github.com>

Dominique Pellé

unread,
Feb 13, 2022, 4:26:15 AM2/13/22
to vim/vim, Subscribed

I do not speak Arabic. But try :set arabic
Consider also reading :help arabic
Does it solve your problem?
Consider also indicating your version of vim (output of :version) when reporting issues.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9761/1037957730@github.com>

Motahhar.Mokfi

unread,
Feb 13, 2022, 8:43:26 AM2/13/22
to vim/vim, Subscribed

thanks @dpelle
but it is reverse:
prob
i need to be like this:
چو ایران نباشد تن من مباد بدین بوم و بر زنده یک تن مباد


Reply to this email directly, view it on GitHub, or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9761/1038126933@github.com>

Christian Brabandt

unread,
Feb 13, 2022, 8:58:42 AM2/13/22
to vim/vim, Subscribed

Then set :set norightleft. Please read :h arabic.txt for what is currently possible. Also please note, this quite heavily depends on whether you use a gui or use a terminal. For the terminal version, this requires a terminal that supports it correctly.

However, better arabic mode is quite complicated, as none of the developers know enough about the rules how to combine characters and therefore cannot really try it out. Also better bidi and right-left support has long been in the todo list. But for the reasons mentioned before, a patch from someone who knows and uses this natively is probably the best to hope.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9761/1038136658@github.com>

Motahhar.Mokfi

unread,
Feb 15, 2022, 12:46:47 AM2/15/22
to vim/vim, Subscribed

hi @chrisbra
thanks,
this is work only for arabic and my keyboard must be arabic.

but i and iranian developers need to write persion or farsi.


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9761/1039882753@github.com>

Bram Moolenaar

unread,
Feb 15, 2022, 9:00:46 AM2/15/22
to vim/vim, Subscribed


> this is work only for arabic and my keyboard must be arabic.
>
> but i and iranian developers need to write persion or farsi.

I'm afraid Persian/Farsi support was removed in patch 8.1.0932.
At that time it probably wasn't actually working, since nobody was
maintaining it.

It would be great to have better RTL support and also specific Farsi and
Arabic support. This requires someone who knows the mechanisms
involved and can implement changes in Vim.

--
hundred-and-one symptoms of being an internet addict:
40. You tell the cab driver you live at
http://123.elm.street/house/bluetrim.html
41. You actually try that 123.elm.street address.

/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9761/1040308189@github.com>

Motahhar.Mokfi

unread,
Feb 16, 2022, 12:34:00 AM2/16/22
to vim/vim, Subscribed

thanks @brammool .

if i can help you.
i'll definitely help you so that we can do this.

persion/farsi is my first language But in some projects, Persian language does not work properly


Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9761/1041125849@github.com>

Konfekt

unread,
Dec 1, 2022, 7:33:53 AM12/1/22
to vim/vim, Subscribed

Out of curiosity: What did Farsi support achieve in addition to

    setlocal arabic
    setlocal keymap=persian

@motahharm : Vim can write from right to left if the terminal (such as urxvt) supports it and enabling &termbidi.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9761/1333700710@github.com>

Konfekt

unread,
Dec 1, 2022, 10:25:19 AM12/1/22
to vim/vim, Subscribed

For what it's worth, attached a phonetic persian vim keymap similar to that on Mac.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9761/1333934544@github.com>

Konfekt

unread,
Dec 2, 2022, 2:42:13 PM12/2/22
to vim/vim, Subscribed

To partially answer my above question, seemingly &arabicshape, the morphing of joint characters depending on their position in a word, misses some Persian ligatures such as ە and ا becoming ها


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9761/1335737099@github.com>

AliKaram98

unread,
Nov 10, 2023, 11:40:42 PM11/10/23
to vim/vim, Subscribed

Hi test blow command:

set termbidi


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9761/1806676576@github.com>

mehrdad

unread,
Dec 3, 2023, 10:01:53 AM12/3/23
to vim/vim, Subscribed

Hi test blow command:

set termbidi

thanks, @alikaramniya set termbidi worked for me and now I can write my Documents in Persian with my favorite text editor 😃
image.png (view on web)


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9761/1837509015@github.com>

avidseeker

unread,
Feb 17, 2024, 6:37:42 PM2/17/24
to vim/vim, Subscribed

For some reason, :set rl seems to re-shape letters assuming the terminal doesn't support letter shaping. While this might be the case in older terminals, most terminals currently do support letter shaping.

Here's a screenshot comparing Konsole (with shaping support) vs Alacritty (which doesn't support):
image.png (view on web)


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9761/1950553960@github.com>

avidseeker

unread,
Feb 29, 2024, 4:04:06 AM2/29/24
to vim/vim, Subscribed

This seems a duplicate of #204


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9761/1970698234@github.com>

Christian Brabandt

unread,
Feb 29, 2024, 4:33:03 AM2/29/24
to vim/vim, Subscribed

Closed #9761 as not planned.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/9761/issue_event/11963200519@github.com>

Christian Brabandt

unread,
Feb 29, 2024, 4:56:43 AM2/29/24
to vim/vim, Subscribed

so closing then as duplicate


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9761/1970745355@github.com>

avidseeker

unread,
Feb 29, 2024, 1:56:30 PM2/29/24
to vim/vim, Subscribed

thanks @dpelle but it is reverse: prob i need to be like this: چو ایران نباشد تن من مباد بدین بوم و بر زنده یک تن مباد

Try disabling shaping: :set arabicshape!

This will fix rendering. This is caused by the conflict of terminal and vim both trying to apply letter shaping.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9761/1971768519@github.com>

Masoud Heydari

unread,
Jul 30, 2025, 3:59:46 AM7/30/25
to vim/vim, Subscribed
MasoudHeydari left a comment (vim/vim#9761)

Hi test blow command:

set termbidi

Tnx, you saved my time.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9761/3135245851@github.com>

Reply all
Reply to author
Forward
0 new messages