1

I added :set numberwidth=2 in my vimrc, but this value is always returned to 4 inside my windows.

It seems I need to use some autocommand to always force this value back to 2.

In fact, even more alarming: when I force a short file to :set numberwidth=2 manually (to regain two columns of space), once I do ANYTHING at this point, it reverts. Switch window/tab/buffer, enter insert mode (!), you name it. I can move the cursor without it reverting, however. The same behavior is seen with other window-local settings I've tried such as relativenumber. So I suspect perhaps some plugin might be culpable. But how to debug this?

  1. I would like to not use an autocommand to do this if necessary
  2. I would like to know what are the various things triggering this to reset to the default
  3. If I really do must use an autocommand to do this, which autocommand should I use?
Steven Lu
  • 2,251
  • 15
  • 26

1 Answers1

4

The offending plugin is jeffkreeftmeijer/vim-numbertoggle.

I'll go drop a note on the Github now, and try to debug it.

Update: It's plain to see that the autocommands are being set very promiscuously. I never use this plugin anyway. I'm ditching the plugin obviously, and going to drop a note on the issues.

Steven Lu
  • 2,251
  • 15
  • 26
  • 1
    I have seen your issue on github. Probably that plugin should have used augroups to set the triggers etc. Let's see if it gets fixed. – mbilyanov Apr 03 '16 at 10:46