diff options
Diffstat (limited to 'plugin/subwords.vim')
-rw-r--r-- | plugin/subwords.vim | 24 |
1 files changed, 12 insertions, 12 deletions
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(',') |