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.

  • 相关阅读:
    字符串转换的UnicodeDecodeError—— ‘\xa0’问题
    linux下nginx+uwsgi部署python应用
    字符串转换的UnicodeDecodeError—— ‘\xa0’问题
    python的get和post方式请求详解
    MindManager使用说明
    进入程序员的自由天地
    悦读上品 得乎益友
    C++ 是一门难学易用的语言!
    合上More Exceptional C++的瞬间
    从零开始学ASP.NET
  • 原文地址:https://www.cnblogs.com/linghuchong0605/p/3659762.html
Copyright © 2011-2022 走看看