move vim pack, stage 1
This commit is contained in:
parent
5738b8d1ea
commit
754b8e3a37
13 changed files with 63 additions and 34 deletions
1
vimpack/start/vim-commentary
Submodule
1
vimpack/start/vim-commentary
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 7f2127b1dfc57811112785985b46ff2289d72334
|
1
vimpack/start/vim-easy-align
Submodule
1
vimpack/start/vim-easy-align
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 1cd724dc239c3a0f7a12e0fac85945cc3dbe07b0
|
1
vimpack/start/vim-fugitive
Submodule
1
vimpack/start/vim-fugitive
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 8fa5cad8d7502be2f3438d02f353ab62264d358e
|
1
vimpack/start/vim-polyglot
Submodule
1
vimpack/start/vim-polyglot
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 33f610feb73ce782cf41a7d9a377541991c692b5
|
1
vimpack/start/vim-rsi
Submodule
1
vimpack/start/vim-rsi
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 24dfc44639166f910ef9e3ca3902e02df77a342a
|
103
vimpack/start/vim-scripts/plugin/directionalWindowResizer.vim
Normal file
103
vimpack/start/vim-scripts/plugin/directionalWindowResizer.vim
Normal file
|
@ -0,0 +1,103 @@
|
|||
"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
|
||||
|
||||
|
||||
|
||||
|
44
vimpack/start/vim-scripts/plugin/mouse_toggle.vim
Normal file
44
vimpack/start/vim-scripts/plugin/mouse_toggle.vim
Normal file
|
@ -0,0 +1,44 @@
|
|||
" plugin/mouse_toggle.vim
|
||||
" <plug>mouse_toggle -> toggle 'mouse' option
|
||||
" <leader>m -> <plug>mouse_toggle
|
||||
" Written by Kobus Retief
|
||||
|
||||
|
||||
if !has("mouse")
|
||||
finish
|
||||
endif
|
||||
|
||||
|
||||
if exists("loaded_mouse_toggle")
|
||||
finish
|
||||
endif
|
||||
let loaded_mouse_toggle = 1
|
||||
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
|
||||
let s:oldmouse = exists("mouse_default") ? mouse_default : "a"
|
||||
|
||||
|
||||
function s:mouse_toggle()
|
||||
if &mouse == ""
|
||||
let &mouse = s:oldmouse
|
||||
echo "mouse enabled (=" . &mouse . ")"
|
||||
else
|
||||
let s:oldmouse = &mouse
|
||||
let &mouse = ""
|
||||
echo "mouse disabled"
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
nnoremap <unique> <silent> <plug>mouse_toggle :call <sid>mouse_toggle()<cr>
|
||||
if ! hasmapto("<plug>mouse_toggle")
|
||||
map <unique> <leader>m <plug>mouse_toggle
|
||||
endif
|
||||
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
1
vimpack/start/vim-signify
Submodule
1
vimpack/start/vim-signify
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit a1551dbae3b76035360b2ea2b38555194505d925
|
1
vimpack/start/vim-tru-typewriter
Submodule
1
vimpack/start/vim-tru-typewriter
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit d42f2836092bf8aa7e43dff5d2be21317fa696b9
|
Loading…
Add table
Add a link
Reference in a new issue