Im'sorry for my simple question, but I'm newbie in using vim and just
reying to create my own vimrc file
The problem is:
I want to enable option 'number' only if i run vim in a framebuffer, so
I hawe to check screen size, I have no idea how to do that. I tried

if columns=128
    set number
endif

but it is an error.

And else I want to map a key to switch this ooption manualy:

function! Numeration ()
if exists("number")
    set nonumber
endif
if !exists("number")
    set number
endif
endfunction

map <F2> :execute Numeration()<CR>

But it only enables the option, and doesn't disable.

What can I do to make it work?


Reply via email to