aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoload/hints.vim8
-rw-r--r--plugin/casefmt.vim16
-rw-r--r--plugin/fall.vim20
-rw-r--r--plugin/hints.vim6
-rw-r--r--plugin/joiner.vim12
-rw-r--r--plugin/subwords.vim24
-rw-r--r--plugin/supert.vim42
7 files changed, 61 insertions, 67 deletions
diff --git a/autoload/hints.vim b/autoload/hints.vim
index 5a74386..7ab8797 100644
--- a/autoload/hints.vim
+++ b/autoload/hints.vim
@@ -54,7 +54,7 @@ function! s:display_hints(hints) abort
"call nvim_buf_set_virtual_text(
" \ 0, g:hints_ns, line - 1, [[tag, "Number"]], {})
- exec printf("sign define tag_%s text=%s texthl=LineNr", tag, tag)
+ exec printf("sign define tag_%s text=%s texthl=Number", tag, tag)
exec printf("sign place %d line=%d name=tag_%s file=%s", s, line, tag, expand('%:p'))
let s += 1
@@ -97,10 +97,10 @@ function! hints#runHints(visual) abort
let line = get(hints, nr2char(c1) . nr2char(c2), -1)
if line >= 0
- norm m'
- if len(a:visual)
- exec "norm gv"
+ if a:visual == 'o'
+ norm! V
endif
+ norm m'
call cursor(line, 1)
norm ^
endif
diff --git a/plugin/casefmt.vim b/plugin/casefmt.vim
index fb271b5..3717925 100644
--- a/plugin/casefmt.vim
+++ b/plugin/casefmt.vim
@@ -45,16 +45,16 @@ let s:case_fmts = {
function! CaseFmt_AddFormat(key, funcname) abort
exec printf("noremap <silent> <Plug>(casefmt-leader-no-set)%s "
- \ . ":\<C-u>let g:CaseFmtFunction=function(\"\<SID>%s\")<cr>"
- \ . ":\<C-u>set operatorfunc=\<SID>casefmt_do<cr>g@", a:key, a:funcname)
+ \ . "<cmd>let g:CaseFmtFunction=function(\"\<SID>%s\")<cr>"
+ \ . "<cmd>set operatorfunc=\<SID>casefmt_do<cr>g@", a:key, a:funcname)
exec printf("vnoremap <silent> <Plug>(casefmt-leader-no-set)%s "
- \ . ":\<C-u>let g:CaseFmtFunction=function(\"\<SID>%s\")<cr>"
- \ . ":\<C-u>call \<SID>casefmt_do(visualmode(), 1)<cr>", a:key, a:funcname)
+ \ . "<cmd>let g:CaseFmtFunction=function(\"\<SID>%s\")<cr>"
+ \ . "<cmd>call \<SID>casefmt_do(visualmode(), 1)<cr>", a:key, a:funcname)
endfunction
-nmap <silent> <Plug>(casefmt-leader) :<C-u>let g:CaseFmtProcessor=function("<SID>casefmt_default_processor")<cr><Plug>(casefmt-leader-no-set)
-vmap <silent> <Plug>(casefmt-leader) :<C-u>let g:CaseFmtProcessor=function("<SID>casefmt_default_processor")<cr>gv<Plug>(casefmt-leader-no-set)
+nmap <silent> <Plug>(casefmt-leader) <cmd>let g:CaseFmtProcessor=function("<SID>casefmt_default_processor")<cr><Plug>(casefmt-leader-no-set)
+vmap <silent> <Plug>(casefmt-leader) <cmd>let g:CaseFmtProcessor=function("<SID>casefmt_default_processor")<cr>gv<Plug>(casefmt-leader-no-set)
for [k, v] in items(s:case_fmts)
call CaseFmt_AddFormat(k, v)
@@ -65,8 +65,8 @@ if g:casefmt_include_bindings
exec printf("vmap <silent> %s <Plug>(casefmt-leader)", g:casefmt_leader)
endif
-nmap <silent> <Plug>(casefmt-leader)j :<C-u>let g:CaseFmtProcessor=function("<SID>casefmt_joiner")<cr><Plug>(casefmt-leader-no-set)
-vmap <silent> <Plug>(casefmt-leader)j :<C-u>let g:CaseFmtProcessor=function("<SID>casefmt_joiner")<cr>gv<Plug>(casefmt-leader-no-set)
+nmap <silent> <Plug>(casefmt-leader)j <cmd>let g:CaseFmtProcessor=function("<SID>casefmt_joiner")<cr><Plug>(casefmt-leader-no-set)
+vmap <silent> <Plug>(casefmt-leader)j <cmd>let g:CaseFmtProcessor=function("<SID>casefmt_joiner")<cr>gv<Plug>(casefmt-leader-no-set)
function! s:casefmt_do(type, ...) abort
if a:0
diff --git a/plugin/fall.vim b/plugin/fall.vim
index 05d4e6e..8aec2c0 100644
--- a/plugin/fall.vim
+++ b/plugin/fall.vim
@@ -3,34 +3,34 @@ noremap <expr> <silent> <leader>k fall#fall('k', '^\s*$')
noremap <expr> <silent> <leader>j fall#fall('j', '^\s*$')
" Text object to fall through whitepacea
-onoremap <silent> <leader>k :<c-u>exec "normal! V" . fall#fall('k', '^\s*$')<cr>
-onoremap <silent> <leader>j :<c-u>exec "normal! V" . fall#fall('j', '^\s*$')<cr>
+onoremap <silent> <leader>k <cmd>exec "normal! V" . fall#fall('k', '^\s*$')<cr>
+onoremap <silent> <leader>j <cmd>exec "normal! V" . fall#fall('j', '^\s*$')<cr>
" Text object to fall though whitespace, but exclude the last line.
-onoremap <silent> i<leader>k :<c-u>exec "normal! V" . fall#fall('k', '^\s*$') . "j"<cr>
-onoremap <silent> i<leader>j :<c-u>exec "normal! V" . fall#fall('j', '^\s*$') . "k"<cr>
+onoremap <silent> i<leader>k <cmd>exec "normal! V" . fall#fall('k', '^\s*$') . "j"<cr>
+onoremap <silent> i<leader>j <cmd>exec "normal! V" . fall#fall('j', '^\s*$') . "k"<cr>
" Text object to fall though whitespace, but exclude the last line.
-onoremap <silent> i<leader>k :<c-u>exec "normal! V" . fall#fall('k', '^\s*$') . "j"<cr>
-onoremap <silent> i<leader>j :<c-u>exec "normal! V" . fall#fall('j', '^\s*$') . "k"<cr>
+onoremap <silent> i<leader>k <cmd>exec "normal! V" . fall#fall('k', '^\s*$') . "j"<cr>
+onoremap <silent> i<leader>j <cmd>exec "normal! V" . fall#fall('j', '^\s*$') . "k"<cr>
" Text objects to describe "falling" down, and then "falling" up. Equivalent to
" V<leader>kO<leader>j
-onoremap <silent> ai :<c-u>exec "normal! V"
+onoremap <silent> ai <cmd>exec "normal! V"
\ . fall#fall('j', '^\s*$')
\ . "O"
\ . fall#fall('k', '^\s*$') <cr>
-onoremap <silent> ii :<c-u>exec "normal! V"
+onoremap <silent> ii <cmd>exec "normal! V"
\ . fall#fall('j', '^\s*$')
\ . "kO"
\ . fall#fall('k', '^\s*$') . 'j' <cr>
-vnoremap <silent> ai :<c-u>exec "normal! gv"
+vnoremap <silent> ai <cmd>exec "normal! gv"
\ . fall#fall('j', '^\s*$')
\ . "O"
\ . fall#fall('k', '^\s*$') <cr>
-vnoremap <silent> ii :<c-u>exec "normal! gv"
+vnoremap <silent> ii <cmd>exec "normal! gv"
\ . fall#fall('j', '^\s*$')
\ . "kO"
\ . fall#fall('k', '^\s*$') . 'j' <cr>
diff --git a/plugin/hints.vim b/plugin/hints.vim
index 47282ad..c962a75 100644
--- a/plugin/hints.vim
+++ b/plugin/hints.vim
@@ -1,3 +1,3 @@
-noremap <silent> <C-f> :<C-u>call hints#runHints("")<cr>
-onoremap <silent> <C-f> :<C-u> call hints#runHints("V")<cr>
-vnoremap <silent> <C-f> :<C-u> call hints#runHints("V")<cr>
+noremap <silent> <C-f> <cmd>call hints#runHints("")<cr>
+onoremap <silent> <C-f> <cmd>call hints#runHints("o")<cr>
+vnoremap <silent> <C-f> <cmd>call hints#runHints("")<cr>
diff --git a/plugin/joiner.vim b/plugin/joiner.vim
index 26cb5a3..5345fbe 100644
--- a/plugin/joiner.vim
+++ b/plugin/joiner.vim
@@ -23,13 +23,13 @@ if ! exists('g:joiner_leader')
let g:joiner_leader = '<C-j>'
endif
-noremap <silent> <Plug>(joiner)s :<c-u>let g:JoinerJoinText=function('joiner#join_with_string')<cr>:<c-u>set operatorfunc=joiner#do<cr>g@
-noremap <silent> <Plug>(joiner)S :<c-u>let g:JoinerJoinText=function('joiner#join_with_string_literal')<cr>:<c-u>set operatorfunc=joiner#do<cr>g@
-noremap <silent> <Plug>(joiner) :<c-u>let g:JoinerJoinText=function('joiner#default_join')<cr>:<c-u>set operatorfunc=joiner#do<cr>g@
+noremap <silent> <Plug>(joiner)s <cmd>let g:JoinerJoinText=function('joiner#join_with_string')<cr><cmd>set operatorfunc=joiner#do<cr>g@
+noremap <silent> <Plug>(joiner)S <cmd>let g:JoinerJoinText=function('joiner#join_with_string_literal')<cr><cmd>set operatorfunc=joiner#do<cr>g@
+noremap <silent> <Plug>(joiner) <cmd>let g:JoinerJoinText=function('joiner#default_join')<cr><cmd>set operatorfunc=joiner#do<cr>g@
-vnoremap <silent> <Plug>(joiner)s :<c-u>let g:JoinerJoinText=function('joiner#join_with_string')<cr>gv:<c-u>call joiner#do(visualmode(), 1)<cr>
-vnoremap <silent> <Plug>(joiner)S :<c-u>let g:JoinerJoinText=function('joiner#join_with_string_literal')<cr>gv:<c-u>call joiner#do(visualmode(), 1)<cr>
-vnoremap <silent> <Plug>(joiner)<space> :<c-u>let g:JoinerJoinText=function('joiner#default_join')<cr>gv:<c-u>call joiner#do(visualmode(), 1)<cr>
+vnoremap <silent> <Plug>(joiner)s <cmd>let g:JoinerJoinText=function('joiner#join_with_string')<cr>gv<cmd>call joiner#do(visualmode(), 1)<cr>
+vnoremap <silent> <Plug>(joiner)S <cmd>let g:JoinerJoinText=function('joiner#join_with_string_literal')<cr><cmd>call joiner#do(visualmode(), 1)<cr>
+vnoremap <silent> <Plug>(joiner)<space> <cmd>let g:JoinerJoinText=function('joiner#default_join')<cr><cmd>call joiner#do(visualmode(), 1)<cr>
if g:joiner_include_bindings
exec printf("vnoremap <silent> %s <Plug>(joiner)", g:joiner_leader)
diff --git a/plugin/subwords.vim b/plugin/subwords.vim
index 067eb2c..4b95ddd 100644
--- a/plugin/subwords.vim
+++ b/plugin/subwords.vim
@@ -8,10 +8,10 @@
" of snake_case identifier will include the underscores (_). The 'i_' references
" the ci_
-onoremap <silent> <Plug>(inner-sub-word) :<c-u>exec "norm " . subwords#visual(v:true, v:false)<cr>
-vnoremap <silent> <Plug>(inner-sub-word) :<c-u>exec "norm " . subwords#visual(v:true, v:false)<cr>
-onoremap <silent> <Plug>(around-sub-word) :<c-u>exec "norm " . subwords#visual(v:true, v:true)<cr>
-vnoremap <silent> <Plug>(around-sub-word) :<c-u>exec "norm " . subwords#visual(v:true, v:true)<cr>
+onoremap <silent> <Plug>(inner-sub-word) <cmd>exec "norm " . subwords#visual(v:true, v:false)<cr>
+vnoremap <silent> <Plug>(inner-sub-word) <cmd>exec "norm " . subwords#visual(v:true, v:false)<cr>
+onoremap <silent> <Plug>(around-sub-word) <cmd>exec "norm " . subwords#visual(v:true, v:true)<cr>
+vnoremap <silent> <Plug>(around-sub-word) <cmd>exec "norm " . subwords#visual(v:true, v:true)<cr>
if ! exists('g:subwords_include_bindings')
let g:subwords_include_bindings = 1
@@ -19,18 +19,18 @@ endif
" These mappings are the same as above, except prefer_camel is turned off, so
" snake case is used in the case of a conflict.
-onoremap <silent> <Plug>(inner-sub-word-prefer-snake) :<c-u>exec "norm " . subwords#visual(v:false, v:false)<cr>
-vnoremap <silent> <Plug>(inner-sub-word-prefer-snake) :<c-u>exec "norm " . subwords#visual(v:false, v:false)<cr>
-onoremap <silent> <Plug>(around-sub-word-prefer-snake) :<c-u>exec "norm " . subwords#visual(v:false, v:true)<cr>
-vnoremap <silent> <Plug>(around-sub-word-prefer-snake) :<c-u>exec "norm " . subwords#visual(v:false, v:true)<cr>
+onoremap <silent> <Plug>(inner-sub-word-prefer-snake) <cmd>exec "norm " . subwords#visual(v:false, v:false)<cr>
+vnoremap <silent> <Plug>(inner-sub-word-prefer-snake) <cmd>exec "norm " . subwords#visual(v:false, v:false)<cr>
+onoremap <silent> <Plug>(around-sub-word-prefer-snake) <cmd>exec "norm " . subwords#visual(v:false, v:true)<cr>
+vnoremap <silent> <Plug>(around-sub-word-prefer-snake) <cmd>exec "norm " . subwords#visual(v:false, v:true)<cr>
" Movement keys for subwords. These all have prefer_camel set to true, the idea
" being it's pretty easy to navigate underscores with f_ and t_, but more
" difficult to navigate upper case letters.
-noremap <silent> <Plug>(next-subword) :<c-u>silent! call subwords#next(v:false, v:true)<cr>
-noremap <silent> <Plug>(prev-subword) :<c-u>silent! call subwords#next(v:false, v:false)<cr>
-vnoremap <expr> <silent> <Plug>(next-subword) visualmode() . ":\<c-u>silent! call subwords#next(visualmode(), v:true)\<cr>m'gv``"
-vnoremap <expr> <silent> <Plug>(prev-subword) visualmode() . ":\<c-u>silent! call subwords#next(visualmode(), v:false)<cr>m'gv``"
+noremap <silent> <Plug>(next-subword) <cmd>silent! call subwords#next(v:false, v:true)<cr>
+noremap <silent> <Plug>(prev-subword) <cmd>silent! call subwords#next(v:false, v:false)<cr>
+vnoremap <silent> <Plug>(next-subword) <cmd>silent! call subwords#next(visualmode(), v:true)<cr>
+vnoremap <silent> <Plug>(prev-subword) <cmd>silent! call subwords#next(visualmode(), v:false)<cr>
noremap <expr> <silent> <Plug>(subwords-replace-;) subwords#repeat(';')
noremap <expr> <silent> <Plug>(subwords-replace-,) subwords#repeat(',')
diff --git a/plugin/supert.vim b/plugin/supert.vim
index c32fc3e..f4a8e85 100644
--- a/plugin/supert.vim
+++ b/plugin/supert.vim
@@ -62,12 +62,6 @@ function! s:do_search_ch(type, vis, ch)
let pattern = pattern . '\zs\_.\ze'
endif
- if a:vis == 'v'
- exec "norm gv"
- elseif a:vis == 'o'
- exec "norm v"
- endif
-
let i = 0
while i < v:count1
call search(pattern, flags)
@@ -75,29 +69,29 @@ function! s:do_search_ch(type, vis, ch)
endwhile
endfunction
-nnoremap <Plug>(supert-replace-t) :<c-u>call <SID>do_search('t', '')<cr>
-nnoremap <Plug>(supert-replace-T) :<c-u>call <SID>do_search('T', '')<cr>
-nnoremap <Plug>(supert-replace-f) :<c-u>call <SID>do_search('f', '')<cr>
-nnoremap <Plug>(supert-replace-F) :<c-u>call <SID>do_search('F', '')<cr>
+nnoremap <Plug>(supert-replace-t) <cmd>call <SID>do_search('t', '')<cr>
+nnoremap <Plug>(supert-replace-T) <cmd>call <SID>do_search('T', '')<cr>
+nnoremap <Plug>(supert-replace-f) <cmd>call <SID>do_search('f', '')<cr>
+nnoremap <Plug>(supert-replace-F) <cmd>call <SID>do_search('F', '')<cr>
-vnoremap <Plug>(supert-replace-t) :<c-u>call <SID>do_search('t', 'v')<cr>
-vnoremap <Plug>(supert-replace-T) :<c-u>call <SID>do_search('T', 'v')<cr>
-vnoremap <Plug>(supert-replace-f) :<c-u>call <SID>do_search('f', 'v')<cr>
-vnoremap <Plug>(supert-replace-F) :<c-u>call <SID>do_search('F', 'v')<cr>
+vnoremap <Plug>(supert-replace-t) <cmd>call <SID>do_search('t', 'v')<cr>
+vnoremap <Plug>(supert-replace-T) <cmd>call <SID>do_search('T', 'v')<cr>
+vnoremap <Plug>(supert-replace-f) <cmd>call <SID>do_search('f', 'v')<cr>
+vnoremap <Plug>(supert-replace-F) <cmd>call <SID>do_search('F', 'v')<cr>
-onoremap <Plug>(supert-replace-t) :<c-u>call <SID>do_search('t', 'o')<cr>
-onoremap <Plug>(supert-replace-T) :<c-u>call <SID>do_search('T', 'o')<cr>
-onoremap <Plug>(supert-replace-f) :<c-u>call <SID>do_search('f', 'o')<cr>
-onoremap <Plug>(supert-replace-F) :<c-u>call <SID>do_search('F', 'o')<cr> ;
+onoremap <Plug>(supert-replace-t) <cmd>call <SID>do_search('t', 'o')<cr>
+onoremap <Plug>(supert-replace-T) <cmd>call <SID>do_search('T', 'o')<cr>
+onoremap <Plug>(supert-replace-f) <cmd>call <SID>do_search('f', 'o')<cr>
+onoremap <Plug>(supert-replace-F) <cmd>call <SID>do_search('F', 'o')<cr>
-onoremap <Plug>(supert-replace-,) :<c-u>call <SID>do_search(',', 'o')<cr>
-onoremap <Plug>(supert-replace-;) :<c-u>call <SID>do_search(';', 'o')<cr>
+onoremap <Plug>(supert-replace-,) <cmd>call <SID>do_search(',', 'o')<cr>
+onoremap <Plug>(supert-replace-;) <cmd>call <SID>do_search(';', 'o')<cr>
-vnoremap <Plug>(supert-replace-,) :<c-u>call <SID>do_search(',', 'v')<cr>
-vnoremap <Plug>(supert-replace-;) :<c-u>call <SID>do_search(';', 'v')<cr>
+vnoremap <Plug>(supert-replace-,) <cmd>call <SID>do_search(',', 'v')<cr>
+vnoremap <Plug>(supert-replace-;) <cmd>call <SID>do_search(';', 'v')<cr>
-nnoremap <Plug>(supert-replace-,) :<c-u>call <SID>do_search(',', '')<cr>
-nnoremap <Plug>(supert-replace-;) :<c-u>call <SID>do_search(';', '')<cr>
+nnoremap <Plug>(supert-replace-,) <cmd>call <SID>do_search(',', '')<cr>
+nnoremap <Plug>(supert-replace-;) <cmd>call <SID>do_search(';', '')<cr>
if g:supert_provide_bindings