diff options
| author | Josh Rahm <rahm@google.com> | 2022-09-01 12:18:37 -0600 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2022-09-01 12:18:37 -0600 |
| commit | 45cfa4a0a16a31fd2a94e6ac7187e452287bbcf2 (patch) | |
| tree | f5ea57dba99122a2246ab0007a75cb1c61fe28a7 /plugin/subwords.vim | |
| parent | 72d93b67cf4424aaa6b0fd2931fd691219149359 (diff) | |
| download | fieldmarshal.vim-45cfa4a0a16a31fd2a94e6ac7187e452287bbcf2.tar.gz fieldmarshal.vim-45cfa4a0a16a31fd2a94e6ac7187e452287bbcf2.tar.bz2 fieldmarshal.vim-45cfa4a0a16a31fd2a94e6ac7187e452287bbcf2.zip | |
fieldmarshal.vim: use <cmd> instead of :<c-u> to fix some bugs.
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(',') |