zoukankan      html  css  js  c++  java
  • 调整vi多窗口的大小

    This tip is about how to resize Windows efficiently.

    You can use the :resize command or its shortcut :res to change the height of the window. To change the height to 60 rows, use:

    :resize 60
    

    You can also change the height in increments. To change the height by increments of 5, use:

    :res +5
    :res -5
    


    You can use :vertical resize to change the width of the current window. To change the width to 80 columns, use:

    :vertical resize 80
    

    You can also change the width in increments. To change the width by increments of 5, use:

    :vertical resize +5
    :vertical resize -5
    


    For a split window: You can use Ctrl-w + and Ctrl-w - to resize the height of the current window by a single row. For a vsplit window: You can use Ctrl-w > and Ctrl-w < to resize the width of the current window by a single column. Additionally, these key combinations accept a count prefix so that you can change the window size in larger steps. [e.g. 10 Ctrl-w + increases the window size by 10 lines]

    To resize all windows to equal dimensions based on their splits, you can use Ctrl-w =.

    To increase a window to its maximum height, use Ctrl-w _.

    To increase a window to its maximum width, use Ctrl-w |.

    To resize in different steps, you can create maps that will adjust the window size differently. For example to increase the window size by a factor of 1.5 and decrease the window size by 0.67, you can map this:

    nnoremap <silent> <Leader>+ :exe "resize " . (winheight(0) * 3/2)<CR>
    nnoremap <silent> <Leader>- :exe "resize " . (winheight(0) * 2/3)<CR>
    


    In Gvim and vim in terminals with mouse support, it is also possible to use the mouse to resize a window. Simply grab the statusline at the window border and drag it into the desired direction.






  • 相关阅读:
    SqlHelper
    asp.net中窗口相关操作总结(javascript)
    ASP.NET顯示對話框
    为ASP.NET控件添加常用的JavaScript操作
    右键弹出菜单
    log4net的初使用
    QQ/MSN右下角弹出提示窗口
    简便无刷新文件上传系统
    简单的自动更新程序实
    SQL中的单记录函数
  • 原文地址:https://www.cnblogs.com/iathena/p/82b2fd46f1579a14ba793d0f369366cc.html
Copyright © 2011-2022 走看看