vim-subversive
vim-subversive copied to clipboard
Subversive doesn't work correctly with langmap
Thanks for making this awesome plugin, it's one of the very best I know!
I've noticed that setting langmap
(which can be used to swap keys in normal mode e.g. to accomodate a custom keyboard layout) breaks subversive. Here's a minimal configuration:
" Manage plugins with Vim-Plug (github.com/junegunn/vim-plug)
call plug#begin('~/.vim/plugged')
Plug 'svermeulen/vim-cutlass'
Plug 'svermeulen/vim-subversive'
call plug#end()
set langmap=de,DE,ed,ED
nmap s <plug>(SubversiveSubstitute)
nmap ss <plug>(SubversiveSubstituteLine)
nmap S <plug>(SubversiveSubstituteToEndOfLine)
Observed behavior:
- cannot subsitute a word (
sw
,siW
etc.) - substituting a line requires pressing
s
4 times
Note that the langmap doesn't touch s
key at all. I guess it has something to do with using d
motion internally... I would be very grateful for a fix, subversive is awesome but I need to use langmap
as well because I have a custom keyboard.
PS Vim version:
$ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Mar 18 2020 18:29:15)
Included patches: 1-1453
Modified by [email protected]
Compiled by [email protected]
Hmm I tried using your minimal configuration with terminal neovim and was unable to reproduce it
Indeed, it works in neovim. Perhaps I should make the switch... Is there a chance you could try making it work with original vim, too? It would be great to have portable configuration.
Honestly I'm not sure if I'll have time to look into this further. It sounds like it might be tricky given that neovim apparently fixed the problem