Hello,

  (I think something similar has been discussed, perhaps by Hari.)
  
  Unless called from the statusline, mode() mostly returns c or n.
  So how can one know the mode from viml?  Here's the pseudo-code 
  I would like to get working:
 
       augroup BlockHold
          au * InsertEnter 
               if(mode() == CTRL-V) 
                  let b:BlockHold_tw = &tw                         
                  setlocal tw=0
               endif
          endau

          au * InsertLeave
               if(exists b:BlockHold_tw)
                  setlocal tw=b:BlockHold_tw
                  unlet b:BlockHold_tw
              endif
       augroup END

  Thanks,

  --Suresh



Reply via email to