Loading ...
Sorry, an error occurred while loading the content.

new 'ZoomWin()' function [was: RE: argdel and session grief (6.0r )]

Expand Messages
  • Ron Aaron (Comforce/RhoTech)
    The following script works just fine. Use F7 to zoom the current window, if there is more than one window shown, and F7 again to restore the state of
    Message 1 of 1 , Jan 3, 2001
    • 0 Attachment
      The following script works just fine. Use 'F7' to "zoom" the current
      window, if there is more than one window shown, and 'F7' again to restore
      the state of the windows when you zoomed.

      Finally! Brief-like window zooming! Enjoy,

      Ron

      map <f7> :call ToggleWin()<cr>
      imap <f7> <c-o><f7>

      func! ZoomWin()
      if winbufnr(2) == -1
      " this is the only window
      if filereadable('windowsettings.saved')
      silent! source windowsettings.saved
      silent! call delete('windowsettings.saved')
      endif
      else
      " more than one window
      let s=&ssop
      let
      &ssop='winpos,buffers,slash,globals,resize,blank,folds,help,options,winsize'
      silent! mksession! windowsettings.saved
      let &ssop=s
      only
      endif
      endfunc
    Your message has been successfully submitted and would be delivered to recipients shortly.