*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. centos 6.5搭建LNMP环境

    1:查看环境: 1 2 [root@10-4-14-168 html]# cat /etc/redhat-release CentOS release 6.5 (Final) 2:关掉防火墙 1 [r ...

  2. nyoj 568——RMQ with Shifts——————【线段树单点更新、区间求最值】

    RMQ with Shifts 时间限制:1000 ms  |  内存限制:65535 KB 难度:3   描述     In the traditional RMQ (Range Minimum Q ...

  3. [转]jQuery Validate使用说明

    本文转自:http://www.cnblogs.com/gimin/p/4757064.html jQuery Validate 导入 js 库 <script src="./jque ...

  4. avalon实现日期联动

    前言 上一篇我们说了下Avalon的一些概念,以及一些主要特性,至于Avalon的一些基础教程,正美老师已经做了非常全面的讲述,参见:http://www.cnblogs.com/rubylouvre ...

  5. 使用java applet通过签名访问客户端串口

    前端时间公司有需求要访问客户端串口读取电子称的数据,通过网上资料,决定使用applet通过电子签名的形式实现. 1.先写applet:这里我是使用RXRTcomm.jar LocalFileApple ...

  6. 阻止冒泡 table表格取消选中最后一列

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  7. configparser模块——配置文档

    configparser模块用于生成和修改常见配置文档. 预制配置文件:conf.ini [DEFAULT] ServerAliveInterval = 45 Compression = yes Co ...

  8. 转:如何在ArcMap下将栅格图象矢量化的基本步骤 (对影像的校准和配准、栅格图象矢量化)

    矢量对象是以矢量的形式,即用方向和大小来综合表示目标的形式描述的对象.例如画面上的一段直线,一个矩形,一个点,一个圆,一个填充的封闭区域--等等. 矢量图形文件就是由这些矢量对象组合而成的描述性文件. ...

  9. 【IOS】Mac和IOS开发资源汇总

    本文主要汇集一些苹果开发的资源,会经常更新,建议大家把这篇文章单独收藏(在浏览器中按**command+D**). 今天收录了许多中文网站和博客.大家一定要去感受一下哦. 如果大家有知道不错的站点,可 ...

  10. 【转】QT创建子对话框的方法

    原文地址:http://blog.csdn.net/baidu_18991997/article/details/42713159 代码实现功能:单击某个按钮后,弹出对话框,对话框中的内容可自行设计. ...