Hi,

 in a script I want to to something like:

          if <option is set>
                 (do something)
      endif

 From the help I got under the toppic "expr-option"

    option                                              *expr-option* *E112* 
*E113*
    ------
    &option                     option value, local value if possible
    &g:option           global option value
    &l:option           local option value
    
    Examples: >
        echo "tabstop is " . &tabstop
        if &insertmode
    
    Any option name can be used here.  See |options|.  When using the local 
value
    and there is no buffer-local or window-local value, the global value is used
    anyway.



 So I wrote (before there was a "set nostartofline")

    if &nostartofline
           (do something)
    endif

 but it fails with:

    Error detected while processing /home/mccramer/.vimrc:
    line  561:
    E113: Unknown option: nostartofline
    E15: Invalid expression: &nostartofline

 which I dont understand, since some line before "set nostartofline"
 was used and there "nostartofline" was known...

 What can I do to solve the problem ?

 Thank you very much in advance for any help !

 Keep editing!
 mcc



Reply via email to