diff options
author | Karel Kočí <cynerd@email.cz> | 2016-06-30 16:11:56 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2016-06-30 16:11:56 +0200 |
commit | 9931e0888b2419326ae10ebbfae532261c5c125f (patch) | |
tree | 7504be5daccbb7b7d1ea396754de47b11ed790e5 /vim/bundle/tlib_vim/autoload/tlib/win.vim | |
parent | e573b3020c032400eed60b649a2cbf55266e6bb0 (diff) | |
download | myconfigs-9931e0888b2419326ae10ebbfae532261c5c125f.tar.gz myconfigs-9931e0888b2419326ae10ebbfae532261c5c125f.tar.bz2 myconfigs-9931e0888b2419326ae10ebbfae532261c5c125f.zip |
Fix submodules
Diffstat (limited to 'vim/bundle/tlib_vim/autoload/tlib/win.vim')
m--------- | vim/bundle/tlib_vim | 0 | ||||
-rwxr-xr-x | vim/bundle/tlib_vim/autoload/tlib/win.vim | 128 |
2 files changed, 0 insertions, 128 deletions
diff --git a/vim/bundle/tlib_vim b/vim/bundle/tlib_vim new file mode 160000 +Subproject 5636472e5dba1a4104376ce6bd93cc2546e0248 diff --git a/vim/bundle/tlib_vim/autoload/tlib/win.vim b/vim/bundle/tlib_vim/autoload/tlib/win.vim deleted file mode 100755 index 4963af1..0000000 --- a/vim/bundle/tlib_vim/autoload/tlib/win.vim +++ /dev/null @@ -1,128 +0,0 @@ -" @Author: Tom Link (micathom AT gmail com?subject=[vim]) -" @Website: http://www.vim.org/account/profile.php?user_id=4037 -" @License: GPL (see http://www.gnu.org/licenses/gpl.txt) -" @Revision: 55 - - -" Return vim code to jump back to the original window. -function! tlib#win#Set(winnr) "{{{3 - if a:winnr > 0 - " TLogVAR a:winnr - " TLogDBG winnr() - " TLogDBG string(tlib#win#List()) - if winnr() != a:winnr && winbufnr(a:winnr) != -1 - let rv = winnr().'wincmd w' - exec a:winnr .'wincmd w' - " TLogVAR rv - " TLogDBG string(tlib#win#List()) - return rv - endif - endif - return '' -endf - - -" :def: function! tlib#win#GetLayout(?save_view=0) -function! tlib#win#GetLayout(...) "{{{3 - TVarArg ['save_view', 0] - let views = {} - if save_view - let winnr = winnr() - windo let views[winnr()] = winsaveview() - " for w in range(1, winnr('$')) - " call tlib#win#Set(w) - " let views[w] = winsaveview() - " endfor - call tlib#win#Set(winnr) - endif - return {'winnr': winnr('$'), 'winrestcmd': winrestcmd(), 'views': views, 'cmdheight': &cmdheight, 'guioptions': &guioptions, 'tabpagenr': tabpagenr()} -endf - - -function! tlib#win#SetLayout(layout) "{{{3 - if a:layout.tabpagenr == tabpagenr() && a:layout.winnr == winnr('$') - " TLogVAR a:layout.winrestcmd - " TLogDBG string(tlib#win#List()) - exec a:layout.winrestcmd - if !empty(a:layout.views) - let winnr = winnr() - " TLogVAR winnr - for [w, v] in items(a:layout.views) - " TLogVAR w, v - call tlib#win#Set(w) - call winrestview(v) - endfor - call tlib#win#Set(winnr) - endif - if a:layout.cmdheight != &cmdheight - let &cmdheight = a:layout.cmdheight - endif - " TLogDBG string(tlib#win#List()) - return 1 - endif - return 0 -endf - - -function! tlib#win#List() "{{{3 - let wl = {} - for wn in range(1, winnr('$')) - let wl[wn] = bufname(winbufnr(wn)) - endfor - return wl -endf - - -" " :def: function! tlib#win#GetLayout1(?save_view=0) -" " Contrary to |tlib#win#GetLayout|, this version doesn't use -" " |winrestcmd()|. It can also save windows views. -" function! tlib#win#GetLayout1(...) "{{{3 -" TVarArg ['save_view', 0] -" let winnr = winnr() -" let acc = {} -" for w in range(1, winnr('$')) -" let def = {'h': winheight(w), 'w': winwidth(w)} -" if save_view -" call tlib#win#Set(w) -" let def.view = winsaveview() -" endif -" let acc[w] = def -" endfor -" call tlib#win#Set(winnr) -" return acc -" endf -" -" -" " Reset layout from the value of |tlib#win#GetLayout1|. -" function! tlib#win#SetLayout1(layout) "{{{3 -" if len(a:layout) != winnr('$') -" return 0 -" endif -" let winnr = winnr() -" for [w, def] in items(a:layout) -" if tlib#win#Set(w) -" exec 'resize '. def.h -" exec 'vertical resize '. def.w -" if has_key(def, 'view') -" call winrestview(def.view) -" endif -" else -" break -" endif -" endfor -" call tlib#win#Set(winnr) -" return 1 -" endf - - -function! tlib#win#Width(wnr) "{{{3 - return winwidth(a:wnr) - &fdc -endf - - -function! tlib#win#WinDo(ex) "{{{3 - let w = winnr() - exec 'windo '. a:ex - exec w .'wincmd w' -endf - |