使用vim的一些总结
发布于 8 年前 作者 Samurais 4153 次浏览 来自 分享

文章是我在evernote里记录的 原文链接

关于vim

http://vim.wikia.com/wiki/Vim_Tips_Wiki

安装vim

http://vim.wikia.com/wiki/Where_to_download_Vim

安装plugins

https://github.com/Samurais/vim

读一下 README.

git clone https://github.com/Samurais/vim.git
cd vim
./install.sh

#打开文件

:e XXX # open :split XXX # 纵向打开 :xsplit XXX:# 横向打开

窗口

control-w-| 横向扩展当前窗口 control-w-shift-| 横向最大化当前窗口 control-w- - 垂直扩展当前窗口 control-w-shift- - 垂直最大化当前窗口 control-w-= 等比例所有窗口

<img src=“https://www.evernote.com/shard/s101/sh/fd6beb1b-c12e-41f8-ac11-e8e11522eee2/a545072326f5f09b/res/92d673b1-65ad-455f-883e-c02c7f0c39be.png?resizeSmall&width=832” />

http://superuser.com/questions/486532/how-to-open-files-in-vertically-horizontal-split-windows-in-vim-from-the-command

buffer

<img src=“https://www.evernote.com/shard/s101/sh/fd6beb1b-c12e-41f8-ac11-e8e11522eee2/a545072326f5f09b/res/7a89b633-727e-49b3-8362-e9ce320a280a.png?resizeSmall&width=832” width=“500px”/> <img src=“https://www.evernote.com/shard/s101/sh/fd6beb1b-c12e-41f8-ac11-e8e11522eee2/a545072326f5f09b/res/81552a0c-ac78-4d47-8dc1-559f1561b797.png?resizeSmall&width=832” width=“800px”/> <img src=“https://www.evernote.com/shard/s101/sh/fd6beb1b-c12e-41f8-ac11-e8e11522eee2/a545072326f5f09b/res/e94b289f-8b3d-46f2-acad-3c39be514293.png?resizeSmall&width=832” width=“500px”/>

http://vim.wikia.com/wiki/Buffers

git + vim

:Gstatus # 查看当前状态 ctrl-n ctrl-p 切换文件; ‘-‘ minus 切换当前所在行文件的status; enter 打开文件 :Gdiff # 比较不同 :Gcommit # commit ~/kuaipan/data/fugitive

折叠/打开折叠

z-R

关闭所有窗口

:qa! # 不保存

5 回复

楼主,图片裂了。

@klesh 图片在evernote里,获取速度慢。

@Samurais 推荐https://github.com/carlhuda/janus 这个集成了最常用的东西

bigvim 来凑个热闹

主要用来写JS

回到顶部