I would like my status line to display wrap/nowrap.
set statusline +=%{execute(':set wrap')}
doesn't work. How do I do this?
Thanks!
I would like my status line to display wrap/nowrap.
set statusline +=%{execute(':set wrap')}
doesn't work. How do I do this?
Thanks!
Try the following, which works for me:
set statusline+=%{&wrap?'WRAP':'NO\ WRAP'}
Here, I used &wrap instead of :set wrap to get the current wrap status, and escaped the space \ (if you need one).