Skip to content

Instantly share code, notes, and snippets.

@ayuLiao
Created March 19, 2019 13:14
Show Gist options
  • Save ayuLiao/aae7cfa9126479a58fce073eac68bf67 to your computer and use it in GitHub Desktop.
Save ayuLiao/aae7cfa9126479a58fce073eac68bf67 to your computer and use it in GitHub Desktop.
vim分屏相关操作
# 分屏启动Vim
# n是数字,表示分成几个屏。
# 在通过vim启动多个文件时,分屏
vim -On file1 file2 ...
# 使用小写的o参数来水平分屏。
vim -on file1 file2 ...
# 关闭分屏
# 关闭当前窗口。
Ctrl+W c
#关闭当前窗口,如果只剩最后一个了,则退出Vim。
Ctrl+W q
# 上下分割当前打开的文件
Ctrl+W s
# 左右分割当前打开的文件。
Ctrl+W v
# 移动光标
# 把光标移到右边的屏
Ctrl+W l
# 把光标移到左边的屏中。
Ctrl+W h
# 把光标移到上边的屏中。
Ctrl+W k
# 把光标移到下边的屏中。
Ctrl+W j
# 把光标移到下一个的屏中。.
Ctrl+W w
# 让所有的屏都有一样的高度。
Ctrl+W =
# 增加高度。
Ctrl+W +
# 减少高度。
Ctrl+W -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment