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的更多相关文章
随机推荐
- Oracle中查询关键字select--from--where--group by--having--order by执行顺序
select--from--where--group by--having--order by 这6个查询关键字的执行顺序: 1.from组装来自不同数据源的数据:2.where基于指定的条件对记录行 ...
- Pygame 加载音频
Python Learning:Pygame 加载音频 Python 中自带的 winsound 模块 winsound 模块中 Beep 方法可以调用系统的蜂鸣器,接受一个为 frequency 的 ...
- bzoj 5340: [Ctsc2018]假面
Description 题面 Solution 生命值范围比较小,首先维护每一个人在每个血量的概率,从而算出生存的概率,设为 \(a[i]\) 询问时,只需要考虑生存的人数,可以 \(DP\) 设 \ ...
- eclipse-java-style.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?><profil ...
- ZROJ#397. 【18提高7】模仿游戏(爆搜)
题意 题目链接 Sol 考试的时候调了1.5h没调出来我真是菜爆了... 读完题目后不难发现,每次约束的条件相当于是\(b[((x[i] + i) % N + (i / N) % N) % N] = ...
- 【Android】4.0 神一样的仪式感:Android第一个项目HelloWorld——eclipse
进入Eclipse,在左侧栏右击: 新建 “Android Application Project”项目,如果new之后没有,选择“Project”中“Android”目录下的 “Android Ap ...
- Java开发中代码规范有哪些?
Java开发中所要遵守的编码规范大体上有如下7点.命名规范.注释规范.缩进排版规范.文件名规范.声明规范.语句规范以及编程规范. 1.命名规范 (1)所有的标示符都只能用ASCⅡ字母(A-Z或a-z) ...
- 2015年创新工场校园招聘软件研发岗位笔试题目——矩阵旋转
题目要求:给出一个NxN的矩阵,写出程序将该矩阵进行顺时针旋转90度 // matrixrotation.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h ...
- Linux(Ubuntu) 常用命令
玩儿转Linux:终端命令用法精选 最近再一次拾起了Ubuntu,为了更好的玩儿转Linux,专门到网上搜到的这些常用的终端命令,根据命令使用类别的不同分为了9个大类,都在下面一一列举了出来,个人觉得 ...
- ios端微信浏览器禁止上下滑动
在body里的第一个div容器中添加 position:fixed