1

I use langmap to be able to use QWERTY-like layout for normal mode, and Bépo to input text.

Key      |      Usage
 y   maps to    x
 ç   maps to    y

However, I can’t use vim-surround to add surroundings with this config :

  • ç does nothing
  • y deletes the character under cursor (as expected).

Question
How can I configure vim-surround so that I can use ç instead of y to add surroundings ?

Thanks a lot !

1
  • 1
    Are you sure ç does nothing? The surround mappings are ds, cs, ys... so you may need ç followed by your langmapped s – D. Ben Knoble Sep 4 '20 at 13:26
1

langmap has a bug -- multiletter mappings do not work

You can use keymap instead (and internal keymap switcher).

Well, if you want to have your own mappings anyway, check vim-surround:

https://github.com/tpope/vim-surround/blob/f51a26d3710629d031806305b6c8727189cd1935/plugin/surround.vim#L603

For your example it might be smth like:

nmap çs  <Plug>Ysurround

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.