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

推荐订阅源

D
Docker
爱范儿
爱范儿
T
The Exploit Database - CXSecurity.com
量子位
T
Tailwind CSS Blog
T
Threatpost
The GitHub Blog
The GitHub Blog
AWS News Blog
AWS News Blog
云风的 BLOG
云风的 BLOG
K
Kaspersky official blog
P
Proofpoint News Feed
博客园 - 司徒正美
L
LangChain Blog
T
Threat Research - Cisco Blogs
C
CERT Recently Published Vulnerability Notes
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
S
Secure Thoughts
The Last Watchdog
The Last Watchdog
Spread Privacy
Spread Privacy
H
Hacker News: Front Page
T
Troy Hunt's Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
W
WeLiveSecurity
A
Arctic Wolf
Apple Machine Learning Research
Apple Machine Learning Research
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
P
Proofpoint News Feed
T
Tor Project blog
T
The Blog of Author Tim Ferriss
I
Intezer
P
Privacy & Cybersecurity Law Blog
美团技术团队
N
Netflix TechBlog - Medium
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Vulnerabilities – Threatpost
Application and Cybersecurity Blog
Application and Cybersecurity Blog
G
Google Developers Blog
Attack and Defense Labs
Attack and Defense Labs
T
Tenable Blog
月光博客
月光博客
Stack Overflow Blog
Stack Overflow Blog
J
Java Code Geeks
腾讯CDC
Microsoft Security Blog
Microsoft Security Blog
A
About on SuperTechFans
Last Week in AI
Last Week in AI

博客园 - 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 ---- 窗口互换位置,光标切换