Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
created March 2, 2004 · complexity basic · author Yada · version 5.7
" Map F1 for gvim window resizing. " Put this snippet of code in your vimrc for nice window resizing. " Press F1 key to toggle between the three settings. nmap <F1> :call ResizeWindow()<CR> imap <F1> <Esc><F1>a " for insert mode function! ResizeWindow() if (has("gui_running")) if s:selectedsize == 1 let s:selectedsize = 2 set number set columns=88 " 88 is exactly 80 with :set number set lines=35 elseif s:selectedsize == 2 set number let s:selectedsize = 3 set columns=98 set lines=45 else " old school console goodness let s:selectedsize = 1 set nonumber set columns=80 set lines=25 endif endif endfunction let s:selectedsize=1 call ResizeWindow()
"use own map, this is mine map <M-right> <Esc>:resize +2 <CR> map <M-left> <Esc>:resize -2 <CR>
This tip (669) was due to be deleted, but I am keeping it temporarily. After merging any useful info from here, this will be replaced with a redirect to a suitable tip.
Related tips (will merge some, and put 'see also' on remainder):
- 88 Maximize or set initial window size
- 427 Fast window resizing with plus/minus keys
- 507 Quick window resizing
- 995 Resize window when showing/hiding line numbers
- 1026 Resize xterm when running vimdiff
- 1110 Toggle gvim window size
- 1569 Restore screen size and position
JohnBeckett 03:30, March 9, 2010 (UTC)