Vim 的隐藏功能
多年来,我以为我是 Vim 高手!最近拜访了一位真正的 Vim 高手!哎呀!我的知识太肤浅了!
例如,我不知道可以添加 \c
以使搜索不区分大小写。 (而不是 :setignorecase
)
我清楚地记得当我发现 SuperTab 或 TagList< /a> 第一次插件。 Vim 的官方网站称“Vim 不是一个旨在抓住用户双手的编辑器。它是一个工具,必须学习使用它。”,所以它自然应该有许多未被发现的功能。
所以我问,你最喜欢 Vim 的哪些功能?有哪些事情是你可以用它做而在其他编辑器中不能做或更困难的?
当然,其他编辑器也有一些相同的主题:
Over the years, I thought I'm a Vim master! Recently I visited a real Vim master! oops! My knowledge is awfully superficial!
For example I didn't know it's possible to add a \c
to make search case insensitive. (instead of :set ignorecase
)
I clearly remember when how I'm surprised when I found SuperTab or TagList plugins first time. Vim's official site says "Vim isn't an editor designed to hold its users' hands. It is a tool, the use of which must be learned.", so naturally it should have many undiscovered features.
So I'm asking, what are your favorite features of Vim? What are things you can do with it that you can't or are more difficult in the other editors?
Of course there's some same topics about other editors:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
关于“隐藏”部分......试试这些::
o)
About the "hidden" part... Try these:
:o)
我花了几年时间才了解文本对象。
同样不错的还有
ci"
和ci
(当我想更改字符串或函数参数时)。It took me a few years before I learned about text objects
Also nice are
ci"
andci
(when I want to change a string or function args).这并不完全是一个隐藏的功能,但它是一个鲜为人知的功能。
如果您输入 :X 那么您可以使用密码加密您的文件。
This is not exactly a hidden feature but it's a little known feature.
If you type :X then you can encrypt your file with a password.
您可以使用以下行检查文本的正确性:
You can check the correctness of the text using line: