Search code examples
iosvim

"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.

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

For some mysterious reason, all commands work fine except set number. Since manually typing :set number still works, it can't be that Vim for iOS doesn't support displaying line numbers. I have no clue why it behaves differently when I put it in .vimrc. Any ideas?


Solution

  • 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. (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.)

    Also, the :scriptnames command shows all scripts that ran after your ~/.vimrc.