Created
November 30, 2010 17:53
-
-
Save lukesh/722066 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nnoremap <C-W>O :call MaximizeToggle ()<CR> | |
nnoremap <C-W>o :call MaximizeToggle ()<CR> | |
nnoremap <C-W><C-O> :call MaximizeToggle ()<CR> | |
function! MaximizeToggle() | |
if exists("s:maximize_session") | |
exec "source " . s:maximize_session | |
call delete(s:maximize_session) | |
unlet s:maximize_session | |
let &hidden=s:maximize_hidden_save | |
unlet s:maximize_hidden_save | |
else | |
let s:maximize_hidden_save = &hidden | |
let s:maximize_session = tempname() | |
set hidden | |
exec "mksession! " . s:maximize_session | |
only | |
endif | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment