代码拉取完成,页面将自动刷新
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>farsi - Vim Documentation</title>
<meta name="Generator" content="Vim/8.0">
<meta name="plugin-version" content="vim8.0">
<meta name="syntax" content="help">
<meta name="settings" content="no_pre,use_css,expand_tabs">
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="jquery.min.js" type="text/javascript"></script>
<script src="mark-current-page.js" type="text/javascript"></script>
</head>
<body>
<header>
<div class="header">
<a href="http://vim-jp.org/">vim-jp</a>
/ <a href="http://vim-jp.org/vimdoc-en/">vimdoc-en</a>
/ farsi<br />
<a name="top"></a><h1>farsi - Vim Documentation</h1>
<a href="index.html">Return to main</a>
<span class="EnglishJapaneseLink">
<span class="CurrentLanguage">English</span>
</span>
</div>
</header>
<nav>
<dl>
<dt>BASIC</dt>
<dd><ul>
<li><a href="quickref.html">quickref</a></li>
<li><a href="sponsor.html">sponsor</a></li>
</ul></dd>
<dt>USER MANUAL</dt>
<dd><ul>
<li><a href="usr_toc.html">usr_toc</a></li>
</ul></dd>
<dt>Getting Started</dt>
<dd><ul>
<li><a href="usr_01.html">usr_01</a></li>
<li><a href="usr_02.html">usr_02</a></li>
<li><a href="usr_03.html">usr_03</a></li>
<li><a href="usr_04.html">usr_04</a></li>
<li><a href="usr_05.html">usr_05</a></li>
<li><a href="usr_06.html">usr_06</a></li>
<li><a href="usr_07.html">usr_07</a></li>
<li><a href="usr_08.html">usr_08</a></li>
<li><a href="usr_09.html">usr_09</a></li>
<li><a href="usr_10.html">usr_10</a></li>
<li><a href="usr_11.html">usr_11</a></li>
<li><a href="usr_12.html">usr_12</a></li>
</ul></dd>
<dt>Editing Effectively</dt>
<dd><ul>
<li><a href="usr_20.html">usr_20</a></li>
<li><a href="usr_21.html">usr_21</a></li>
<li><a href="usr_22.html">usr_22</a></li>
<li><a href="usr_23.html">usr_23</a></li>
<li><a href="usr_24.html">usr_24</a></li>
<li><a href="usr_25.html">usr_25</a></li>
<li><a href="usr_26.html">usr_26</a></li>
<li><a href="usr_27.html">usr_27</a></li>
<li><a href="usr_28.html">usr_28</a></li>
<li><a href="usr_29.html">usr_29</a></li>
<li><a href="usr_30.html">usr_30</a></li>
<li><a href="usr_31.html">usr_31</a></li>
<li><a href="usr_32.html">usr_32</a></li>
</ul></dd>
<dt>Tuning Vim</dt>
<dd><ul>
<li><a href="usr_40.html">usr_40</a></li>
<li><a href="usr_41.html">usr_41</a></li>
<li><a href="usr_42.html">usr_42</a></li>
<li><a href="usr_43.html">usr_43</a></li>
<li><a href="usr_44.html">usr_44</a></li>
<li><a href="usr_45.html">usr_45</a></li>
</ul></dd>
<dt>Making Vim Run</dt>
<dd><ul>
<li><a href="usr_90.html">usr_90</a></li>
</ul></dd>
<dt>General subjects</dt>
<dd><ul>
<li><a href="intro.html">intro</a></li>
<li><a href="index.html">help</a></li>
<li><a href="helphelp.html">helphelp</a></li>
<li><a href="vimindex.html">index</a></li>
<li><a href="tags.html">tags</a></li>
<li><a href="howto.html">howto</a></li>
<li><a href="tips.html">tips</a></li>
<li><a href="message.html">message</a></li>
<li><a href="quotes.html">quotes</a></li>
<li><a href="todo.html">todo</a></li>
<li><a href="debug.html">debug</a></li>
<li><a href="develop.html">develop</a></li>
<li><a href="uganda.html">uganda</a></li>
</ul></dd>
<dt>Basic editing</dt>
<dd><ul>
<li><a href="starting.html">starting</a></li>
<li><a href="editing.html">editing</a></li>
<li><a href="motion.html">motion</a></li>
<li><a href="scroll.html">scroll</a></li>
<li><a href="insert.html">insert</a></li>
<li><a href="change.html">change</a></li>
<li><a href="indent.html">indent</a></li>
<li><a href="undo.html">undo</a></li>
<li><a href="repeat.html">repeat</a></li>
<li><a href="visual.html">visual</a></li>
<li><a href="various.html">various</a></li>
<li><a href="recover.html">recover</a></li>
</ul></dd>
<dt>Advanced editing</dt>
<dd><ul>
<li><a href="cmdline.html">cmdline</a></li>
<li><a href="options.html">options</a></li>
<li><a href="pattern.html">pattern</a></li>
<li><a href="map.html">map</a></li>
<li><a href="tagsrch.html">tagsrch</a></li>
<li><a href="quickfix.html">quickfix</a></li>
<li><a href="windows.html">windows</a></li>
<li><a href="tabpage.html">tabpage</a></li>
<li><a href="syntax.html">syntax</a></li>
<li><a href="spell.html">spell</a></li>
<li><a href="diff.html">diff</a></li>
<li><a href="autocmd.html">autocmd</a></li>
<li><a href="filetype.html">filetype</a></li>
<li><a href="eval.html">eval</a></li>
<li><a href="channel.html">channel</a></li>
<li><a href="fold.html">fold</a></li>
</ul></dd>
<dt>Special issues</dt>
<dd><ul>
<li><a href="print.html">print</a></li>
<li><a href="remote.html">remote</a></li>
<li><a href="term.html">term</a></li>
<li><a href="digraph.html">digraph</a></li>
<li><a href="mbyte.html">mbyte</a></li>
<li><a href="mlang.html">mlang</a></li>
<li><a href="arabic.html">arabic</a></li>
<li><a href="farsi.html">farsi</a></li>
<li><a href="hebrew.html">hebrew</a></li>
<li><a href="russian.html">russian</a></li>
<li><a href="ft_ada.html">ft_ada</a></li>
<li><a href="ft_sql.html">ft_sql</a></li>
<li><a href="hangulin.html">hangulin</a></li>
<li><a href="rileft.html">rileft</a></li>
</ul></dd>
<dt>GUI</dt>
<dd><ul>
<li><a href="gui.html">gui</a></li>
<li><a href="gui_w32.html">gui_w32</a></li>
<li><a href="gui_x11.html">gui_x11</a></li>
</ul></dd>
<dt>Interfaces</dt>
<dd><ul>
<li><a href="if_cscop.html">if_cscop</a></li>
<li><a href="if_lua.html">if_lua</a></li>
<li><a href="if_mzsch.html">if_mzsch</a></li>
<li><a href="if_perl.html">if_perl</a></li>
<li><a href="if_pyth.html">if_pyth</a></li>
<li><a href="if_tcl.html">if_tcl</a></li>
<li><a href="if_ole.html">if_ole</a></li>
<li><a href="if_ruby.html">if_ruby</a></li>
<li><a href="debugger.html">debugger</a></li>
<li><a href="workshop.html">workshop</a></li>
<li><a href="netbeans.html">netbeans</a></li>
<li><a href="sign.html">sign</a></li>
</ul></dd>
<dt>Versions</dt>
<dd><ul>
<li><a href="vi_diff.html">vi_diff</a></li>
<li><a href="version4.html">version4</a></li>
<li><a href="version5.html">version5</a></li>
<li><a href="version6.html">version6</a></li>
<li><a href="version7.html">version7</a></li>
<li><a href="version8.html">version8</a></li>
</ul></dd>
<dt>Remarks about specific systems</dt>
<dd><ul>
<li><a href="os_390.html">os_390</a></li>
<li><a href="os_amiga.html">os_amiga</a></li>
<li><a href="os_beos.html">os_beos</a></li>
<li><a href="os_dos.html">os_dos</a></li>
<li><a href="os_mac.html">os_mac</a></li>
<li><a href="os_mint.html">os_mint</a></li>
<li><a href="os_msdos.html">os_msdos</a></li>
<li><a href="os_os2.html">os_os2</a></li>
<li><a href="os_qnx.html">os_qnx</a></li>
<li><a href="os_risc.html">os_risc</a></li>
<li><a href="os_unix.html">os_unix</a></li>
<li><a href="os_vms.html">os_vms</a></li>
<li><a href="os_win32.html">os_win32</a></li>
</ul></dd>
<dt>Standard plugins</dt>
<dd><ul>
<li><a href="pi_getscript.html">pi_getscript</a></li>
<li><a href="pi_gzip.html">pi_gzip</a></li>
<li><a href="pi_logipat.html">pi_logipat</a></li>
<li><a href="pi_netrw.html">pi_netrw</a></li>
<li><a href="pi_paren.html">pi_paren</a></li>
<li><a href="pi_tar.html">pi_tar</a></li>
<li><a href="pi_vimball.html">pi_vimball</a></li>
<li><a href="pi_zip.html">pi_zip</a></li>
</ul></dd>
<dt>Filetype plugins</dt>
<dd><ul>
<li><a href="pi_spec.html">pi_spec</a></li>
</ul></dd>
<dt>Others</dt>
<dd><ul>
<li><a href="vim_faq.html">vim_faq</a></li>
</ul></dd>
</dl>
</nav>
<article class="Vimdoc VimdocJa">
<div id='vimCodeElement'>
<a class="Constant" href="farsi.html" name="farsi.txt">farsi.txt</a> For <span class="Identifier">Vim version 8.0.</span> Last change: 2015 Aug 29<br>
<br>
<br>
<span class="Identifier">VIM REFERENCE MANUAL by Mortaza Ghassab Shiran</span><br>
<br>
<br>
Right to Left and Farsi Mapping for Vim <a class="Constant" href="farsi.html#farsi" name="farsi">farsi</a> <a class="Constant" href="farsi.html#Farsi" name="Farsi">Farsi</a><br>
<br>
<span class="Special">{Vi does not have any of these commands}</span><br>
<br>
<a class="Constant" href="farsi.html#E27" name="E27">E27</a><br>
In order to use right-to-left and Farsi mapping support, it is necessary to<br>
compile Vim with the <a class="Identifier" href="various.html#+farsi">+farsi</a> feature.<br>
<br>
These functions have been made by Mortaza G. Shiran <shiran@jps.net><br>
<br>
<br>
Introduction<br>
<span class="PreProc">------------</span><br>
In right-to-left oriented files the characters appear on the screen from right<br>
to left. This kind of file is most useful when writing Farsi documents,<br>
composing faxes or writing Farsi memos.<br>
<br>
The commands, prompts and help files are not in Farsi, therefore the user<br>
interface remains the standard Vi interface.<br>
<br>
<br>
Highlights<br>
<span class="PreProc">----------</span><br>
o Editing left-to-right files as in the original Vim, no change.<br>
<br>
o Viewing and editing files in right-to-left windows. File orientation is<br>
per window, so it is possible to view the same file in right-to-left and<br>
left-to-right modes, simultaneously.<br>
<br>
o Compatibility to the original Vim. Almost all features work in<br>
right-to-left mode (see bugs below).<br>
<br>
o Changing keyboard mapping and reverse insert modes using a single<br>
command.<br>
<br>
o Backing from reverse insert mode to the correct place in the file<br>
(if possible).<br>
<br>
o While in Farsi mode, numbers are entered from left to right. Upon entering<br>
a none number character, that character will be inserted just into the<br>
left of the last number.<br>
<br>
o No special terminal with right-to-left capabilities is required. The<br>
right-to-left changes are completely hardware independent. Only<br>
Farsi font is necessary.<br>
<br>
o Farsi keymapping on the command line in reverse insert mode.<br>
<br>
o Toggling between left-to-right and right-to-left via F8 function key.<br>
<br>
o Toggling between Farsi ISIR-3342 standard encoding and Vim Farsi via F9<br>
function key. Since this makes sense only for the text written in<br>
right-to-left mode, this function is also supported only in right-to-left<br>
mode.<br>
<br>
Farsi Fonts <a class="Constant" href="farsi.html#farsi-fonts" name="farsi-fonts">farsi-fonts</a><br>
<span class="PreProc">-----------</span><br>
<br>
The following files are found in the subdirectories of the '$VIM/farsi/fonts'<br>
directory:<br>
<br>
+ far-a01.pcf X Windows fonts for Unix including Linux systems<br>
+ far-a01.bf X Windows fonts for SunOS<br>
+ far-a01.f16 a screen fonts for Unix including Linux systems<br>
+ far-a01.fon a monospaced fonts for Windows NT/95/98<br>
+ far-a01.com a screen fonts for DOS<br>
<br>
<br>
Font Installation<br>
<span class="PreProc">-----------------</span><br>
<br>
o Installation of fonts for MS Window systems (NT/95/98)<br>
<br>
From 'Control Panel' folder, start the 'Fonts' program. Then from <span class="MissingTag">'file'</span><br>
menu item select 'Install New Fonts ...'. Browse and select the<br>
'far-a01.fon', then follow the installation guide.<br>
<span class="Todo">NOTE</span>: several people have reported that this does not work. The solution<br>
is unknown.<br>
<br>
o Installation of fonts for X Window systems (Unix/Linux)<br>
<br>
Depending on your system, copy far-a01.pcf.Z or far-a01.pcf.gz into a<br>
directory of your choice. Change to the directory containing the Farsi<br>
fonts and execute the following commands:<br>
<br>
> mkfontdir<br>
> xset +fp path_name_of_farsi_fonts_directory<br>
<br>
o Installation of fonts for X Window systems (SunOS)<br>
<br>
Copy far-a01.bf font into a directory of your choice.<br>
Change to the directory containing the far-a01.fb fonts and<br>
execute the following commands:<br>
<br>
> fldfamily<br>
> xset +fp path_name_of_fonts_directory<br>
<br>
o Installation of ASCII screen fonts (Unix/Linux)<br>
<br>
For Linux system, copy the far-a01.f16 fonts into /usr/lib/kbd/consolefonts<br>
directory and execute the setfont program as "setfont far-a01.f16". For<br>
other systems (e.g. SCO Unix), please refer to the fonts installation<br>
section of your system administration manuals.<br>
<br>
o Installation of ASCII screen fonts (DOS)<br>
<br>
After system power on, prior to the first use of Vim, upload the Farsi<br>
fonts by executing the far-a01.com font uploading program.<br>
<br>
<br>
Usage<br>
<span class="PreProc">-----</span><br>
Prior to starting Vim, the environment in which Vim can run in Farsi mode,<br>
must be set. In addition to installation of Farsi fonts, following points<br>
refer to some of the system environments, which you may need to set:<br>
Key code mapping, loading graphic card in ASCII screen mode, setting the IO<br>
driver in 8 bit clean mode ... .<br>
<br>
o Setting the Farsi fonts<br>
<br>
+ For Vim GUI set the <a class="Type" href="options.html#'guifont'">'guifont'</a> to far-a01. This is done by entering<br>
':set guifont=far-a01' in the Vim window.<br>
<br>
You can have <a class="Type" href="options.html#'guifont'">'guifont'</a> set to far-a01 by Vim during the Vim startup<br>
by appending the ':set guifont=far-a01' into your .vimrc file<br>
(in case of NT/95/98 platforms _vimrc).<br>
<br>
Under the X Window environment, you can also start Vim with the<br>
'-fn far-a01' option.<br>
<br>
+ For Vim within a xterm, start a xterm with the Farsi fonts (e.g.<br>
kterm -fn far-a01). Then start Vim inside the kterm.<br>
<br>
+ For Vim under DOS, prior to the first usage of Vim, upload the Farsi<br>
fonts by executing the far-a01.com fonts uploading program.<br>
<br>
o Farsi Keymapping Activation<br>
<br>
To activate the Farsi keymapping, set either <a class="Type" href="options.html#'altkeymap'">'altkeymap'</a> or <a class="Type" href="options.html#'fkmap'">'fkmap'</a>.<br>
This is done by entering ':set akm' or ':set fk' in the Vim window.<br>
You can have <a class="Type" href="options.html#'altkeymap'">'altkeymap'</a> or <a class="Type" href="options.html#'fkmap'">'fkmap'</a> set as default by appending ':set akm'<br>
or ':set fk' in your .vimrc file or _vimrc in case of NT/95/98 platforms.<br>
<br>
To turn off the Farsi keymapping as a default second language keymapping,<br>
reset the <a class="Type" href="options.html#'altkeymap'">'altkeymap'</a> by entering ':set noakm'.<br>
<br>
o right-to-left Farsi Mode<br>
<br>
By default Vim starts in Left-to-right mode. Following are ways to change<br>
the window orientation:<br>
<br>
+ Start Vim with the -F option (e.g. vim -F ...).<br>
<br>
+ Use the F8 function key to toggle between left-to-right and right-to-left.<br>
<br>
+ While in Left-to-right mode, enter 'set rl' in the command line (<a class="Type" href="options.html#'rl'">'rl'</a> is<br>
the abbreviation for rightleft).<br>
<br>
+ Put the 'set rl' line in your '.vimrc' file to start Vim in<br>
right-to-left mode permanently.<br>
<br>
Encoding<br>
<span class="PreProc">--------</span><br>
<br>
The letter encoding used is the Vim extended ISIR-3342 standard with a built<br>
in function to convert between Vim extended ISIR-3342 and ISIR-3342 standard.<br>
<br>
For document portability reasons, the letter encoding is kept the same across<br>
different platforms (i.e. UNIX's, NT/95/98, MS DOS, ...).<br>
<br>
<br>
o Keyboard<br>
<br>
+ <span class="Special">CTRL-_</span> in insert/replace modes toggles between Farsi(akm)/Latin<br>
mode as follows:<br>
<br>
+ <span class="Special">CTRL-_</span> moves the cursor to the end of the typed text in edit mode.<br>
<br>
+ <span class="Special">CTRL-_</span> in command mode only toggles keyboard mapping between Farsi(akm)/<br>
Latin. The Farsi text is then entered in reverse insert mode.<br>
<br>
+ F8 - Toggles between left-to-right and right-to-left.<br>
<br>
+ F9 - Toggles the encoding between ISIR-3342 standard and Vim extended<br>
ISIR-3342 (supported only in right-to-left mode).<br>
<br>
+ Keyboard mapping is based on the Iranian ISIRI-2901 standard.<br>
Following table shows the keyboard mapping while Farsi(akm) mode set:<br>
<br>
-------------------------------------<br>
` 1 2 3 4 5 6 7 8 9 0 - =<br>
? ? ? ? ? ? ? ? ? ? ? ? ?<br>
-------------------------------------<br>
~ ! @ # $ % ^ & * ( ) _ +<br>
~ ? ? ? ? ? ? ? ? ? ? ? ?<br>
-------------------------------------<br>
q w e r t z u i o p [ ]<br>
? ? ? ? ? ? ? ? ? ? ? ?<br>
-------------------------------------<br>
Q W E R T Z U I O P { }<br>
? ? ? ? ? ? ? ? [ ] { }<br>
-------------------------------------<br>
a s d f g h j k l ; ' \<br>
? ? ? ? ? ? ? ? ? ? ? ?<br>
-------------------------------------<br>
A S D F G H J K L : " |<br>
? ?? ? ? ? ? ? ? ? ? ? ?<br>
-------------------------------------<br>
< y x c v b n m , . /<br>
? ? ? ? ? ? ? ? ? ? ?<br>
-------------------------------------<br>
> Y X C V B <span class="Special">N</span> M < > ?<br>
? ? ? ? ? ? ? ? ? ? ?<br>
-------------------------------------<br>
<br>
<span class="Todo">Note</span>:<br>
? stands for Farsi PSP (break without space)<br>
<br>
? stands for Farsi PCN (for HAMZE attribute)<br>
<br>
Restrictions<br>
<span class="PreProc">------------</span><br>
<br>
o In insert/replace mode and fkmap (Farsi mode) set, <span class="Special">CTRL-B</span> is not<br>
supported.<br>
<br>
o If you change the character mapping between Latin/Farsi, the redo buffer<br>
will be reset (emptied). That is, redo is valid and will function (using<br>
'.') only within the mode you are in.<br>
<br>
o While numbers are entered in Farsi mode, the redo buffer will be reset<br>
(emptied). That is, you cannot redo the last changes (using '.') after<br>
entering numbers.<br>
<br>
o While in left-to-right mode and Farsi mode set, <span class="Special">CTRL-R</span> is not supported.<br>
<br>
o While in right-to-left mode, the search on 'Latin' pattern does not work,<br>
except if you enter the Latin search pattern in reverse.<br>
<br>
o In command mode there is no support for entering numbers from left<br>
to right and also for the sake of flexibility the keymapping logic is<br>
restricted.<br>
<br>
o Under the X Window environment, if you want to run Vim within a xterm<br>
terminal emulator and Farsi mode set, you need to have an ANSI compatible<br>
xterm terminal emulator. This is because the letter codes above 128 decimal<br>
have certain meanings in the standard xterm terminal emulator.<br>
<br>
<span class="Todo">Note</span>: Under X Window environment, Vim GUI works fine in Farsi mode.<br>
This eliminates the need of any xterm terminal emulator.<br>
<br>
<br>
Bugs<br>
----<br>
While in insert/replace and Farsi mode set, if you repeatedly change the<br>
cursor position (via cursor movement) and enter new text and then try to undo<br>
the last change, the undo will lag one change behind. But as you continue to<br>
undo, you will reach the original line of text. You can also use U to undo all<br>
changes made in the current line.<br>
<br>
For more information about the bugs refer to rileft.txt.<br>
<br>
vim:tw=78:ts=8:ft=help:norl:<br>
</div>
</article>
<footer>
<a href="#top">Return to the top</a> - <a href="index.html">Return to main</a>
<span class="EnglishJapaneseLink">
<span class="CurrentLanguage">English</span>
</span>
<br />
<div style="text-align:right;">
Hosted by <a href="https://github.com/vim-jp/vimdoc-en">vimdoc-en project</a><br />
If you met any problem, please report it to <a href="https://github.com/vim-jp/vimdoc-en/issues">issue</a>.<br />
</div>
</footer>
<!--<script src="js/check-referrer.js" type="text/javascript"></script>-->
</body>
</html>
<!-- vim:set ts=8 sts=2 sw=2 tw=0 et: -->
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。