Fix and improve split mappings + add abbrevs: vs25/vs75/sp25/sp75

This commit is contained in:
Kevin MacMartin 2014-10-31 01:51:35 -04:00
parent fb15796c0b
commit 9c22929c3a
2 changed files with 20 additions and 18 deletions

View file

@ -326,6 +326,10 @@
cabbrev <expr><silent> gitstatus ':Gstatus<CR>'
cabbrev <expr><silent> GitCommit ':Gcommit<CR>'
cabbrev <expr><silent> gitcommit ':Gcommit<CR>'
cabbrev <expr><silent> vs25 ':VS25<CR>'
cabbrev <expr><silent> vs75 ':VS75<CR>'
cabbrev <expr><silent> sp25 ':SP25<CR>'
cabbrev <expr><silent> sp75 ':SP75<CR>'
cabbrev diff vertical diffsplit
cabbrev sudow SudoWrite
cabbrev wsudo SudoWrite
@ -410,11 +414,11 @@
nmap <expr><silent> <C-w>{ ':wincmd R<CR>'
nmap <expr><silent> <C-w>} ':wincmd r<CR>'
nmap <expr><silent> <C-w>] ':vs<CR>'
nmap <expr><silent> <C-w>0 ':VSplit25<CR>'
nmap <expr><silent> <C-w>) ':VSplit75<CR>'
nmap <expr><silent> <C-w>0 ':VS25<CR>'
nmap <expr><silent> <C-w>) ':VS75<CR>'
nmap <expr><silent> <C-w>[ ':sp<CR>:wincmd j<CR>'
nmap <expr><silent> <C-w>9 ':Split25<CR>'
nmap <expr><silent> <C-w>( ':Split75<CR>'
nmap <expr><silent> <C-w>9 ':SP25<CR>'
nmap <expr><silent> <C-w>( ':SP75<CR>'
"}
"DISPLAY:{

View file

@ -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()
"}}}
"}}}