zoukankan      html  css  js  c++  java
  • 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.

  • 相关阅读:
    理解javascript 对象,原型对象、闭包
    JSON数据理解
    css 盒模型相关样式
    神奇的CSS3选择器
    设计模式六大原则
    java反射机制性能优化
    一份关于jvm内存调优及原理的学习笔记
    浅谈http请求数据分析
    Apache+Tomcat部署负载均衡(或集群)
    同台电脑部署多组Tomcat负载均衡(或集群)
  • 原文地址:https://www.cnblogs.com/linghuchong0605/p/3659762.html
Copyright © 2011-2022 走看看