官术网_书友最值得收藏!

  • Mastering Vim
  • Ruslan Osipov
  • 247字
  • 2021-06-10 18:51:28

Resizing windows

Default 50/50 window proportions might not be exactly what you're looking for, and there are some options for changing sizes.

Ctrl + followed by = will equalize the height and width of all open windows. This is really useful when you just resized the Vim window and the height of your windows got all messed up.

The :resize command increases or decreases the height of a current window, while :vertical resize will adjust the width of the window. You can use these as follows:

  • :resize +N will increase the height of a current window by N rows
  • :resize -N will decrease the height of a current window by N rows
  • :vertical resize +N will increase the width of a current window by N columns
  • :vertical resize -N will decrease the width of a current window by N columns
:resize and :vertical resize can be shortened to :res and :vert res. There are also keyboard shortcuts for changing the height and width by one: Ctrl + w,  - and Ctrl + w,  + adjust the height, while Ctrl w,   > and Ctrl + w < adjust the width.

Both commands can also be used to set the height and the width to a specific number of rows or columns:

  • :resize N will set the height of the window to N
  • :vertical resize N will set the width of the window to N
主站蜘蛛池模板: 禹州市| 新竹县| 钟山县| 扎兰屯市| 高青县| 益阳市| 丰城市| 和平县| 延津县| 象州县| 武城县| 黎城县| 华池县| 民乐县| 贞丰县| 丹凤县| 永康市| 鹿泉市| 清新县| 鞍山市| 得荣县| 阜南县| 基隆市| 遂平县| 日喀则市| 枝江市| 莒南县| 新河县| 鞍山市| 德兴市| 类乌齐县| 清徐县| 滨海县| 龙门县| 巴中市| 皋兰县| 刚察县| 延边| 肇源县| 克拉玛依市| 通城县|