vim-wordmotion icon indicating copy to clipboard operation
vim-wordmotion copied to clipboard

Warn users if they copied the example configurations from the README

Open artsiom-streetshares opened this issue 2 years ago • 3 comments

Hi there. Thanks for the useful plugin.

Though I noticed it doesn't work as I expect in the visual mode. If I press ve it still selects word as usual. This is my config

let g:wordmotion_nomap = 1
nmap w          <Plug>WordMotion_w
nmap b          <Plug>WordMotion_b
nmap gE         <Plug>WordMotion_gE
omap aW         <Plug>WordMotion_aW
cmap <C-R><C-W> <Plug>WordMotion_<C-R><C-W>

Could you guide me on how to resolve that? Thanks!

artsiom-streetshares avatar Apr 22 '22 20:04 artsiom-streetshares

I think you misunderstood the configuration options. let g:wordmotion_nomap = 1 disables the default mappings. You can remove all of that configuration and the plugin should just work.

chaoren avatar Apr 23 '22 00:04 chaoren

I've removed all of the example configurations. The text descriptions should be good enough for anyone who actually wants them. Most users should just want the default mappings and do not actually need any configuration. I'll try to detect if the user copied the configurations exactly as-is from the README and warn them about it. I might as well also warn them if they still have the obsolete cw and dw mappings that were recommended ages ago.

chaoren avatar Apr 23 '22 00:04 chaoren

@chaoren heey, thank you so much! yeah, I don't know why decided the config is required, works great out of the box.

artsiom-streetshares avatar Apr 25 '22 08:04 artsiom-streetshares