Skip to content

Commit e4a2ec6

Browse files
committed
tabpanel
1 parent ac41cf7 commit e4a2ec6

5 files changed

Lines changed: 35 additions & 171 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ Created by yyq123@gmail.com using [vim](http://www.vim.org/)
7474
- [参数(Arguments)](http://yyq123.blogspot.com/2009/08/vim-arguments.html)[<sup>B</sup>](http://yyq123.blogspot.com/2009/08/vim-arguments.html)<sup>/</sup>[<sup>Z</sup>](https://zhuanlan.zhihu.com/p/39957182)
7575
- [缓冲区 (Buffer)](http://yyq123.blogspot.com/2009/07/vim-buffer.html)[<sup>B</sup>](http://yyq123.blogspot.com/2009/07/vim-buffer.html)<sup>/</sup>[<sup>Z</sup>](https://zhuanlan.zhihu.com/p/60260968)
7676
- [窗口(Window)](http://yyq123.blogspot.com/2009/08/vim-window.html)[<sup>B</sup>](http://yyq123.blogspot.com/2009/08/vim-window.html)<sup>/</sup>[<sup>Z</sup>](https://zhuanlan.zhihu.com/p/60260968)
77-
- [标签页(Tab)](http://yyq123.blogspot.com/2009/04/vim.html)[<sup>B</sup>](http://yyq123.blogspot.com/2009/04/vim.html)<sup>/</sup>[<sup>Z</sup>](http://zhuanlan.zhihu.com/p/25946307)
77+
- [标签页(Tab)](http://yyq123.github.io/learn-vim/learn-vi-15-Tabs.html)[<sup>B</sup>](http://yyq123.blogspot.com/2009/04/vim.html)<sup>/</sup>[<sup>Z</sup>](http://zhuanlan.zhihu.com/p/25946307)
78+
- [标签页面板(Tabpanel)](http://yyq123.github.io/learn-vim/learn-vim-tabpanel.html)[<sup>B</sup>](http://yyq123.blogspot.com/2009/04/vim.html)<sup>/</sup>[<sup>Z</sup>](http://zhuanlan.zhihu.com/p/25946307)
7879
- [编辑多个文件(Multiple Files)](http://yyq123.blogspot.com/2009/08/vim-edit-multi-files.html)[<sup>B</sup>](http://yyq123.blogspot.com/2009/08/vim-edit-multi-files.html)<sup>/</sup>[<sup>Z</sup>](http://zhuanlan.zhihu.com/p/40357599)
7980
- [比较文件(diff)](http://yyq123.github.io/learn-vim/learn-vi-191-diff.html)[<sup>B</sup>](http://yyq123.blogspot.com/2010/09/vim-diff.html)<sup>/</sup>[<sup>Z</sup>](https://zhuanlan.zhihu.com/p/63153559)
8081
- [比较文件-消除差异(diffget & diffput )](http://yyq123.github.io/learn-vim/learn-vi-192-diffgp.html)[<sup>B</sup>](https://yyq123.blogspot.com/2019/06/vim-diffget-diffput.html)<sup>/</sup>[<sup>Z</sup>](https://zhuanlan.zhihu.com/p/68505609)

images/tabpanel.png

10.2 KB
Loading

learn-vi-00-00-TOC.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ <h1>VIM学习笔记</h1>
242242
<li><a href="http://yyq123.github.io/learn-vim/learn-vi-13-MultiBuffers.html" title="Buffer">缓冲区 (Buffer)</a></li>
243243
<li><a href="http://yyq123.github.io/learn-vim/learn-vi-14-MultiWindows.html" title="Window">窗口(Window)</a></li>
244244
<li><a href="http://yyq123.github.io/learn-vim/learn-vi-15-Tabs.html" title="Tabs">标签页(Tab)</a></li>
245+
<li><a href="http://yyq123.github.io/learn-vim/learn-vim-tabpanel.html" title="Tabpanel">标签页面板(Tabpanel)</a></li>
245246
<li><a href="http://yyq123.github.io/learn-vim/learn-vi-17-MultiFile.html" title="MultiFiles">编辑多个文件(Files)</a></li>
246247
<li><a href="http://yyq123.github.io/learn-vim/learn-vi-191-diff.html" title="diff">比较文件(diff)</a></li>
247248
<li><a href="http://yyq123.github.io/learn-vim/learn-vi-192-diffgp.html" title="diffget &amp; diffput">比较文件-消除差异(diffget &amp; diffput)</a></li>

learn-vi-95-BuiltinFunctions.html

Lines changed: 21 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,26 @@ <h1>VIM学习笔记 内建函数 (Builtin Functions)</h1>
6161
<tr><td><code class="inset">maparg({<a style="text-decoration:none" href="#" title="映射名">name</a>},[<a style="text-decoration:none" href="#" title="映射的模式">mode</a>])</code><br />&target; 返回指定映射的内容。只查找名字和{name}完全一致的映射。<br />&LeftTeeArrow; 返回映射结果字符串,如果没有映射则返回空串</td></tr>
6262
<tr><td><code class="inset">mapcheck({<a style="text-decoration:none" href="#" title="映射名">name</a>},[<a style="text-decoration:none" href="#" title="映射的模式">mode</a>])</code><br />&target; 检测指定映射是否存在。 查找名字和{name}部分匹配的映射。<br />&LeftTeeArrow; 返回匹配{name}的任何映射</td></tr>
6363
<tr><td><code class="inset">match({<a style="text-decoration:none" href="#" title="要检测的字符串">string</a>},{<a style="text-decoration:none" href="#" title="匹配模式">pattern</a>})</code><br />&target; 检测{string}是否与{pattern}相匹配<br />&LeftTeeArrow; 返回{string}中{pattern}出现的第一个字符索引。第一个字符为0。如果没有匹配则返回-1。</td></tr>
64-
<tr><td><code class="inset"></code><br />&target; <br />&LeftTeeArrow; </td></tr>
65-
<tr><td><code class="inset"></code><br />&target; <br />&LeftTeeArrow; </td></tr>
64+
<tr><td><code class="inset">matchend({<a style="text-decoration:none" href="#" title="要检测的字符串">string</a>},{<a style="text-decoration:none" href="#" title="匹配模式">pattern</a>})</code><br />&target; 和match()相同,但返回匹配之后的第一个字符的位置<br />&LeftTeeArrow; </td></tr>
65+
<tr><td><code class="inset">matchstr({<a style="text-decoration:none" href="#" title="要检测的字符串">string</a>},{<a style="text-decoration:none" href="#" title="匹配模式">pattern</a>})</code><br />&target; 和 match() 相同,但返回匹配的字符串<br />&LeftTeeArrow; 返回{string}中匹配的部分字符串。如果没有匹配,则返回空串。</td></tr>
66+
<tr><td><code class="inset">nr2char({<a style="text-decoration:none" href="#" title="字符的ASCII码值">number</a>})</code><br />&target; 将数值转换成字符<br />&LeftTeeArrow; 返回单个字符组成的字符串</td></tr>
67+
<tr><td><code class="inset">rename({<a style="text-decoration:none" href="#" title="已存在的文件名">from</a>},{<a style="text-decoration:none" href="#" title="目标文件名">to</a>})</code><br />&target; 重命名文件<br />&LeftTeeArrow; 如果成功返回0,否则返回非0</td></tr>
68+
<tr><td><code class="inset">setline({<a style="text-decoration:none" href="#" title="要改变的行号">lnum</a>},{<a style="text-decoration:none" href="#" title="指定的文本">text</a>})</code><br />&target; 设置当前缓冲区第{lnum}行的内容为{text}<br />&LeftTeeArrow; 如果成功,返回FALSE。如果失败返回TRUE。</td></tr>
69+
<tr><td><code class="inset">strftime({<a style="text-decoration:none" href="#" title="时间格式">format</a>},[<a style="text-decoration:none" href="#" title="指定的时间">time</a>])</code><br />&target; 返回经过{format}字符串的格式转换的日期和时间<br />&LeftTeeArrow; 返回字符串</td></tr>
70+
<tr><td><code class="inset">strlen({<a style="text-decoration:none" href="#" title="需要计算长度的字符串">string</a>})</code><br />&target; 计算字符串的长度<br />&LeftTeeArrow; 返回字符串长度的数值</td></tr>
71+
<tr><td><code class="inset">strpart({<a style="text-decoration:none" href="#" title="字符串">string</a>},{<a style="text-decoration:none" href="#" title="开始位置">start</a>},{<a style="text-decoration:none" href="#" title="长度">length</a>})</code><br />&target; 返回由{start}开始的长度为{length}的子串<br />&LeftTeeArrow; 返回子串,出错时返回空串。</td></tr>
72+
<tr><td><code class="inset">strtrans({<a style="text-decoration:none" href="#" title="字符串">string</a>})</code><br />&target; 将字符串中不可显示的字符转换成可以打印的字符<br />&LeftTeeArrow; 返回字符串</td></tr>
73+
<tr><td><code class="inset">substitute({<a style="text-decoration:none" href="#" title="需要替换的字符串">string</a>},{<a style="text-decoration:none" href="#" title="替换模式">pattern</a>},{<a style="text-decoration:none" href="#" title="替换成为的文本">replace</a>},{<a style="text-decoration:none" href="#" title="如果没有指定,将只替换第一个出现的匹配处;&#10;如果为g,将会替换全部">flag</a>})</code><br />&target; 替换字符串<br />&LeftTeeArrow; 返回替换后的字符串</td></tr>
74+
<tr><td><code class="inset">synID({<a style="text-decoration:none" href="#" title="">line</a>},{<a style="text-decoration:none" href="#" title="">column</a>},{<a style="text-decoration:none" href="#" title="如果为TRUE ,透明的项目被简约为它们实际显露的项目。这可以用于你想知道实际使用的颜色的情形。&#10;如果为FALSE ,返回透明的项目本身。这可用于想知道实际有效的语法项目的情形 (比如,在括号内部)。">trans</a>})</code><br />&target; 返回由{line}和{column}所指定的语法ID<br />&LeftTeeArrow; 返回语法ID</td></tr>
75+
<tr><td><code class="inset">synIDattr({<a style="text-decoration:none" href="#" title="语法描述的标号">sytnax_id</a>},{<a style="text-decoration:none" href="#" title="标记名:&#10;name,语法内容名&#10;fg,前景色&#10;bg,后景色&#10;fg#,以#RRGGBB格式的前景色&#10;bg#,以#RRGGBB格式的后景色&#10;bold,如果内容为粗体则为1&#10;italic,如果内容为斜体则为1&#10;reverse,如果内容反转则为1&#10;inverse,与上面内容相同&#10;underline,如果内容为下划线则为1">attribute</a>},[<a style="text-decoration:none" href="#" title="终端标记,可以是gui,cterm,term">mode</a>])</code><br />&target; 得到语法颜色元素的属性<br />&LeftTeeArrow; 返回字符串</td></tr>
76+
<tr><td><code class="inset">synIDtrans({<a style="text-decoration:none" href="#" title="语法元素的ID">syntax_id</a>})</code><br />&target; 返回转换的语法ID<br />&LeftTeeArrow; 返回转换的语法ID</td></tr>
77+
<tr><td><code class="inset">system({<a style="text-decoration:none" href="#" title="要执行的命令">command</a>})</code><br />&target; 执行外部命令并输出<br />&LeftTeeArrow; 返回命令的执行结果</td></tr>
78+
<tr><td><code class="inset">tempname()</code><br />&target; 产生一个临时文件名<br />&LeftTeeArrow; 返回临时文件名</td></tr>
79+
<tr><td><code class="inset">visualmode()</code><br />&target; 返回最近使用的可视模式<br />&LeftTeeArrow; 返回字符串,标识最近使用的可视模式</td></tr>
80+
<tr><td><code class="inset">virtcol({<a style="text-decoration:none" href="#" title="位置">location</a>})</code><br />&target; 得到给定位置的列号<br />&LeftTeeArrow; 返回列号</td></tr>
81+
<tr><td><code class="inset">winbufnr({<a style="text-decoration:none" href="#" title="窗口号,0为当前窗口">number</a>})</code><br />&target; 得到窗口相关联的缓冲区号<br />&LeftTeeArrow; 返回缓冲区号,若有错则为-1</td></tr>
82+
<tr><td><code class="inset">winheight({<a style="text-decoration:none" href="#" title="窗口号,0为当前窗口">number</a>})</code><br />&target; 得到窗口高度<br />&LeftTeeArrow; 返回以行数表示的窗口高度;若有错,则为-1</td></tr>
83+
<tr><td><code class="inset">winnr()</code><br />&target; 得到当前窗口号<br />&LeftTeeArrow; 返回当前窗口号</td></tr>
6684
<tr><td><code class="inset"></code><br />&target; <br />&LeftTeeArrow; </td></tr>
6785
<tr><td><code class="inset"></code><br />&target; <br />&LeftTeeArrow; </td></tr>
6886
<tr><td><code class="inset"></code><br />&target; <br />&LeftTeeArrow; </td></tr>
@@ -71,125 +89,7 @@ <h1>VIM学习笔记 内建函数 (Builtin Functions)</h1>
7189
</table>
7290
<a style="text-decoration:none" href="#" title="">
7391

74-
75-
matchend({<a style="text-decoration:none" href="#" title="">string},{<a style="text-decoration:none" href="#" title="">pattern})
76-
作用:与match函数相类似,所不同的是他会返回{pattern}后的字符索引.
77-
matchstr({<a style="text-decoration:none" href="#" title="">string},{<a style="text-decoration:none" href="#" title="">pattern})
78-
作用:与match函数相类似,只是他会返回匹配的字符串
79-
参数:
80-
{string} 要检测的字符串
81-
{pattern} 要检测的类型
82-
返回值:字符串.{string}中匹配的部分.如果没有匹配就会返回空串
83-
nr2char({<a style="text-decoration:none" href="#" title="">number})
84-
作用:将数转换成字符
85-
参数:字符的ASCII码值.
86-
返回值:长度为1的字符串.与数字相对应的字符
87-
rename({<a style="text-decoration:none" href="#" title="">from},{<a style="text-decoration:none" href="#" title="">to})
88-
作用:重命名一个文件.
89-
参数:
90-
{from} 存在的文件名
91-
{to} 要重命名为的文件名
92-
返回值:整数标记.如果成功则为0,否则为非0
93-
setline({<a style="text-decoration:none" href="#" title="">line_number},{<a style="text-decoration:none" href="#" title="">line})
94-
作用:用{line}的字符串内容替换{line_number}行的内容.
95-
参数:
96-
{line_number} 要改变的行号
97-
{line} 替换行的文本
98-
返回值:整数标记.如果没有错误则为0,否则为非0
99-
strftime({<a style="text-decoration:none" href="#" title="">format},[<a style="text-decoration:none" href="#" title="">time])
100-
作用:通过{format}返回时间格式.在字符串可以放置的转换字符决定于我们系统的strftime函数.
101-
参数:字符串.包含时间格式化的时间字符串
102-
strlen({string})
103-
作用:计算字符串的长度
104-
参数:
105-
{string} 我们要计算长度的字符串
106-
返回值:整数.字符串的长度
107-
strpart({<a style="text-decoration:none" href="#" title="">string,{<a style="text-decoration:none" href="#" title="">start},{<a style="text-decoration:none" href="#" title="">length})
108-
作用:返回由{start}开始的长度为{length}的子串
109-
例如:
110-
:echo strpart("This is a test",0,4)
111-
This
112-
:echo strpart("This is a test",5,2)
113-
is
114-
如果{start}和{length}所指定的为不存在的字符,就会忽略这种情况.例如下面的命令从第一个字符的左边开始.
115-
:echo strpart("This is a test",-2,4)
116-
Th
117-
参数:
118-
{string}我们要从中查找的字符串
119-
{start}我们要选取的字符串的开始地址
120-
{length}我们要选取的字符串的长度
121-
返回值:字符串.我们要选取的子串
122-
strtrans({<a style="text-decoration:none" href="#" title="">string</a>})
123-
作用:将字符串不可打印的字符转换成可以打印的字符
124-
参数:
125-
{string} 包含不要打印字符的字符串
126-
返回值:字符串.不可打印字符的结果子.例如CTRL-A就会转换为^A.
127-
substitute({<a style="text-decoration:none" href="#" title="">string},{<a style="text-decoration:none" href="#" title="">pattern},{<a style="text-decoration:none" href="#" title="">replace},{<a style="text-decoration:none" href="#" title="">flag})
128-
作用:在字符串,将第一个与{pattern}匹配的字符替换成{replace}.这个命令与Vim的编辑命令相同
129-
参数:
130-
{string} 要替换的字符串
131-
{pattern} 用来指定替换部分的字符串
132-
{replace} 要替换成为的文本
133-
{flag}
134-
如果没有指定只是替换第一个出现的,如果为g,就会可以替换全部的情况.
135-
返回值:字符串.替换后的字符串
136-
synID({<a style="text-decoration:none" href="#" title="">line},{<a style="text-decoration:none" href="#" title="">column},{<a style="text-decoration:none" href="#" title="">transparent_flag})
137-
作用:返回由{line}和{column}所指定的语法ID.
138-
参数:
139-
{line},{column} 内容所在的位置
140-
{transparent_flag}If non-0, transparent items are reduced to the items they reveal
141-
返回值:语法ID.
142-
synIDattr({<a style="text-decoration:none" href="#" title="">sytnax_id},{<a style="text-decoration:none" href="#" title="">attribute},[<a style="text-decoration:none" href="#" title="">mode])
143-
作用:得到语法颜色元素的标记
144-
参数:
145-
{sytnax_id} 语法描述的标号.
146-
{attribute} 标记名.可有和的标记名如下:
147-
"name" 语法内容名
148-
"fg" 前景色
149-
"bg" 后景色
150-
"fg#" 以#RRGGBB格式的前景色
151-
"bg#" 以#RRGGBB格式的后景色
152-
"bold" 如果内容为粗体则为1
153-
"italic"如果内容为斜体则为1
154-
"reverse"如果内容反转则为1
155-
"inverse"与上面内容相同
156-
"underline"如果内容为下划线则为1
157-
[mode]
158-
要得到哪种终端标记.这个可以是"gui","cterm","term".默认的终端是我们当前用的.
159-
返回值:字符串.标记值.
160-
synIDtrans({<a style="text-decoration:none" href="#" title="">syntax_id})
161-
作用:返回转换的语法ID
162-
参数:
163-
{syntax_id} 语法元素的ID
164-
返回值:整数,转换的语法ID.
165-
system({<a style="text-decoration:none" href="#" title="">command})
166-
作用:执行外部命令并输出.选项'shell'和'shelldir'可以用于这个函数
167-
参数:
168-
{command} 要执行的命令.
169-
返回值:字符串.输出命令的执行结果.
170-
tempname()
171-
作用:产生一个临时文件名
172-
返回值:字符串.用为临时文件的文件名.
173-
visualmode()
174-
作用:得到最后的可视化模式
175-
返回值:字符串.作为命令字符串得到最后一个可视化模式.这个可以是v,V,或是CTRL-V
176-
virtcol({<a style="text-decoration:none" href="#" title="">location})
177-
作用:得到给定位置的列号.
178-
参数:位置可以是."(光标处),'a(标记a),或者是$"(文件最后处)
179-
返回值:整数.
180-
winbufnr({<a style="text-decoration:none" href="#" title="">number})
181-
作用:得到窗口内缓冲区的标号.
182-
参数:
183-
{number} 窗口标号.0为当前窗口.
184-
返回值:整数.缓冲区标号.若有错则为-1.
185-
winheight({<a style="text-decoration:none" href="#" title="">number})
186-
作用:得到窗口高度.
187-
参数:
188-
{number} 窗口标号.0为当前窗口.
189-
返回值:整数.以行数表示的窗口高度.若有错,则为-1
190-
winnr()
191-
作用:得到当前窗口号.
192-
返回值:整数.当前窗口标号.最上的窗口为#1
92+
19393

19494
<p style="font-weight:bold; border-bottom:1px solid lightgray; border-left:6px solid lightgray; padding:0 0 3px 5px">启用/禁用</p>
19595
<p></p>

0 commit comments

Comments
 (0)