aboutsummaryrefslogtreecommitdiff
path: root/vim/plugin/ZoomWinPlugin.vim
diff options
context:
space:
mode:
authorBen Beltran <ben@freshout.us>2012-10-08 11:44:10 -0500
committerBen Beltran <ben@freshout.us>2012-10-08 11:44:10 -0500
commit0d23b6e515a01a5782532351821ebfa11f3d6cf2 (patch)
treeaa395b7e50ccb533d6b48b809016ac06f2d5bc8c /vim/plugin/ZoomWinPlugin.vim
parenta91731eac872b7837c2821341db5888702125cef (diff)
Add vim again :)
Diffstat (limited to 'vim/plugin/ZoomWinPlugin.vim')
-rw-r--r--vim/plugin/ZoomWinPlugin.vim49
1 files changed, 49 insertions, 0 deletions
diff --git a/vim/plugin/ZoomWinPlugin.vim b/vim/plugin/ZoomWinPlugin.vim
new file mode 100644
index 0000000..3f24a7d
--- /dev/null
+++ b/vim/plugin/ZoomWinPlugin.vim
@@ -0,0 +1,49 @@
+" ZoomWin: Brief-like ability to zoom into/out-of a window
+" Author: Charles Campbell
+" original version by Ron Aaron
+" Date: Jan 16, 2009
+" Version: 23e ASTRO-ONLY
+" History: see :help zoomwin-history {{{1
+" GetLatestVimScripts: 508 1 :AutoInstall: ZoomWin.vim
+
+" ---------------------------------------------------------------------
+" Load Once: {{{1
+if &cp || exists("g:loaded_ZoomWinPlugin")
+ finish
+endif
+if v:version < 702
+ echohl WarningMsg
+ echo "***warning*** this version of ZoomWin needs vim 7.2"
+ echohl Normal
+ finish
+endif
+let s:keepcpo = &cpo
+let g:loaded_ZoomWinPlugin = "v23"
+set cpo&vim
+"DechoTabOn
+
+" ---------------------------------------------------------------------
+" Public Interface: {{{1
+if !hasmapto("<Plug>ZoomWin")
+ nmap <unique> <c-w>o <Plug>ZoomWin
+endif
+nnoremap <silent> <script> <Plug>ZoomWin :set lz<CR>:silent call ZoomWin#ZoomWin()<CR>:set nolz<CR>
+com! ZoomWin :set lz|silent call ZoomWin#ZoomWin()|set nolz
+
+au VimLeave * call ZoomWin#CleanupSessionFile()
+
+" ---------------------------------------------------------------------
+" ZoomWin: toggles between a single-window and a multi-window layout {{{1
+" The original version was by Ron Aaron.
+" This function provides compatibility with previous versions.
+fun! ZoomWin()
+ call ZoomWin#ZoomWin()
+endfun
+
+" ---------------------------------------------------------------------
+" Restore: {{{1
+let &cpo= s:keepcpo
+unlet s:keepcpo
+" ---------------------------------------------------------------------
+" Modelines: {{{1
+" vim: ts=4 fdm=marker