简体   繁体   English

.vimrc中的“ set number”在iOS的Vim中不起作用

[英]“set number” in .vimrc not working in Vim for iOS

I added the following .vimrc file to the home directory of Vim for iOS on my iPad. 我在iPad上将以下.vimrc文件添加到iOS的Vim主目录中。

set showcmd
set number
set guifont=Courier:h24
imap jk <Esc>

For some mysterious reason, all commands work fine except set number . 由于某些神秘的原因,除了set number之外,所有命令都可以正常工作。 Since manually typing :set number still works, it can't be that Vim for iOS doesn't support displaying line numbers. 由于手动输入:set number仍然有效,因此不能证明Vim for iOS不支持显示行号。 I have no clue why it behaves differently when I put it in .vimrc. 我不知道为什么当我将其放入.vimrc时其行为会有所不同。 Any ideas? 有任何想法吗?

Check with 检查与

:verbose set number?

where this got set last. 最后设置的位置。

If that doesn't provide a hint, capture a log with vim -V20vimlog and check for :set number commands. 如果没有提供提示,请使用vim -V20vimlog捕获日志并检查:set number命令。 (This assumes that you can launch Vim on the command-line on the iPad. If not, add :set verbose=20 verbosefile=vimlog to your ~/.vimrc .) (这假定您可以在iPad上的命令行上启动Vim。否则, :set verbose=20 verbosefile=vimlog在您的~/.vimrc添加:set verbose=20 verbosefile=vimlog 。)

Also, the :scriptnames command shows all scripts that ran after your ~/.vimrc . 另外, :scriptnames命令显示在~/.vimrc之后运行的所有脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM