With the console version, it may or may not be possible to _display_ Persian
characters, depending on the underlying terminal. For "strange" writing
systems, or for any mixing of several writing systems (such as Arabic
[including Persian], Hebrew, Nagari, Chinese ideograms [for Chinese, Japanese
and/or South Korean], kana [for Japanese], hangeul [for South and North
Korean] and others, as well as any variant of Latin, in any combination), I
recommend using gvim (which frees you from any constraints imposed by a
terminal console, and lets you work identically on any platform) and UTF-8
(which allows, in a single character encoding, all writing systems known to man).
See:
:help farsi.txt
:help arabic.txt
http://vim.wikia.com/wiki/Working_with_Unicode
http://vim.wikia.com/wiki/Setting_the_font_in_the_GUI
http://www.vim.org/scripts/script.php?script_id=789
(Switching to Unicode in an orderly manner)
The only advantage of running in a console would be if it were a "true bidi"
terminal, handling, outside of Vim, the display of mixed left-to-right and
right-to-left character strings on the same line (and the strange cursor moves
that that implies), as well as Arabic "presentation forms" (i.e., the
characters changing shape according to their position in a word); see
:help 'termbidi'
For entering characters not on your keyboard, see:
:help i_CTRL-V_digit
:help digraph.txt
:help mbyte-keymap
If your locale is non-Latin, you may also have a look at
:help 'langmap'
You may also (if the existing keymaps are not to your liking) write your own
keymap, as I did twice for my private use, one for Russian and one for Arabic
(these keymaps of mine probably use too much dead keys for general
consumption, but they are more suited to my "form of memory" and to my Latin
fr_BE keyboard than those available with Vim).
See:
:help keymap-file-format
http://vim.wikia.com/wiki/How_to_make_a_keymap
Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
183. You move your coffeemaker next to your computer.
I have tried the above solution and the following:
http://vim.1045645.n5.nabble.com/arabic-font-td1161759.html
Still can't get Farsi to work. I get those "<200d>" characters.
I have tried gvim with
:set guifont=Courier\ New\ 10
For instance.
Website for example:
http://www.unics.uni-hannover.de/nhtcapri/persian-alphabet.html
It displays nicely on my firefox.
On 27 Nov 2018, at 23:17, Bram Moolenaar <Br...@moolenaar.net> wrote:
On Monday, April 30, 2018 at 9:58:54 AM UTC+2, Bram Moolenaar wrote:Felipe Vieira wrote:I have tried the above solution and the following:
http://vim.1045645.n5.nabble.com/arabic-font-td1161759.html
Still can't get Farsi to work. I get those "<200d>" characters.
I have tried gvim with
:set guifont=Courier\ New\ 10
For instance.
Website for example:
http://www.unics.uni-hannover.de/nhtcapri/persian-alphabet.html
It displays nicely on my firefox.
The Farsi support in Vim is outdated. It doesn't work with Unicode.
We are waiting for someone to re-implement it, or merge it with the
Arabic support.
I also wonder why there is no option to disable farsi or arabic on vim
compile. The terminal I use supports bidi text, so in order to build
the vim correctly for my terminal, I have to change config and
features file in the source to disable farsi and arabic, which is
inconvenient if I want to keep updating the vim.
What do you mean? There are both options and features to enable/disable
Arabic and Farsi. E.g. there is FEAT_ARABIC and the 'arabic' option.
--
--
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 vim_use+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<vim-without-arabic-in-osx-terminal.png><vim-with-arabic-in-osx-terminal.png>
I added the configuration as you mentioned. After that when I typed Persian everything got typed as question marks and still as before every character I typed resulted in more than one character. So I still prefer to have the feature ‘arabic’ and ‘persian’ off. Sorry but thanks!
Maybe I didn't understand you question correctly? I cloned the vim from GitHub and without any changes to the source if I build it using the ‘huge’ feature, it includes +arabic and +farsi. Even if I use homebrew to install it I get those features. According to this vim includes ‘farsi' and ‘arabic' in the ‘huge' features. I don’t explicitly add ‘arabic’ nor ‘farsi’ since I don’t know how it’s done without changing the feature and config file in the src. I hope this answered the question.
VIM - Vi IMproved 8.1 (2018 May 18, compiled Nov 24 2018 19:13:03)macOS versionIncluded patches: 1-500Compiled by HomebrewHuge version without GUI. Features included (+) or not (-):+acl +extra_search +mouse_netterm +tag_old_static+arabic +farsi +mouse_sgr -tag_any_white+autocmd +file_in_path -mouse_sysmouse -tcl+autochdir +find_in_path +mouse_urxvt +termguicolors-autoservername +float +mouse_xterm +terminal-balloon_eval +folding +multi_byte +terminfo+balloon_eval_term -footer +multi_lang +termresponse-browse +fork() -mzscheme +textobjects++builtin_terms +gettext +netbeans_intg +timers+byte_offset -hangul_input +num64 +title+channel +iconv +packages -toolbar+cindent +insert_expand +path_extra +user_commands-clientserver +job +perl +vartabs+clipboard +jumplist +persistent_undo +vertsplit+cmdline_compl +keymap +postscript +virtualedit+cmdline_hist +lambda +printer +visual+cmdline_info +langmap +profile +visualextra+comments +libcall -python +viminfo+conceal +linebreak +python3 +vreplace+cryptv +lispindent +quickfix +wildignore+cscope +listcmds +reltime +wildmenu+cursorbind +localmap +rightleft +windows+cursorshape +lua +ruby +writebackup+dialog_con +menu +scrollbind -X11+diff +mksession +signs -xfontset+digraphs +modify_fname +smartindent -xim-dnd +mouse +startuptime -xpm-ebcdic -mouseshape +statusline -xsmp+emacs_tags +mouse_dec -sun_workshop -xterm_clipboard+eval -mouse_gpm +syntax -xterm_save+ex_extra -mouse_jsbterm +tag_binarysystem 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"fall-back for $VIM: "/usr/local/share/vim"Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1Linking: clang -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -o vim -lncurses -liconv -lintl -framework AppKit -L/usr/local/opt/lua/lib -llua5.3 -mmacosx-version-min=10.13 -fstack-protector-strong -L/usr/local/lib -L/usr/local/Cellar/perl/5.28.0/lib/perl5/5.28.0/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -L/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/config-3.7m-darwin -lpython3.7m -framework CoreFoundation -lruby.2.5.3 -lobjc