I get this on my vim:

enter image description here

but the arabic translation is showing all messed up (in reverse orderlike dessem pu)

it should instead show like this (this is rendered in source tree:) enter image description here

How to I make this work? (note: I'm using the terminal version of mac:

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 14 2017 18:28:18)
MacOS X (unix) version
Included patches: 1-1100
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl             +file_in_path    +mouse_sgr       +tag_old_static
+arabic          +find_in_path    -mouse_sysmouse  -tag_any_white
+autocmd         +float           +mouse_urxvt     -tcl
-balloon_eval    +folding         +mouse_xterm     +termguicolors
-browse          -footer          +multi_byte      +terminal
++builtin_terms  +fork()          +multi_lang      +terminfo
+byte_offset     -gettext         -mzscheme        +termresponse
+channel         -hangul_input    +netbeans_intg   +textobjects
+cindent         +iconv           +num64           +timers
-clientserver    +insert_expand   +packages        +title
+clipboard       +job             +path_extra      -toolbar
+cmdline_compl   +jumplist        +perl            +user_commands
+cmdline_hist    +keymap          +persistent_undo +vertsplit
+cmdline_info    +lambda          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      +startuptime     -xpm
+eval            +mouse_dec       +statusline      -xsmp
+ex_extra        -mouse_gpm       -sun_workshop    -xterm_clipboard
+extra_search    -mouse_jsbterm   +syntax          -xterm_save
+farsi           +mouse_netterm   +tag_binary
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"


arabic support is even worse on mlterm enter image description here

  • I don't know for sure, but I suspect your mlterm setup isn't working correctly. How did you compile/configure it? What does it look like if you cat the file outside of Vim?
    – Rich
    Feb 6, 2018 at 9:35
  • 1
    The way I do it is to set a mapping to switch between rtl and nortl. Whenever you want to read or edit the Arabic-script part you just flip the whole text to rtl, including the Latin-script parts. I actually think this is better than a bidi solution since delimitiers and punctuation always maintain their logical order.
    – Andreas
    Feb 13, 2018 at 10:32
  • i simply fixed my problem by doing these maps: map <C-g> :set rightleft<CR> map <C-h> :set norightleft<CR>
    – abbood
    Apr 11, 2018 at 9:52
  • @Rich i got it from this link: mlterm.sourceforge.net/bin.html
    – abbood
    Apr 11, 2018 at 9:54
  • @abbood What does it look like if you cat the file in mlterm instead of opening it in Vim?
    – Rich
    Apr 11, 2018 at 10:06

1 Answer 1


Vim only supports displaying files containing mixed RTL and LTF text in a terminal which also supports this (such as mlterm). (You're not using GUI Vim, but I'll note for future readers that it is also not supported there.)

If your terminal does support this, you will also need to ensure that the 'termbidi' option is set. This is set by default when Vim is running under mlterm, and unset otherwise.

See :help 'termbidi' and :help arabic.txt for more details.

  • see update to question
    – abbood
    Feb 6, 2018 at 8:07
  • @abbood See my questions about your update.
    – Rich
    Apr 7, 2018 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.