Skip to content

Instantly share code, notes, and snippets.

@aharisu
Created September 12, 2012 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save aharisu/3706600 to your computer and use it in GitHub Desktop.
Save aharisu/3706600 to your computer and use it in GitHub Desktop.
Vim上のWindowサイズ変更をお手軽に変更
function g:window_resize_mode()
echo 'window resize mode'
while 1
let ch = getchar()
if ch == 104 " 104 = h
execute '2wincmd <'
elseif ch == 106 " 106 = j
execute "2wincmd -"
elseif ch == 107 " 107 = k
execute "2wincmd +"
elseif ch == 108 " 108 = l
execute '2wincmd >'
else
break
endif
execute 'redraw'
endwhile
endfunction
nmap <C-W><C-W> :call g:window_resize_mode()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment