From 45cfa4a0a16a31fd2a94e6ac7187e452287bbcf2 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Thu, 1 Sep 2022 12:18:37 -0600 Subject: fieldmarshal.vim: use instead of : to fix some bugs. --- plugin/subwords.vim | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'plugin/subwords.vim') 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 (inner-sub-word) :exec "norm " . subwords#visual(v:true, v:false) -vnoremap (inner-sub-word) :exec "norm " . subwords#visual(v:true, v:false) -onoremap (around-sub-word) :exec "norm " . subwords#visual(v:true, v:true) -vnoremap (around-sub-word) :exec "norm " . subwords#visual(v:true, v:true) +onoremap (inner-sub-word) exec "norm " . subwords#visual(v:true, v:false) +vnoremap (inner-sub-word) exec "norm " . subwords#visual(v:true, v:false) +onoremap (around-sub-word) exec "norm " . subwords#visual(v:true, v:true) +vnoremap (around-sub-word) exec "norm " . subwords#visual(v:true, v:true) 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 (inner-sub-word-prefer-snake) :exec "norm " . subwords#visual(v:false, v:false) -vnoremap (inner-sub-word-prefer-snake) :exec "norm " . subwords#visual(v:false, v:false) -onoremap (around-sub-word-prefer-snake) :exec "norm " . subwords#visual(v:false, v:true) -vnoremap (around-sub-word-prefer-snake) :exec "norm " . subwords#visual(v:false, v:true) +onoremap (inner-sub-word-prefer-snake) exec "norm " . subwords#visual(v:false, v:false) +vnoremap (inner-sub-word-prefer-snake) exec "norm " . subwords#visual(v:false, v:false) +onoremap (around-sub-word-prefer-snake) exec "norm " . subwords#visual(v:false, v:true) +vnoremap (around-sub-word-prefer-snake) exec "norm " . subwords#visual(v:false, v:true) " 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 (next-subword) :silent! call subwords#next(v:false, v:true) -noremap (prev-subword) :silent! call subwords#next(v:false, v:false) -vnoremap (next-subword) visualmode() . ":\silent! call subwords#next(visualmode(), v:true)\m'gv``" -vnoremap (prev-subword) visualmode() . ":\silent! call subwords#next(visualmode(), v:false)m'gv``" +noremap (next-subword) silent! call subwords#next(v:false, v:true) +noremap (prev-subword) silent! call subwords#next(v:false, v:false) +vnoremap (next-subword) silent! call subwords#next(visualmode(), v:true) +vnoremap (prev-subword) silent! call subwords#next(visualmode(), v:false) noremap (subwords-replace-;) subwords#repeat(';') noremap (subwords-replace-,) subwords#repeat(',') -- cgit