I'm trying to use the Tagbar line numbers:

" Show line numbers (0 = none, 1 = absolute, 2 = relative)
" note: this doesn't work well and is often overwritten by rnu settings
let g:tagbar_show_linenumbers = 1

However, it seems like this is always being overwritten with what I have globally (relativenumber). Is there a way to prevent this? Here is what it looks like when I open it: https://gyazo.com/0d73459732530c4e5db2ffa11d8b91cb. It goes by quick, so you'll have to pause it at one second and again at two seconds to see that it starts with absolute and then switches (very quickly) to relative.

enter image description here enter image description here

  • I doesn't start with absolute and switch to relative... What's actually happening is that it starts with the cursor on line 1. If you look closely, you'll see that the first and second line are both 1, but the first has the 1 aligned flush left, which is how the current line shows with both number and rnu...
    – filbranden
    Commented Jul 17, 2020 at 3:57
  • @filbranden oh, great point! Why does it do that / is there a way to switch it to absolute?
    – David542
    Commented Jul 17, 2020 at 4:43
  • Try an autocmd for filetype tagbar? autocmd FileType tagbar setlocal norelativenumber (inside an augroup, etc.)
    – filbranden
    Commented Jul 17, 2020 at 4:56


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.