vim 行号 - 默认情况下如何启用它们?

vim 行号 - 默认情况下如何启用它们?

问题描述:

我可以在我正在编辑的文件中:set number,但如何让它们在默认情况下始终处于打开状态?

I can :set number from within a file I'm editing but how can I have them always be on by default?

set number 添加到主目录中的 .vimrc 文件中.
如果 .vimrc 文件不在您的主目录中,请创建一个vim .vimrc 并在打开时添加你想要的命令.

Add set number to your .vimrc file in your home directory.
If the .vimrc file is not in your home directory create one with vim .vimrc and add the commands you want at open.

这是一个网站,解释了 vimrc 及其使用方法.

Here's a site that explains the vimrc and how to use it.