On Wednesday, November 28, 2018 at 11:04:29 PM UTC+1, Tony Mechelynck wrote: > On Wed, Nov 28, 2018 at 10:23 PM Bahman Eslami <[email protected]> > wrote: > > In a case a user doesn't want to have arabic nor faris in the vim, they can > > build the vim with the 'normal' feature flag but they would miss other > > features like langmap, but if they want to build it with langmap feature, > > they need the 'huge' feature flag which also includes the arabic. There is > > also no flag to disable nor enable arabic while building the vim. So the > > only way to disable them is to change the source which is how I do it. Now > > I give you an example what goes wrong with the arabic enabled. > > > I use the native terminal app in OSX which supports bidi text perfectly > > even when it comes to selecting text. > > What is the $TERM setting when you run Console Vim (not gvim) in that > terminal? Depending on its value, there are variant ways to tell Vim > that the terminal has full-bidi capabilities: > > * Possibility 1: $TERM is 'mlterm' > o Do nothing. Vim knows that mlterm is a full-bidi terminal. > * Possibility 2: $TERM is another unambiguously recognisable name, > let's say (for the sake of argument) 'system-bidi'. > o Add near the top of yout vimrc the following snippet: > if &term == 'system-bidi' && has('arabic') > set termbidi > endif > * Possibility 3: $TERM is not unambiguously recognizable, let's say it > is 'xterm' which too many fake-xterm terminals use nowadays: > o Start Vim (when running in that terminal) as: > vim --cmd 'silent! set termbidi' > If your shell supports aliases, you can define the following > alias (as I would do it for bash, which is an alias-supporting shell) > alias vim='/usr/local/bin/vim --cmd "silent! set termbidi"' > Replace /usr/local/bin/vim by the path to your Vim executable > if it is something else, of course.
Tony, Thanks for the explanation. When I echo the $TERM in vim I get: xterm-256color. So I used your solution to add 'set termbidi' with the vim build that includes the arabic feature but I still get incorrect Arabic shaping. I also get very abnormal behavior. If I type the following text or even paste it: نوتشن فارسی I get the following result in vim, which even in length does not match the input: ?~F?~Hشت?~F ?~Aارس?~L I guess it didn't do much for my case. Thanks, Bahman -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
