Closed AdamWhittingham closed 7 years ago
Adding this to the top of UpdateMode() helped me make the line numbers not appear in NERDTree:
if(exists('t:NERDTreeBufName') && bufname('%') == t:NERDTreeBufName)
return
end
However, I'm having trouble getting it to check the NERDTreeShowLineNumbers variable. For some reason, Vim will complain that it's undefined inside the script.
Setting them off is good enough for me at the moment, many thanks!
should it check the buffer first to see if line numbers are showing before switching/setting them?
That is a better idea.
Reappeared with 2.0 update.
Instead of adding exceptions for tools like NERDTree, I'd like numbertoggle to disable itself automatically in buffers without line numbers. This means users would have to set number
and relativenumber
in their ~/.vimrc files themselves, which I think would be acceptable.
I opened a pull request in #38 to disable numbertoggle automatically when number
is not set, which works for me in Goyo. @Leandros since I don't have NERDTree installed, could you switch your install to the if-number
branch to check if this fix works with NERDTree as well?
Yes, seems to work. NERDTree isn't showing line-numbers anymore after switching to it.
Hi,
NERDTree no longer honours the setting for hiding line numbers. I tried adding
let nerdtreeshowlinenumbers=0
to the end of the update function to no avail. Is there an easy way to make NERDTree exempt from showing the line numbers please?Thanks for a neat plugin!