*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的更多相关文章

随机推荐

  1. 几个免费 IP 归属地查询 API

    1.淘宝:同个IP不能连续查询,需要时间间隔 http://ip.taobao.com/service/getIpInfo.php?ip=114.114.114.114 返回结果 { "co ...

  2. 【Linux】网络性能测试工具iperf详细使用图文教程【转】

    参考链接:https://www.cnblogs.com/yingsong/p/5682080.html Iperf是一个网络性能测试工具.Iperf可以测试TCP和UDP带宽质量. Iperf可以测 ...

  3. FontSize sp 和 dp 的区别

    dp不会随着“设置->显示->字体大小”的改变而改变,sp会. sp会随着configeration的配置来scale, dp不会. 所以,什么时候用sp, 什么时候用dp需要斟酌.

  4. linux系统设置虚拟内存

    1. 情景:centos7源码编译mysql5.7.22时,因为服务器内存不足导致编译失败(源码编译至少需要1G内存).报错信息如下: c++: Internal error: Killed (pro ...

  5. HTML表格相关元素

    <table> 标签定义 HTML 表格.简单的 HTML 表格由 table 元素以及一个或多个 tr.th 或 td 元素组成.tr 元素定义表格行,th 元素定义表头,td 元素定义 ...

  6. 什么时候修改class

    点击按钮class发生改变 <html> <head> <meta http-equiv="Content-Type" content="t ...

  7. js如何设置一个倒计时

    //申明一个定时器 let endInterval; //结束时间(毫秒数,这里是距离 1970 年 1 月 1 日至今的毫秒数) let endSeconds; //结束时间差 const ENDT ...

  8. jQuery 添加样式属性的优先级别

    jQuery类中添加多个属性 $('#five .a') .css({ color:'blue', border:'2px solid green', background:'blue' }); jQ ...

  9. ArcGIS软件操作——地图制图

    ArcGIS软件操作系列二(地图制图) 2016年毕业,参加工作,除了平时出差,大部分时间都在使用ArcGIS处理数据.制图,在此,先将一些制图的小心得撰写出来,希望能与各位共同交流. 1 数据准备: ...

  10. 面向对象设计中private,public,protected的访问控制原则及静态代码块的初始化顺序

    第一:private, public, protected访问标号的访问范围. private:只能由          1.该类中的函数          2.其友元函数访问 不能被任何其他访问,该 ...