vim_preview_window
*29.2* The preview window
When you edit code that contains a function call, you need to use the correct
arguments. To know what values to pass you can look at how the function is
defined. The tags mechanism works very well for this. Preferably the
definition is displayed in another window. For this the preview window can be
used.
To open a preview window to display the function "write_char": >
:ptag write_char
Vim will open a window, and jumps to the tag "write_char". Then it takes you
back to the original position. Thus you can continue typing without the need
to use a CTRL-W command.
If the name of a function appears in the text, you can get its definition
in the preview window with: >
CTRL-W }
There is a script that automatically displays the text where the word under
the cursor was defined. See |CursorHold-example|.
To close the preview window use this command: >
:pclose
To edit a specific file in the preview window, use ":pedit". This can be
useful to edit a header file, for example: >
:pedit defs.h
Finally, ":psearch" can be used to find a word in the current file and any
included files and display the match in the preview window. This is
especially useful when using library functions, for which you do not have a
tags file. Example: >
:psearch popen
This will show the "stdio.h" file in the preview window, with the function
prototype for popen():
FILE *popen __P((const char *, const char *)); ~
You can specify the height of the preview window, when it is opened, with the
'previewheight' option.
vim_preview_window的更多相关文章
随机推荐
- sublime的reopen with encoding和reload with encoding区别
首先必需要明白一点,sublime无论以什么编码格式打开文本(以什么编码格式来理解文本文件中的二进制数据),都会把它转为utf-8再显示到屏幕中,这个过程称作解码.其实不当当是sublime,其实任何 ...
- 关于Javascript模块化和命名空间管理的问题说明
最近闲下来的时候,稍微想了想这个问题.关于Javascript模块化和命名空间管理 [关于模块化以及为什么要模块化] 先说说我们为什么要模块化吧.其实这还是和编码思想和代码管理的便利度相关(没有提及名 ...
- 深入理解JavaScript系列(15):函数(Functions)
介绍 本章节我们要着重介绍的是一个非常常见的ECMAScript对象——函数(function),我们将详细讲解一下各种类型的函数是如何影响上下文的变量对象以及每个函数的作用域链都包含什么,以及回答诸 ...
- css-知识总结
是什么 CSS通常称为CSS样式或层叠样式表,主要用于设置HTML页面中的文本内容(字体,大小,对其方式等),图片的外形 (高宽.边框样式.边距等)以及版面的布局等外观显示样式. CSS可以是HTML ...
- 键盘按键keyCode大全,js页面快捷键
字母和数字键的键码值(keyCode) 按键 键码 按键 键码 按键 键码 按键 键码 A 65 J 74 S 83 1 49 B 66 K 75 T 84 2 50 C 67 L 76 U 85 3 ...
- C语言的前世今生
1.计算机语言的发展 机器语言:其实就是二进制0和1,最小为00000000,最大为11111111,8位比特为1个字节(byte),1k=1024byte,1m=1024k,1g=1024m[第一代 ...
- HTML表单(form)的“enctype”属性
Form元素的语法中,EncType表明提交数据的格式 属性值: application/x-www-form-urlencoded:在发送前编码所有字符(默认) multipart/form-dat ...
- Js浮动广告效果实现
第一种 漂浮广告 不符合W3CJavaScript漂浮广告代码,很不错,代码精简,不过一次只有漂一个,复制就能用了.希望站长朋友喜欢. <html> <head> <ti ...
- MySQL远程连接:Host 'x' is not allowed to connect to this MySQL server
远程连接MySQL时发现如下错误: java.sql.SQLException: null, message from server: "Host '192.168.30.23' is no ...
- 使用HTML5 canvas做地图(2)瓦片以及如何计算的
上一篇也说到瓦片,我们为什么使用瓦片?这一篇主要是关于如何拼接地图? 下面的一张图,可以一眼明了,地图是如何切割以及拼接的. 瓦片信息 瓦片信息包括切图原点,瓦片大小,格式,分辨率以及分辨率级别等. ...