From e5e60402de1bd5177b88f599a98b2bf595f07927 Mon Sep 17 00:00:00 2001 From: jimi Date: Wed, 27 Oct 2010 16:02:27 -0500 Subject: [PATCH] vimrc function to toggle gui window size --- vimrc | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/vimrc b/vimrc index 9a8befc..501c3a7 100644 --- a/vimrc +++ b/vimrc @@ -18,12 +18,28 @@ au VimEnter * if &term == 'xterm' | set t_Co=256 | endif colorscheme wombat256mod +function! GeomToggle() + if (has("gui")) + if s:gui_size=='norm' + let s:gui_size='big' + set columns=102 + set lines=32 + else + set columns=120 + set lines=40 + let s:gui_size='norm' + endif + endif +endfunction +let s:gui_size='norm' + if has("gui_running") set guifont=Monospace\ 10 set cursorline set go=aegitt - set co=102 - set lines=35 + call GeomToggle() + nmap :call GeomToggle() + imap a " Map Alt-keys for fontsize nmap FontsizeInc nmap FontsizeInc