1 Star 0 Fork 0

hilarryxu/vimdoc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
usr_42.html 34.51 KB
一键复制 编辑 原始数据 按行查看 历史
hilarryxu 提交于 2017-08-15 10:58 . Init repo
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>usr_42 - 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>
/ usr_42<br />
<a name="top"></a><h1>usr_42 - 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="usr_42.html" name="usr_42.txt">usr_42.txt</a>&nbsp;&nbsp;&nbsp;&nbsp;For&nbsp;<span class="Identifier">Vim version 8.0.</span>&nbsp;&nbsp;Last change: 2008 May 05<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VIM USER MANUAL - by Bram Moolenaar<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add new menus<br>
<br>
<br>
By now you know that Vim is very flexible.&nbsp;&nbsp;This includes the menus used in<br>
the GUI.&nbsp;&nbsp;You can define your own menu entries to make certain commands easily<br>
accessible.&nbsp;&nbsp;This is for mouse-happy users only.<br>
<br>
<a class="Identifier" href="usr_42.html#42.1">42.1</a>&nbsp;&nbsp;Introduction<br>
<a class="Identifier" href="usr_42.html#42.2">42.2</a>&nbsp;&nbsp;Menu commands<br>
<a class="Identifier" href="usr_42.html#42.3">42.3</a>&nbsp;&nbsp;Various<br>
<a class="Identifier" href="usr_42.html#42.4">42.4</a>&nbsp;&nbsp;Toolbar and popup menus<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp; Next chapter:&nbsp;<a class="Identifier" href="usr_43.html">usr_43.txt</a>&nbsp;&nbsp;Using filetypes<br>
&nbsp;Previous chapter:&nbsp;<a class="Identifier" href="usr_41.html">usr_41.txt</a>&nbsp;&nbsp;Write a Vim script<br>
Table of contents:&nbsp;<a class="Identifier" href="usr_toc.html">usr_toc.txt</a><br>
<br>
<span class="PreProc">==============================================================================</span><br>
<a class="Constant" href="usr_42.html#42.1" name="42.1">42.1</a>&nbsp;&nbsp;Introduction<br>
<br>
The menus that Vim uses are defined in the file &quot;$VIMRUNTIME/menu.vim&quot;.&nbsp;&nbsp;If<br>
you want to write your own menus, you might first want to look through that<br>
file.<br>
&nbsp;&nbsp; To define a menu item, use the &quot;:menu&quot; command.&nbsp;&nbsp;The basic form of this<br>
command is as follows:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:menu {menu-item} {keys}</div>
<br>
The&nbsp;<span class="Special">{menu-item}</span>&nbsp;describes where on the menu to put the item.&nbsp;&nbsp;A typical<br>
<span class="Special">{menu-item}</span>&nbsp;is &quot;File.Save&quot;, which represents the item &quot;Save&quot; under the<br>
&quot;File&quot; menu.&nbsp;&nbsp;A dot is used to separate the names.&nbsp;&nbsp;Example:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:menu File.Save&nbsp;&nbsp;:update&lt;CR&gt;</div>
<br>
The &quot;:update&quot; command writes the file when it was modified.<br>
&nbsp;&nbsp; You can add another level: &quot;Edit.Settings.Shiftwidth&quot; defines a submenu<br>
&quot;Settings&quot; under the &quot;Edit&quot; menu, with an item &quot;Shiftwidth&quot;.&nbsp;&nbsp;You could use<br>
even deeper levels.&nbsp;&nbsp;Don't use this too much, you need to move the mouse quite<br>
a bit to use such an item.<br>
&nbsp;&nbsp; The &quot;:menu&quot; command is very similar to the &quot;:map&quot; command: the left side<br>
specifies how the item is triggered and the right hand side defines the<br>
characters that are executed.&nbsp;&nbsp;<span class="Special">{keys}</span>&nbsp;are characters, they are used just like<br>
you would have typed them.&nbsp;&nbsp;Thus in Insert mode, when&nbsp;<span class="Special">{keys}</span>&nbsp;is plain text,<br>
that text is inserted.<br>
<br>
<br>
ACCELERATORS<br>
<br>
The ampersand character (&amp;) is used to indicate an accelerator.&nbsp;&nbsp;For instance,<br>
you can use Alt-F to select &quot;File&quot; and S to select &quot;Save&quot;.&nbsp;&nbsp;(The&nbsp;<a class="Type" href="options.html#'winaltkeys'">'winaltkeys'</a><br>
option may disable this though!).&nbsp;&nbsp;Therefore, the&nbsp;<span class="Special">{menu-item}</span>&nbsp;looks like<br>
&quot;&amp;File.&amp;Save&quot;.&nbsp;&nbsp;The accelerator characters will be underlined in the menu.<br>
&nbsp;&nbsp; You must take care that each key is used only once in each menu.&nbsp;&nbsp;Otherwise<br>
you will not know which of the two will actually be used.&nbsp;&nbsp;Vim doesn't warn<br>
you for this.<br>
<br>
<br>
PRIORITIES<br>
<br>
The actual definition of the File.Save menu item is as follows:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:menu 10.340 &amp;File.&amp;Save&lt;Tab&gt;:w&nbsp;&nbsp;:confirm w&lt;CR&gt;</div>
<br>
The number 10.340 is called the priority number.&nbsp;&nbsp;It is used by the editor to<br>
decide where it places the menu item.&nbsp;&nbsp;The first number (10) indicates the<br>
position on the menu bar.&nbsp;&nbsp;Lower numbered menus are positioned to the left,<br>
higher numbers to the right.<br>
&nbsp;&nbsp; These are the priorities used for the standard menus:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10&nbsp;&nbsp;&nbsp;&nbsp;20&nbsp;&nbsp;&nbsp;&nbsp; 40&nbsp;&nbsp;&nbsp;&nbsp; 50&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;60&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 70&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9999<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+------------------------------------------------------------+<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| File&nbsp;&nbsp;Edit&nbsp;&nbsp;Tools&nbsp;&nbsp;Syntax&nbsp;&nbsp;Buffers&nbsp;&nbsp;Window&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Help |<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+------------------------------------------------------------+<br>
<br>
Notice that the Help menu is given a very high number, to make it appear on<br>
the far right.<br>
&nbsp;&nbsp; The second number (340) determines the location of the item within the<br>
pull-down menu.&nbsp;&nbsp;Lower numbers go on top, higher number on the bottom.&nbsp;&nbsp;These<br>
are the priorities in the File menu:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+-----------------+<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10.310&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|Open...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10.320&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|Split-Open...&nbsp;&nbsp;&nbsp;&nbsp;|<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10.325&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|New&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10.330&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|Close&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10.335&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|---------------- |<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10.340&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|Save&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10.350&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|Save As...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10.400&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|---------------- |<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10.410&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|Split Diff with&nbsp;&nbsp;|<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10.420&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|Split Patched By |<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10.500&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|---------------- |<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10.510&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|Print&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10.600&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|---------------- |<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10.610&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|Save-Exit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10.620&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|Exit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+-----------------+<br>
<br>
Notice that there is room in between the numbers.&nbsp;&nbsp;This is where you can<br>
insert your own items, if you really want to (it's often better to leave the<br>
standard menus alone and add a new menu for your own items).<br>
&nbsp;&nbsp; When you create a submenu, you can add another &quot;.number&quot; to the priority.<br>
Thus each name in&nbsp;<span class="Special">{menu-item}</span>&nbsp;has its priority number.<br>
<br>
<br>
SPECIAL CHARACTERS<br>
<br>
The&nbsp;<span class="Special">{menu-item}</span>&nbsp;in this example is &quot;&amp;File.&amp;Save<span class="Special">&lt;Tab&gt;</span>:w&quot;.&nbsp;&nbsp;This brings up an<br>
important point:&nbsp;<span class="Special">{menu-item}</span>&nbsp;must be one word.&nbsp;&nbsp;If you want to put a dot,<br>
space or tabs in the name, you either use the &lt;&gt; notation (<span class="Special">&lt;Space&gt;</span>&nbsp;and&nbsp;<span class="Special">&lt;Tab&gt;</span>,<br>
for instance) or use the backslash (\) escape.<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:menu 10.305 &amp;File.&amp;Do\ It\.\.\. :exit&lt;CR&gt;</div>
<br>
In this example, the name of the menu item &quot;Do It...&quot; contains a space and the<br>
command is &quot;:exit<span class="Special">&lt;CR&gt;</span>&quot;.<br>
<br>
The&nbsp;<span class="Special">&lt;Tab&gt;</span>&nbsp;character in a menu name is used to separate the part that defines<br>
the menu name from the part that gives a hint to the user.&nbsp;&nbsp;The part after the<br>
<span class="Special">&lt;Tab&gt;</span>&nbsp;is displayed right aligned in the menu.&nbsp;&nbsp;In the File.Save menu the name<br>
used is &quot;&amp;File.&amp;Save<span class="Special">&lt;Tab&gt;</span>:w&quot;.&nbsp;&nbsp;Thus the menu name is &quot;File.Save&quot; and the hint<br>
is &quot;:w&quot;.<br>
<br>
<br>
SEPARATORS<br>
<br>
The separator lines, used to group related menu items together, can be defined<br>
by using a name that starts and ends in a '-'.&nbsp;&nbsp;For example &quot;-sep-&quot;.&nbsp;&nbsp;When<br>
using several separators the names must be different.&nbsp;&nbsp;Otherwise the names<br>
don't matter.<br>
&nbsp;&nbsp; The command from a separator will never be executed, but you have to define<br>
one anyway.&nbsp;&nbsp;A single colon will do.&nbsp;&nbsp;Example:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:amenu 20.510 Edit.-sep3- :</div>
<br>
<span class="PreProc">==============================================================================</span><br>
<a class="Constant" href="usr_42.html#42.2" name="42.2">42.2</a>&nbsp;&nbsp;Menu commands<br>
<br>
You can define menu items that exist for only certain modes.&nbsp;&nbsp;This works just<br>
like the variations on the &quot;:map&quot; command:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:menu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Normal, Visual and Operator-pending mode<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:nmenu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Normal mode<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:vmenu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Visual mode<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:omenu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Operator-pending mode<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:menu!&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Insert and Command-line mode<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:imenu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Insert mode<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:cmenu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Command-line mode<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:amenu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;All modes<br>
<br>
To avoid that the commands of a menu item are being mapped, use the command<br>
&quot;:noremenu&quot;, &quot;:nnoremenu&quot;, &quot;:anoremenu&quot;, etc.<br>
<br>
<br>
USING :AMENU<br>
<br>
The &quot;:amenu&quot; command is a bit different.&nbsp;&nbsp;It assumes that the&nbsp;<span class="Special">{keys}</span>&nbsp;you<br>
give are to be executed in Normal mode.&nbsp;&nbsp;When Vim is in Visual or Insert mode<br>
when the menu is used, Vim first has to go back to Normal mode.&nbsp;&nbsp;&quot;:amenu&quot;<br>
inserts a&nbsp;<span class="Special">CTRL-C</span>&nbsp;or&nbsp;<span class="Special">CTRL-O</span>&nbsp;for you.&nbsp;&nbsp;For example, if you use this command:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:amenu&nbsp;&nbsp;90.100 Mine.Find\ Word&nbsp;&nbsp;*</div>
<br>
Then the resulting menu commands will be:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Normal mode:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Visual mode:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">CTRL-C</span>&nbsp;*<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Operator-pending mode:&nbsp;&nbsp;<span class="Special">CTRL-C</span>&nbsp;*<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Insert mode:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">CTRL-O</span>&nbsp;*<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Command-line mode:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Special">CTRL-C</span>&nbsp;*<br>
<br>
When in Command-line mode the&nbsp;<span class="Special">CTRL-C</span>&nbsp;will abandon the command typed so far.<br>
In Visual and Operator-pending mode&nbsp;<span class="Special">CTRL-C</span>&nbsp;will stop the mode.&nbsp;&nbsp;The&nbsp;<span class="Special">CTRL-O</span>&nbsp;in<br>
Insert mode will execute the command and then return to Insert mode.<br>
&nbsp;&nbsp;&nbsp;<span class="Special">CTRL-O</span>&nbsp;only works for one command.&nbsp;&nbsp;If you need to use two or more<br>
commands, put them in a function and call that function.&nbsp;&nbsp;Example:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:amenu&nbsp;&nbsp;Mine.Next\ File&nbsp;&nbsp;:call &lt;SID&gt;NextFile()&lt;CR&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:function &lt;SID&gt;NextFile()<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;next<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;1/^Code<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:endfunction</div>
<br>
This menu entry goes to the next file in the argument list with &quot;:next&quot;.&nbsp;&nbsp;Then<br>
it searches for the line that starts with &quot;Code&quot;.<br>
&nbsp;&nbsp; The&nbsp;<span class="Special">&lt;SID&gt;</span>&nbsp;before the function name is the script ID.&nbsp;&nbsp;This makes the<br>
function local to the current Vim script file.&nbsp;&nbsp;This avoids problems when a<br>
function with the same name is defined in another script file.&nbsp;&nbsp;See&nbsp;<a class="Identifier" href="map.html#<SID>">&lt;SID&gt;</a>.<br>
<br>
<br>
SILENT MENUS<br>
<br>
The menu executes the&nbsp;<span class="Special">{keys}</span>&nbsp;as if you typed them.&nbsp;&nbsp;For a &quot;:&quot; command this<br>
means you will see the command being echoed on the command line.&nbsp;&nbsp;If it's a<br>
long command, the hit-Enter prompt will appear.&nbsp;&nbsp;That can be very annoying!<br>
&nbsp;&nbsp; To avoid this, make the menu silent.&nbsp;&nbsp;This is done with the&nbsp;<span class="Special">&lt;silent&gt;</span><br>
argument.&nbsp;&nbsp;For example, take the call to NextFile() in the previous example.<br>
When you use this menu, you will see this on the command line:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="PreProc">:call &lt;SNR&gt;34_NextFile()</span><br>
<br>
To avoid this text on the command line, insert &quot;<span class="Special">&lt;silent&gt;</span>&quot; as the first<br>
argument:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:amenu &lt;silent&gt; Mine.Next\ File :call &lt;SID&gt;NextFile()&lt;CR&gt;</div>
<br>
Don't use &quot;<span class="Special">&lt;silent&gt;</span>&quot; too often.&nbsp;&nbsp;It is not needed for short commands.&nbsp;&nbsp;If you<br>
make a menu for someone else, being able the see the executed command will<br>
give him a hint about what he could have typed, instead of using the mouse.<br>
<br>
<br>
LISTING MENUS<br>
<br>
When a menu command is used without a&nbsp;<span class="Special">{keys}</span>&nbsp;part, it lists the already<br>
defined menus.&nbsp;&nbsp;You can specify a&nbsp;<span class="Special">{menu-item}</span>, or part of it, to list specific<br>
menus.&nbsp;&nbsp;Example:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:amenu</div>
<br>
This lists all menus.&nbsp;&nbsp;That's a long list!&nbsp;&nbsp;Better specify the name of a menu<br>
to get a shorter list:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:amenu Edit</div>
<br>
This lists only the &quot;Edit&quot; menu items for all modes.&nbsp;&nbsp;To list only one<br>
specific menu item for Insert mode:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:imenu Edit.Undo</div>
<br>
Take care that you type exactly the right name.&nbsp;&nbsp;Case matters here.&nbsp;&nbsp;But the<br>
'&amp;' for accelerators can be omitted.&nbsp;&nbsp;The&nbsp;<span class="Special">&lt;Tab&gt;</span>&nbsp;and what comes after it can be<br>
left out as well.<br>
<br>
<br>
DELETING MENUS<br>
<br>
To delete a menu, the same command is used as for listing, but with &quot;menu&quot;<br>
changed to &quot;unmenu&quot;.&nbsp;&nbsp;Thus &quot;:menu&quot; becomes, &quot;:unmenu&quot;, &quot;:nmenu&quot; becomes<br>
&quot;:nunmenu&quot;, etc.&nbsp;&nbsp;To delete the &quot;Tools.Make&quot; item for Insert mode:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:iunmenu Tools.Make</div>
<br>
You can delete a whole menu, with all its items, by using the menu name.<br>
Example:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:aunmenu Syntax</div>
<br>
This deletes the Syntax menu and all the items in it.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
<a class="Constant" href="usr_42.html#42.3" name="42.3">42.3</a>&nbsp;&nbsp;Various<br>
<br>
You can change the appearance of the menus with flags in&nbsp;<a class="Type" href="options.html#'guioptions'">'guioptions'</a>.&nbsp;&nbsp;In the<br>
default value they are all included, except &quot;M&quot;.&nbsp;&nbsp;You can remove a flag with a<br>
command like:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:set guioptions-=m</div>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; When removed the menubar is not displayed.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;M&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; When added the default menus are not loaded.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;g&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; When removed the inactive menu items are not made grey<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;but are completely removed.&nbsp;&nbsp;(Does not work on all<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;systems.)<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; When removed the tearoff feature is not enabled.<br>
<br>
The dotted line at the top of a menu is not a separator line.&nbsp;&nbsp;When you select<br>
this item, the menu is &quot;teared-off&quot;: It is displayed in a separate window.<br>
This is called a tearoff menu.&nbsp;&nbsp;This is useful when you use the same menu<br>
often.<br>
<br>
For translating menu items, see&nbsp;<a class="Identifier" href="mlang.html#:menutrans">:menutrans</a>.<br>
<br>
Since the mouse has to be used to select a menu item, it is a good idea to use<br>
the &quot;:browse&quot; command for selecting a file.&nbsp;&nbsp;And &quot;:confirm&quot; to get a dialog<br>
instead of an error message, e.g., when the current buffer contains changes.<br>
These two can be combined:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:amenu File.Open&nbsp;&nbsp;:browse confirm edit&lt;CR&gt;</div>
<br>
The &quot;:browse&quot; makes a file browser appear to select the file to edit.&nbsp;&nbsp;The<br>
&quot;:confirm&quot; will pop up a dialog when the current buffer has changes.&nbsp;&nbsp;You can<br>
then select to save the changes, throw them away or cancel the command.<br>
&nbsp;&nbsp; For more complicated items, the confirm() and inputdialog() functions can<br>
be used.&nbsp;&nbsp;The default menus contain a few examples.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
<a class="Constant" href="usr_42.html#42.4" name="42.4">42.4</a>&nbsp;&nbsp;Toolbar and popup menus<br>
<br>
There are two special menus: ToolBar and PopUp.&nbsp;&nbsp;Items that start with these<br>
names do not appear in the normal menu bar.<br>
<br>
<br>
TOOLBAR<br>
<br>
The toolbar appears only when the &quot;T&quot; flag is included in the&nbsp;<a class="Type" href="options.html#'guioptions'">'guioptions'</a><br>
option.<br>
&nbsp;&nbsp; The toolbar uses icons rather than text to represent the command.&nbsp;&nbsp;For<br>
example, the&nbsp;<span class="Special">{menu-item}</span>&nbsp;named &quot;ToolBar.New&quot; causes the &quot;New&quot; icon to appear<br>
on the toolbar.<br>
&nbsp;&nbsp; The Vim editor has 28 built-in icons.&nbsp;&nbsp;You can find a table here:<br>
<a class="Identifier" href="gui.html#builtin-tools">builtin-tools</a>.&nbsp;&nbsp;Most of them are used in the default toolbar.&nbsp;&nbsp;You can<br>
redefine what these items do (after the default menus are setup).<br>
&nbsp;&nbsp; You can add another bitmap for a toolbar item.&nbsp;&nbsp;Or define a new toolbar<br>
item with a bitmap.&nbsp;&nbsp;For example, define a new toolbar item with:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:tmenu ToolBar.Compile&nbsp;&nbsp;Compile the current file<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:amenu ToolBar.Compile&nbsp;&nbsp;:!cc %:S -o %:r:S&lt;CR&gt;</div>
<br>
Now you need to create the icon.&nbsp;&nbsp;For MS-Windows it must be in bitmap format,<br>
with the name &quot;Compile.bmp&quot;.&nbsp;&nbsp;For Unix XPM format is used, the file name is<br>
&quot;Compile.xpm&quot;.&nbsp;&nbsp;The size must be 18 by 18 pixels.&nbsp;&nbsp;On MS-Windows other sizes<br>
can be used as well, but it will look ugly.<br>
&nbsp;&nbsp; Put the bitmap in the directory &quot;bitmaps&quot; in one of the directories from<br>
<a class="Type" href="options.html#'runtimepath'">'runtimepath'</a>.&nbsp;&nbsp;E.g., for Unix &quot;~/.vim/bitmaps/Compile.xpm&quot;.<br>
<br>
You can define tooltips for the items in the toolbar.&nbsp;&nbsp;A tooltip is a short<br>
text that explains what a toolbar item will do.&nbsp;&nbsp;For example &quot;Open file&quot;.&nbsp;&nbsp;It<br>
appears when the mouse pointer is on the item, without moving for a moment.<br>
This is very useful if the meaning of the picture isn't that obvious.<br>
Example:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:tmenu ToolBar.Make&nbsp;&nbsp;Run make in the current directory</div>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Todo">Note</span>:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pay attention to the case used.&nbsp;&nbsp;&quot;Toolbar&quot; and &quot;toolbar&quot; are different<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from &quot;ToolBar&quot;!<br>
<br>
To remove a tooltip, use the&nbsp;<a class="Identifier" href="gui.html#:tunmenu">:tunmenu</a>&nbsp;command.<br>
<br>
The&nbsp;<a class="Type" href="options.html#'toolbar'">'toolbar'</a>&nbsp;option can be used to display text instead of a bitmap, or both<br>
text and a bitmap.&nbsp;&nbsp;Most people use just the bitmap, since the text takes<br>
quite a bit of space.<br>
<br>
<br>
POPUP MENU<br>
<br>
The popup menu pops up where the mouse pointer is.&nbsp;&nbsp;On MS-Windows you activate<br>
it by clicking the right mouse button.&nbsp;&nbsp;Then you can select an item with the<br>
left mouse button.&nbsp;&nbsp;On Unix the popup menu is used by pressing and holding the<br>
right mouse button.<br>
&nbsp;&nbsp; The popup menu only appears when the&nbsp;<a class="Type" href="options.html#'mousemodel'">'mousemodel'</a>&nbsp;has been set to &quot;popup&quot;<br>
or &quot;popup_setpos&quot;.&nbsp;&nbsp;The difference between the two is that &quot;popup_setpos&quot;<br>
moves the cursor to the mouse pointer position.&nbsp;&nbsp;When clicking inside a<br>
selection, the selection will be used unmodified.&nbsp;&nbsp;When there is a selection<br>
but you click outside of it, the selection is removed.<br>
&nbsp;&nbsp; There is a separate popup menu for each mode.&nbsp;&nbsp;Thus there are never grey<br>
items like in the normal menus.<br>
<br>
What is the meaning of life, the universe and everything?&nbsp;&nbsp;<a class="Constant" href="usr_42.html#42" name="42">42</a><br>
Douglas Adams, the only person who knew what this question really was about is<br>
now dead, unfortunately.&nbsp;&nbsp;So now you might wonder what the meaning of death<br>
is...<br>
<br>
<span class="PreProc">==============================================================================</span><br>
<br>
Next chapter:&nbsp;<a class="Identifier" href="usr_43.html">usr_43.txt</a>&nbsp;&nbsp;Using filetypes<br>
<br>
Copyright: see&nbsp;<a class="Identifier" href="usr_01.html#manual-copyright">manual-copyright</a>&nbsp;&nbsp;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: -->
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hilarryxu/vimdoc.git
git@gitee.com:hilarryxu/vimdoc.git
hilarryxu
vimdoc
vimdoc
master

搜索帮助