Skip to content

Subversive doesn't work correctly with langmap #19

Open
@jan-warchol

Description

@jan-warchol

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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions