split vim_legacy

master
Totem4 Totem4 1 year ago
parent 265eb2a2d3
commit 4fac2df1a5

@ -1,25 +1,10 @@
if exists("g:loaded_Banananew") || &cp if exists("g:autoloaded_Banananew") || &cp
finish finish
endif endif
let g:loaded_Banananew= 1 " your version number
let s:keepcpo = &cpo
set cpo&vim
if !hasmapto('<Plug>BananaEncnew') let g:autoloaded_Banananew= 1 " your version number
map <unique> <Leader>c <Plug>BananaEncNew
endif
if !hasmapto('<Plug>BananaDecnew')
map <unique> <Leader>t <Plug>BananaDecNew
endif
noremap <silent> <unique> <script> <Plug>BananaEncNew
\ :call <SID>Enc()<CR>
noremap <silent> <unique> <script> <Plug>BananaDecNew
\ :call <SID>Dec()<CR>
fun! banana#Enc() range
fun! s:Enc() range
if line("'<") > 0 if line("'<") > 0
call s:ReplSel(s:Dec2Ban(s:GetSel())) call s:ReplSel(s:Dec2Ban(s:GetSel()))
else else
@ -31,7 +16,7 @@ fun! s:EncLine()
call setline('.', substitute(getline('.'), '\d\d*', '\=toupper(s:Doban(submatch(0)))','g')) call setline('.', substitute(getline('.'), '\d\d*', '\=toupper(s:Doban(submatch(0)))','g'))
endfun! endfun!
fun! s:Dec() range fun! banana#Dec() range
if line("'<") > 0 if line("'<") > 0
call s:ReplSel(s:Ban2Dec(s:GetSel())) call s:ReplSel(s:Ban2Dec(s:GetSel()))
else else
@ -124,7 +109,3 @@ endfun!
fun! s:Ban2Dec(text) fun! s:Ban2Dec(text)
return substitute(a:text, '\C\u\u*', '\=s:Unban(tolower(submatch(0)))', 'g') return substitute(a:text, '\C\u\u*', '\=s:Unban(tolower(submatch(0)))', 'g')
endfun! endfun!
let &cpo= s:keepcpo
unlet s:keepcpo

@ -0,0 +1,27 @@
if exists("g:loaded_Banananew") || &cp
finish
endif
let g:loaded_Banananew= 1 " your version number
let s:keepcpo = &cpo
set cpo&vim
if !hasmapto('<Plug>BananaEncnew')
map <unique> <Leader>c <Plug>BananaEncNew
endif
if !hasmapto('<Plug>BananaDecnew')
map <unique> <Leader>t <Plug>BananaDecNew
endif
"noremap <silent> <unique> <script> <Plug>BananaEncNew
" \ :call <SID>Enc()<CR>
noremap <silent> <unique> <script> <Plug>BananaEncNew
\ :call banana#Enc()<CR>
"noremap <silent> <unique> <script> <Plug>BananaDecNew
" \ :call <SID>Dec()<CR>
noremap <silent> <unique> <script> <Plug>BananaDecNew
\ :call banana#Dec()<CR>
let &cpo= s:keepcpo
unlet s:keepcpo
Loading…
Cancel
Save