Skip to content

Can no longer remap <Plug>SpeedDatingUp if mapping C-a or C-x #36

@idbrii

Description

@idbrii

I remap increment/decrement and use C-a for select all. The addition of integration with other increment plugins in a418667 breaks user remapping of SpeedDating commands.

" .vimrc
let g:speeddating_no_mappings = 1

" .vim/plugin/speeddating-david.vim
if exists("g:loaded_speeddating") && g:loaded_speeddating
	nmap  <C-x><C-s>     <Plug>SpeedDatingUp
	nmap  <C-x><C-x>     <Plug>SpeedDatingDown
endif


:Verbose nmap <c-x>

n  <C-X><C-X>    <Plug>SpeedDatingDown
	Last set from ~/.vim/after/plugin/speeddating-david.vim line 6
n  <C-X><C-S>    <Plug>SpeedDatingUp
	Last set from ~/.vim/after/plugin/speeddating-david.vim line 5

Inserting a 0, leaving insert mode, executing <C-X><C-X> does not increment the 0. Instead, it selects some portion of the buffer.

The SpeedDatingFallback definition is assuming that anything mapped to C-a or C-x is for inc/decrement. But for me it's not:

:Verbose ec maparg('<C-A>', 'n')
1GVG

I'd assume the same is true for users of mswin.vim too.

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