Edison's NoteSsss

Everything about me

Tag: Tips

Merging with vimdiff

Open the files with vimdiff:
$ vimdiff file1 file2

To jump to the next difference:
]c

To jump to the previous difference:

[c

If there are only two files you can copy differences with:

:diffget

and

:diffput

If you are doing a diff with vim between more than two files you also have to specify from which buffer to :diffget or from which buffer to :diffput

:diffget b#

where b# is the buffer number. In vertical window split, buffers are numbered from left to right starting at 1.

Vim 杀手级 Tip: 快速处理配对标点符号中的文本

转自 http://linuxtoy.org/archives/killer-vim-tip.html
2010-06-23 Toy Posted in TipsRSS
这称得上是一个 Vim 的杀手级 Tip,利用该 Tip,你可以快速处理 ‘、”、()、[]、{}、<> 等配对标点符号中的文本内容,包括更改、删除、复制等。

ci’、ci”、ci(、ci[、ci{、ci< - 分别更改这些配对标点符号中的文本内容 di'、di"、di(、di[、di{、di< - 分别删除这些配对标点符号中的文本内容 yi'、yi"、yi(、yi[、yi{、yi< - 分别复制这些配对标点符号中的文本内容 对于经常用 Vim 写代码的朋友来说,善用此 Tip 将极大的提高编码效

© 2017 Edison's NoteSsss

Theme by Anders NorenUp ↑