【原创】Linux vi/vim 分屏
来源:互联网 发布:hl线切割编程加工视频 编辑:程序博客网 时间:2024/05/25 18:09
以竖屏方式打开新文件:(只输入vs,会默认再次垂直打开当前文件)
window.
:vs new.txt
以横屏方式打开新文件:(只输入sp,会默认再次水平打开当前文件)
:sp new.txt
【Ctrl】 + 【w】 + 【-】减小高度
【Ctrl】 + 【w】 +【+】增加高度
【Ctrl】 + 【w】 +【<】向左/右移动(在左右竖屏操作,效果会相反)
【Ctrl】 + 【w】 +【>】向右/左移动
【Ctrl】 + 【w】 + 【_】全屏显示(横屏)
【Ctrl】 + 【w】 + 【|】全屏显示(竖屏)
【Ctrl】 + 【w】 +【=】恢复调整中分宽度或高度(全屏效果也会恢复至中分)
参见vi文档:
:[N]sp[lit] [++opt] [+cmd] {file} *:split_f*
Create a new window and start editing file {file} in it. This
behaves like a ":split" first, and then an ":e" command.
If [+cmd] is given, execute the command when the file hasbeen
loaded |+cmd|.
Also see |++opt|.
Make new window N high (default is to use half theexisting
height). Reduces the current window heightto create room
(and others, if the 'equalalways' option is set).
:[N]vs[plit] [++opt] [+cmd] [file] *:vs* *:vsplit*
Like |:split|, but split vertically. Thewindows will be
spread out horizontally if
1. a width was not specified,
2. 'equalalways' is set,
3. 'eadirection' isn't "ver", and
4. one of the other windows is wider than the current ornew
Note: In other places CTRL-Q does the same as CTRL-V, buthere
it doesn't!
==============================================================================
6. Window resizing *window-resize*
*CTRL-W_=*
CTRL-W = Make all windows (almost) equally high and wide, butuse
'winheight' and 'winwidth' for the current window.
Windows with 'winfixheight' set keep their height andwindows
with 'winfixwidth' set keep their width.
:res[ize] -N *:res* *:resize* *CTRL-W_-*
CTRL-W - Decrease current window height by N (default1).
If used after |:vertical|: decrease width by N.
:res[ize] +N *CTRL-W_+*
CTRL-W + Increase current window height by N (default1).
If used after |:vertical|: increase width by N.
:res[ize] [N]
CTRL-W CTRL-_ *CTRL-W_CTRL-_* *CTRL-W__*
CTRL-W _ Set current window height to N (default: highestpossible).
z{nr} Set current window height to {nr}.
*CTRL-W_<*
CTRL-W <<span class="Apple-tab-span"style="white-space:pre"> Decrease current window width by N(default 1).
*CTRL-W_>*
CTRL-W > Increase current window width by N (default1).
:vertical res[ize] [N] *:vertical-resize* *CTRL-W_bar*
CTRL-W | Set current window width to N (default: widestpossible).
You can also resize a window by dragging a status line up ordown with the
mouse. Or by dragging a vertical separatorline left or right. This only
works if the version of Vim that is being used supports themouse and the
'mouse' option has been set to enable it.
The option 'winheight' ('wh') is used to set the minimalwindow height of the
current window. This option is used eachtime another window becomes the
current window. If the option is '0', it isdisabled. Set 'winheight' to a
very large value, e.g., '9999', to make the current windowalways fill all
available space. Set it to a reasonablevalue, e.g., '10', to make editing in
the current window comfortable.
The equivalent 'winwidth' ('wiw') option is used to set theminimal width of
the current window.
When the option 'equalalways' ('ea') is set, all the windowsare automatically
made the same size after splitting or closing a window. If you don't set this
option, splitting a window will reduce the size of the currentwindow and
leave the other windows the same. Whenclosing a window, the extra lines are
given to the window above it.
The 'eadirection' option limits the direction in which the'equalalways'
option is applied. The default "both"resizes in both directions. When the
value is "ver" only the heights of windows are equalized. Use this when you
have manually resized a vertically split window and want tokeep this width.
Likewise, "hor" causes only the widths of windows to beequalized.
The option 'cmdheight' ('ch') is used to set the height of thecommand-line.
If you are annoyed by the |hit-enter| prompt for longmessages, set this
option to 2 or 3.
If there is only one window, resizing that window will alsochange the command
line height. If there are several windows,resizing the current window will
also change the height of the window below it (and sometimesthe window above
it).
The minimal height and width of a window is set with'winminheight' and
'winminwidth'. These are hard values, awindow will never become smaller.
==============================================================================
0 0
- 【原创】Linux vi/vim 分屏
- 【原创】Linux vi/vim …
- 【原创】 linux vi-删除空行
- 【原创】Linux vim 编辑器快捷键
- 【原创】Linux 终端 vim…
- 【原创】 linux Screen 使用
- vi/vim 基本使用方法
- Linux Vim 笔记
- 我的linux学习5 vi,vim的学习
- 【原创】PyCharm plugins Vim 插件
- 【原创】 linux Python 列表整合
- vim linux设置
- 【原创】 linux-ubuntu …
- 【原创】 linux-python …
- 【原创】 linux-python …
- 【原创】 linux-python …
- 【原创】 linux-python …
- 【原创】 linux-python …
- 【原创】Mysql ERROR 17…
- 两个算法--Day4
- 【原创】Linux xargs 转义
- 【原创】Python True Fa…
- 【原创】Python 定时器 …
- 【原创】Linux vi/vim 分屏
- 【原创】Linux Ubuntu …
- 【原创】Python Threading.Ti…
- 【原创】Mysql ERROR 14…
- php与C++面向对象上的区别
- 【原创】Linux vi/vim …
- jsoup Cookbook——从元素抽取属性,文本和HTML
- 【原创】Python 封装-实现&nb…
- Service与IntentService