*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. Linux VFS机制简析(一)

    Linux VFS机制简析(一) 本文主要基于Linux内核文档,简单分析Linux VFS机制,以期对编写新的内核文件系统(通常是给分布式文件系统编写内核客户端)的场景有所帮助. 个人渊源 切入正文 ...

  2. Python sh模块--------替换subprocess的利器

    官方文档有句话"allows you to call any program",并且: helps you write shell scripts in Python by giv ...

  3. linq之Capacity(转载)

    出处:博客园 作者:mumuliang 连接:http://www.cnblogs.com/mumuliang/p/3914425.html Capacity 在.NET中List的容量应该只是受到硬 ...

  4. Hibernate课堂笔记

    1.java持久化概述 Java持久化简称(JPA), 即把程序中的临时数据持久保存到数据库中.由于jdbc开发效率低,我们就提出了对象关系映射(ORM)的概率 2.ORM 通过java持久化提供的A ...

  5. OLEDB事务

    学过数据的人一般都知道事务的重要性,事务是一种对数据源的一系列更新进行分组或者批处理以便当所有更新都成功时同时提交更新,或者任意一个更新失败时进行回滚将数据库中的数据回滚到执行批处理中的所有操作之前的 ...

  6. Android UI 切图命名规范、标注规范及单位描述(转载)

    本文转自:https://blog.csdn.net/klxh2009/article/details/74938009 很多UI设计师做APP切图都会有两套,一套是Android的,一套是IOS的. ...

  7. Android学习——ViewPager的使用(一)

    这一节介绍使用ViewPager,加载ViewPager主要有三部分,数据源.适配器和ViewPager与适配器关联.其中数据源分为View对象和Fragment对象,这一节先来介绍View对象. 数 ...

  8. BIEE入门(三)业务模型层

    正如它的名字所示(Business Model and Mapping Layer),业务逻辑层需要把物理层的数据源以一种业务用户的视角来重新组织物理层的各个数据源(所谓的Mapping),同时在业务 ...

  9. 在科技圈不懂“机器学习”?那你就out了

    当联网的终端设备越来越多时,产生的信息数据也将呈指数式增长,大型.复杂.增长快速的数据收集已经无处不在.而机器学习能够扩增这些数据的价值,并基于这些趋势提出更广泛的应用情境. 那么,被人们津津乐道的机 ...

  10. Linux 配置 ss

    Linux 配置 Shadowsocks 标签(空格分隔): ss VPS 1.首先安装 sudo pip install shadowsocks 2.然后在指定位置新建shadowsocks.jso ...