Customize default key mapping
Hello. Is there an option in this plugin to change the default mappings to a different ones? I use 's' key as back motion (vanilla 'b') and would really like not to sacrifice combinations like ds, ys etc. in favor of this plugin.
Take a look at https://github.com/tpope/vim-surround/blob/master/plugin/surround.vim#L590 to see how the maps are defined. You can define your own in your .vimrc or some other script and disable the default maps by let g:surround_no_mappings=1
Thank you for your help. Then I think it is a documentation issue. I think it should be mentioned in the docs or readme
What if I want to change this line: https://github.com/tpope/vim-surround/blob/master/plugin/surround.vim#L140
Default: let pairs = "b()B{}r[]a<>"
For tihs: let pairs = "b()c{}s[]a<>"
So the s works for deleting (dss), for changing (cssb), for inserting (Ss), and so on.
I tried to remap with this: let b:surround_{char2nr('s')} = "[\r]", however I still have to use the r.
Is it possible to change deeply the default keymapping? Thanks.