Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
看起来Ctrl-A在 GVim 中使用不会从 07 增加到 08,因为默认情况下前缀 0 被解释为八进制数。
Ctrl-A
如何使 Gvim 从 07 递增到 08?
命令:set nrformats-=octal可以解决问题。你可以随时使用:set nrformats+=octal来恢复nrformats。或者,如果您也不喜欢十六进制格式,您可以输入:set nrformats=alpha. 或者,如果您愿意,可以将此设置保存在 .vimrc 文件中。
:set nrformats-=octal
:set nrformats+=octal
nrformats
:set nrformats=alpha