文本处理工具(四)

vim多文件功能

vim file1 file2 file3 ...同时编辑多个文件

末行模式下:

next切换至下个文件;

last 切换至最后一个文件;

prev切换至上个文件;

first切换至第一个文件;

多窗口操作:

vim file1 file2 -o 水平分割窗口操作

vim file1 file2 -O垂直分割窗口操作

多窗口文件切换:ctrl +w

注:单个文件也可以分割为多窗口进行查看对比

ctrl+w然后s键:水平分割窗口

ctrl+w然后v键:垂直分割窗口

定制vim工作特性

1.行号

set number=set nu

set nonu取消显示

2.括号高亮显示

set showmatch=stsm

set nosm

3.自动缩进

启动set ai

取消set noai

4.高亮搜索

启动:set hlsearch

取消:set nohlsearch

5.语法高亮

启动:systax on

取消:systax off

6.忽略字符大小写

启动:set ic

取消:set noic

 

posted @ 2020-09-28 07:52  扬帆直上  阅读(105)  评论(0)    收藏  举报