Reputation: 2242
I wanna a function to detect whether VIM has enabled 'set nu' feature. How do I make the script? Kindly indicate me which resource in 'help' if possible.
Thanks
Upvotes: 1
Views: 155
Reputation: 22226
:h 'number'
will bring it up in help.
:let x = &number
" x will be 1 if set number is on
" x will be 0 if set number is off
:echo &number "will print value
Upvotes: 4