From 9c22929c3a1f1d7b2de52e153a91d6873ec2d03e Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Fri, 31 Oct 2014 01:51:35 -0400 Subject: [PATCH] Fix and improve split mappings + add abbrevs: vs25/vs75/sp25/sp75 --- vim/config/keyboard.vim | 12 ++++++++---- vim/config/settings.vim | 26 ++++++++++++-------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index e1c79ea..47b8185 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -326,6 +326,10 @@ cabbrev gitstatus ':Gstatus' cabbrev GitCommit ':Gcommit' cabbrev gitcommit ':Gcommit' + cabbrev vs25 ':VS25' + cabbrev vs75 ':VS75' + cabbrev sp25 ':SP25' + cabbrev sp75 ':SP75' cabbrev diff vertical diffsplit cabbrev sudow SudoWrite cabbrev wsudo SudoWrite @@ -410,11 +414,11 @@ nmap { ':wincmd R' nmap } ':wincmd r' nmap ] ':vs' - nmap 0 ':VSplit25' - nmap ) ':VSplit75' + nmap 0 ':VS25' + nmap ) ':VS75' nmap [ ':sp:wincmd j' - nmap 9 ':Split25' - nmap ( ':Split75' + nmap 9 ':SP25' + nmap ( ':SP75' "} "DISPLAY:{ diff --git a/vim/config/settings.vim b/vim/config/settings.vim index 0494de6..642162a 100644 --- a/vim/config/settings.vim +++ b/vim/config/settings.vim @@ -107,30 +107,28 @@ augroup END endif - function s:vResize25() + function s:VSResize75() vs|wincmd =|q endfunction - command! -buffer VResize25 call s:vResize25() - function s:vs25() - vs|call s:vResize25() - endfunction - command! -buffer VSplit25 call s:vs25() function s:vs75() - vs|wincmd h|call s:vResize25()|wincmd l + vs|call s:VSResize75() endfunction - command! -buffer VSplit75 call s:vs75() + command! -buffer VS75 call s:vs75() + function s:vs25() + vs|wincmd h|call s:VSResize75()|wincmd l + endfunction + command! -buffer VS25 call s:vs25() - function s:hResize25() + function s:SPResize25() sp|wincmd =|q endfunction - command! -buffer HResize25 call s:hResize25() function s:sp25() - sp|call s:hResize25()|wincmd j + sp|call s:SPResize25()|wincmd j endfunction - command! -buffer Split25 call s:sp25() + command! -buffer SP25 call s:sp25() function s:sp75() - sp|wincmd j|call s:hResize25() + sp|wincmd j|call s:SPResize25() endfunction - command! -buffer Split75 call s:sp75() + command! -buffer SP75 call s:sp75() "}}} "}}}