开发者

how i can write arabic html file by vim

I can not write a html file in Arabic by vim.

Tried to do the following:

:set arabic
:set rl

or

:set rightleft

or

:set arabicshape

The problem I want to write Arabic without any change on my tags. I want her to开发者_StackOverflow社区 go from left to right.

How i can do thos?


Vim can be invoked in Arabic mode activated by the following command:

vim -A test1

this will start with the cursor located in the right and ready for Arabic text:

السلام عليكم

-- INSERT Arabic --

source: http://blog.naoar.com/2012/04/vim-and-arabic.html


As vim is not BiDi enabled this should not be possible.

But I've been fiddling around a bit and it seems that vim + Konsole (KDE's terminal emulator) seems to do the job if you enable bidirectional support for Konsole. In vim (NO arabic options enabled) you should be able to write LTR and RTL, but letters will always be in isolated form (no shaping). I've found that setting the 'arabicshape' option then unsetting it seems to fix that. Short vowels are not displayed correctly, even though they seem to be written just fine to the file.

I have not tried with other terminal emulators, I'm not aware of their BiDi capabilities. Gnome-terminal maybe ?


because I can't comment on G.J I post it as an answer

using vim in konsole and putting set arabicshape! in my .vimrc solved the problem for me


as Arabic moves rtl, not ltr, your requirements are contradictory, which is no doubt why it doesn't work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜