1
0
Fork 0

move vim pack, stage 1

This commit is contained in:
Von Random 2018-06-23 20:18:01 +03:00
parent 5738b8d1ea
commit 754b8e3a37
13 changed files with 63 additions and 34 deletions

@ -1 +0,0 @@
Subproject commit 9f8b0082dbd99e706cc18de2076f7a66c2ca0a90

View file

@ -1,103 +0,0 @@
"By default I have the windows adjustment functions set to <Ctrl+j> for down, <Ctrl+k> for up, <Ctrl+l> for right & <Ctrl +h> for left
"Adjust them to whatever suits your needs
nnoremap <silent> <C-j> :call DownHorizontal()<CR>
nnoremap <silent> <C-k> :call UpHorizontal()<CR>
nnoremap <silent> <C-l> :call RightVertical()<CR>
nnoremap <silent> <C-h> :call LeftVertical()<CR>
"WINDOW RESIZING Down
func! DownHorizontal()
let currentWin = winnr()
"If no window below or above leave as is, otherwise call function
wincmd j
if winnr() == currentWin
wincmd k
if winnr() == currentWin
wincmd k
else
exe currentWin . "wincmd w"
call DownHorizontalAdjust()
endif
else
exe currentWin . "wincmd w"
call DownHorizontalAdjust()
endif
endfun
func! DownHorizontalAdjust()
let currentWin = winnr()
"If very bottom window, decrease window size, otherwise just increase current window size
wincmd j
if winnr() == currentWin
resize -1
else
exe currentWin . "wincmd w"
resize +1
endif
endfun
"WINDOW RESIZING Up
func! UpHorizontal ()
let currentWin = winnr()
"If no window below or above leave as is
wincmd j
if winnr() == currentWin
wincmd k
if winnr() == currentWin
wincmd k
else
exe currentWin . "wincmd w"
call UpHorizontalAdjust()
endif
else
exe currentWin . "wincmd w"
call UpHorizontalAdjust()
endif
endfun
func! UpHorizontalAdjust()
let currentWin = winnr()
"If very top window, decrease window size, otherwise just increase current window size
wincmd k
if winnr() == currentWin
resize -1
else
resize -1
exe currentWin . "wincmd w"
endif
endfun
"WINDOW RESIZING Right (only requires 1 function)
func! RightVertical()
let currentWin = winnr()
" If very right window, decrease window size, otherwise just increase current window size
wincmd l
if winnr() == currentWin
vertical resize -1
else
exe currentWin . "wincmd w"
vertical resize +1
endif
endfun
"WINDOW RESIZING Left (only requires 1 function)
func! LeftVertical()
let currentWin = winnr()
" If very left window, decrease window size, otherwise just increase current window size
wincmd h
if winnr() == currentWin
vertical resize -1
else
vertical resize -1
exe currentWin . "wincmd w"
endif
endfun

View file

@ -1,15 +0,0 @@
fun! s:ToggleMouse()
if !exists("s:old_mouse")
let s:old_mouse = "a"
set ttymouse=sgr
endif
if &mouse == ""
let &mouse = s:old_mouse
echo "mouse enabled (" . &mouse . ")"
else
let s:old_mouse = &mouse
let &mouse=""
echo "mouse disabled"
endif
endfunction
noremap <Leader>m :call <SID>ToggleMouse()<CR>

@ -1 +0,0 @@
Subproject commit 7f2127b1dfc57811112785985b46ff2289d72334

@ -1 +0,0 @@
Subproject commit 1cd724dc239c3a0f7a12e0fac85945cc3dbe07b0

@ -1 +0,0 @@
Subproject commit 8fa5cad8d7502be2f3438d02f353ab62264d358e

@ -1 +0,0 @@
Subproject commit 33f610feb73ce782cf41a7d9a377541991c692b5

@ -1 +0,0 @@
Subproject commit 24dfc44639166f910ef9e3ca3902e02df77a342a

@ -1 +0,0 @@
Subproject commit a1551dbae3b76035360b2ea2b38555194505d925

@ -1 +0,0 @@
Subproject commit d42f2836092bf8aa7e43dff5d2be21317fa696b9