Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subversive doesn't work correctly with langmap #19

Open
jan-warchol opened this issue Apr 26, 2020 · 3 comments
Open

Subversive doesn't work correctly with langmap #19

jan-warchol opened this issue Apr 26, 2020 · 3 comments

Comments

@jan-warchol
Copy link

jan-warchol commented Apr 26, 2020

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]
@svermeulen
Copy link
Owner

Hmm I tried using your minimal configuration with terminal neovim and was unable to reproduce it

@jan-warchol
Copy link
Author

jan-warchol commented Apr 26, 2020

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.

@svermeulen
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants