Add vim asterisk surround operator
This commit is contained in:
parent
b943911c14
commit
d5d5604ff7
1 changed files with 7 additions and 4 deletions
11
vimrc
11
vimrc
|
@ -652,6 +652,13 @@ function! s:backtick_op(type)
|
||||||
endf
|
endf
|
||||||
nnoremap <leader>` :<C-U>set operatorfunc=<SID>backtick_op<CR>g@
|
nnoremap <leader>` :<C-U>set operatorfunc=<SID>backtick_op<CR>g@
|
||||||
vnoremap <leader>` :<C-U>call <SID>vsurround("`", "`")<CR>
|
vnoremap <leader>` :<C-U>call <SID>vsurround("`", "`")<CR>
|
||||||
|
|
||||||
|
function! s:asterisk_op(type)
|
||||||
|
normal `[m<`]m>
|
||||||
|
call <SID>surround(a:type, "*", "*")
|
||||||
|
endf
|
||||||
|
nnoremap <leader>* :<C-U>set operatorfunc=<SID>asterisk_op<CR>g@
|
||||||
|
vnoremap <leader>* :<C-U>call <SID>vsurround("*", "*")<CR>
|
||||||
" --- END OF SURROUND MAPPINGS ---
|
" --- END OF SURROUND MAPPINGS ---
|
||||||
|
|
||||||
nnoremap <S-l> :L<cr>
|
nnoremap <S-l> :L<cr>
|
||||||
|
@ -715,10 +722,6 @@ nnoremap [p :let [content, type]=
|
||||||
nnoremap <leader><CR> o0
|
nnoremap <leader><CR> o0
|
||||||
nnoremap <leader><leader><CR> O0
|
nnoremap <leader><leader><CR> O0
|
||||||
|
|
||||||
" Markdown Stuff
|
|
||||||
vnoremap * <C-c>`>a*<C-c>`<i*<C-c>
|
|
||||||
vnoremap _ <C-c>`>a__<C-c>`<i__<C-c>
|
|
||||||
|
|
||||||
" === GENERAL ABBREVIATIONS ===
|
" === GENERAL ABBREVIATIONS ===
|
||||||
cabbr rcpath fnamemodify($MYVIMRC, ":p:h")
|
cabbr rcpath fnamemodify($MYVIMRC, ":p:h")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue