Question

I want to use vim with Farsi and I don't know how to do that.

This link described how to do that but I don't know how to compile vim.

I use Debian 7.0 amd64 and Windows 7 x64

Was it helpful?

Solution

On Debian-based distributions, the vim-gtk (or vim-gnome) package is usually the most featureful and comes with Farsi support by default. You can install it with this command:

$ sudo apt-get update && apt-get install vim-gtk

As for Farsi fonts I suggest you use your distribution's package manager to search for and install the necessary packages. I have no idea if there's a monospaced Farsi font, though, so don't expect too much.

OTHER TIPS

Follow the guide at https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source

in your configure line, use --with-features=big or --with-features=huge, as farsi is included in those feature sets according to this document: http://vimdoc.sourceforge.net/htmldoc/various.html (see :ve[rsion] entry)

EDIT:

The version of vim from the package manager for my distro includes farsi by default. Yours might also.

Add this line to your .vimrc file:

set termbidi

to add bidirectional language support to VIM.

Tested on two different machines, seems to work on VIM version 8.0+ at least.

According to Vim help Farsi support has been removed in patch 8.1.0932. Now after so many years the farsi codes are outdated. Also Farsi feature is unused because vim is supporting right to left with arabic feature that is enabled in most binary releases.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top