parent
efc017dcb4
commit
dfea25aae8
@ -509,6 +509,8 @@ function! s:opfunc(type,...) " {{{1
|
|||||||
let &clipboard = cb_save
|
let &clipboard = cb_save
|
||||||
if a:type =~ '^\d\+$'
|
if a:type =~ '^\d\+$'
|
||||||
silent! call repeat#set("\<Plug>Y".(a:0 && a:1 ? "S" : "s")."surround".char.s:tag,a:type)
|
silent! call repeat#set("\<Plug>Y".(a:0 && a:1 ? "S" : "s")."surround".char.s:tag,a:type)
|
||||||
|
else
|
||||||
|
silent! call repeat#set("\<Plug>Yrepeat".char.s:tag,a:type)
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@ -539,6 +541,7 @@ nnoremap <silent> <Plug>YSsurround :<C-U>call <SID>opfunc2(v:count1)<CR>
|
|||||||
" <C-U> discards the numerical argument but there's not much we can do with it
|
" <C-U> discards the numerical argument but there's not much we can do with it
|
||||||
nnoremap <silent> <Plug>Ysurround :<C-U>set opfunc=<SID>opfunc<CR>g@
|
nnoremap <silent> <Plug>Ysurround :<C-U>set opfunc=<SID>opfunc<CR>g@
|
||||||
nnoremap <silent> <Plug>YSurround :<C-U>set opfunc=<SID>opfunc2<CR>g@
|
nnoremap <silent> <Plug>YSurround :<C-U>set opfunc=<SID>opfunc2<CR>g@
|
||||||
|
nnoremap <silent> <Plug>Yrepeat :<C-U>execute 'normal! .'.<SID>inputtarget()<CR>
|
||||||
vnoremap <silent> <Plug>VSurround :<C-U>call <SID>opfunc(visualmode(),visualmode() ==# 'V' ? 1 : 0)<CR>
|
vnoremap <silent> <Plug>VSurround :<C-U>call <SID>opfunc(visualmode(),visualmode() ==# 'V' ? 1 : 0)<CR>
|
||||||
vnoremap <silent> <Plug>VgSurround :<C-U>call <SID>opfunc(visualmode(),visualmode() ==# 'V' ? 0 : 1)<CR>
|
vnoremap <silent> <Plug>VgSurround :<C-U>call <SID>opfunc(visualmode(),visualmode() ==# 'V' ? 0 : 1)<CR>
|
||||||
inoremap <silent> <Plug>Isurround <C-R>=<SID>insert()<CR>
|
inoremap <silent> <Plug>Isurround <C-R>=<SID>insert()<CR>
|
||||||
|
Loading…
Reference in New Issue
Block a user