get Vim option value?
I use a function called Toggle_num() in my .vimrc that toggles line numbers on/off, and in the process also resizes the Vim window so that the number of usable columns in the document stays remains constant. In Vim 7.0, this was hardcoded to 8, so I just hardcoded the value in the function. Now, I can limit the line number column with using the numberwidth option. I'd like to update this function to grow/shrink the columns by numberwidth instead of leaving it hardcoded to 8. Problem is, I can't figure out how to get the value of numberwidth within the script. How exactly do I do this? Thanks. -- Jared
Re: get Vim option value?
Jared wrote: Dang, that works perfectly. I tried so many different special characters prepended, appended, and surrounding numberwidth, but I never tried . Is that discussed in the Vim docs? Can you let me know where so I can read through for further reference? Specifically, try :help expr9 What? You didn't think of that!?! Why in the world, not? Actually, the best way to find that stuff out is to read :help expression . Regards, Chip Campbell