vim-1-window,buffer and tab

Posted ccoming

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vim-1-window,buffer and tab相关的知识,希望对你有一定的参考价值。

Summary:
A buffer is the in-memory text of a file.

A window is a viewport on a buffer.

A tab page is a collection of windows.

窗口切换快捷键:

nnoremap <C-j> <C-w>j        向下切换

nnoremap <C-k> <C-w>k      向上切换

nnoremap <C-h> <C-w>h      向左切换

nnoremap <C-l> <C-w>l         向右切换

窗口生成快捷键:

nnoremap <C-v> <C-w>v         垂直分割,内容与原内容一致

nnoremap <C-n> <C-w>n         生成新的空窗口

:sp                                             上下分割

vim -o(-O)  file1 file2...               多窗口打开

:sp file1                                      :sp file1=:sp+:edit file1

Remark:不能按<C-s>,<C-s>组合键的特殊意义是暂停终端,<C-q>退出暂停

 较好的参考:

http://harttle.com/2015/11/17/vim-buffer.html

http://harttle.com/2015/11/14/vim-window.html

http://harttle.com/2015/11/12/vim-tabpage.html

以上是关于vim-1-window,buffer and tab的主要内容,如果未能解决你的问题,请参考以下文章

cash and buffer

Redundancy and Latency in Structured Buffer Use

Buffered Channels and Worker Pools

linux cache and buffer

mysql-5.7 saving and restore buffer pool state 详解

[Tools Vim] Open Files into Vim from the Terminal as buffers, splits, and tabs