tags:

views:

66

answers:

1

How may I set a hidden buffer as 'nolisted' from a vim script?
I tried:
call setbufvar(2, 'buflisted', 1)

+2  A: 

You have to add ampersand sign to 'buflisted' to show to Vim that it is the option:

call setbufvar(2, '&buflisted', 1)
Mykola Golubyev
Ricardo
or if the buffer is already opened let or set optionname=value
Mykola Golubyev