08.1: 分割窗口
:split # 對當前窗口分割一個副本,默認為上下分割
crrl-w # 在不同窗口中進行跳轉
:close # 關閉當前窗口
:only # 保留當前兴使,關閉其他窗口
08.2:打開其他文件分割窗口
:split two.c
:new
08.3:調整窗口大小
:3split alpha.c # 設置新開的窗口顯示三行高度
08.4: 數(shù)值分割窗口
:vsplit
:vsplit two.c
:vnew
08.5 在不同窗口之間移動
crtl-w h
vrtl-w j
crtl-w l
08.6 對所有窗口執(zhí)行命令
:qall # 退出所有窗口
:wall # 寫入所有窗口數(shù)據(jù)
:wqall
:qall!
:vim -o one.txt two.txt three.txt # o參數(shù)的作用打開vim的時候啟動分割窗口 O可以設置為垂直分割
08.7 使用vimdiff查看兩個文件不同之處
:vimdiff main.c~ main.c
:set nosrollbind # 默認diff方式打開為同時滾動拼弃,可設置為單獨滾動
:]c # 跳往下一個不同之處
:diffupdate # 更新目前的不同之處
:dp # 移除一個不同之處
:do # 獲得改變
08.8 變量
08.9 tab頁
:tabedit two.c #
:tab split
:tab help gt # gt 代表goto tab的意思
:tab only # 只保留當前tab