惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
Attack and Defense Labs
Attack and Defense Labs
V2EX - 技术
V2EX - 技术
O
OpenAI News
S
Secure Thoughts
H
Heimdal Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Schneier on Security
Schneier on Security
H
Hacker News: Front Page
S
Security Affairs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
The Register - Security
The Register - Security
GbyAI
GbyAI
Cloudbric
Cloudbric
MongoDB | Blog
MongoDB | Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
K
Kaspersky official blog
Forbes - Security
Forbes - Security
Y
Y Combinator Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Scott Helme
Scott Helme
Hacker News - Newest:
Hacker News - Newest: "LLM"
The Cloudflare Blog
Recorded Future
Recorded Future
人人都是产品经理
人人都是产品经理
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
Webroot Blog
Webroot Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LangChain Blog
T
Tor Project blog
Microsoft Azure Blog
Microsoft Azure Blog
博客园_首页
Hacker News: Ask HN
Hacker News: Ask HN
Blog — PlanetScale
Blog — PlanetScale
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog RSS Feed
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
I
Intezer
V
V2EX
T
Tailwind CSS Blog
SecWiki News
SecWiki News
NISL@THU
NISL@THU
C
Check Point Blog

博客园 - JackieHan

ubuntu i3 xterm中文输入显示问题解决 ubuntu vim markdown 实时预览 ubuntu docker方式部署docker registry v2 docker 安装 gogs(go git server) 及问题解决 ubuntu14.04 server 安装docker Ubuntu Tomcat Ubuntu ssh 代理 全网访问速度优化 git 操作 vim使用指北 ---- Advanced Editing vim使用指北 ---- Global Replacement vi/vim使用指北 ---- Introducting the ex Editor ubuntu 点点滴滴 vi/vim使用指北 ---- Learning the vi and Vim Editors 读书 笔记 vi/vim使用指北 ---- Beyond the Basic vi/vim使用指北 ---- Moving Around in a Hurry vi/vim使用指北 ---- Sample Editing linux权威指南 简记 idea 使用
vim使用指北 ---- Multiple Windows in Vim
JackieHan · 2014-09-24 · via 博客园 - JackieHan

2014-09-24 01:34  JackieHan  阅读(339)  评论()    收藏  举报

多窗口打开多个文件

vim -o file1 file2 ... ---- 默认上下分割窗口

vim -0n file1 file2 ... ---- vim默认会上下等分n个窗口

分割窗口

:[v]split file ---- 以横向分割(带v)或纵向分割当前窗口打开文件(等比分割)

:[n][v]split/new [++opt] [+cmd] [file] ----  n:从顶部开始在新窗口中现实多少行,opt:vim选项,cmd:在新窗口中执行的命令,file:新窗口中现实的文件。例如:15split ++fileformat=unix otherfile

快速简单的分割窗口可以使用快捷键:Ctrl+w,s Ctrl+S

:sview filename  ---- 以只读模式打开一个新窗口来现实文件,纵向分割

:sfind [++option] {+cmd] filename ---- 查找文件名为filename的文件,在新窗口打开。如果没有找到则不分割窗口

在窗口中移动光标

Ctrl+w,h/j/k/l --- 上下左右切换当前窗口

Ctrl+w,Ctrl+w ---- 循环顺序皆幻当前窗口

移动窗口

Ctrl+w r ---- 窗口互换位置,不改变光标

Ctrl+w,x ---- 窗口互换位置,光标切换