Can no longer remap <Plug>SpeedDatingUp if mapping C-a or C-x
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.
Does something like this fix it?
nnoremap <Plug>SpeedDatingFallbackUp <C-A>
nnoremap <Plug>SpeedDatingFallbackDown <C-X>
Looks like it does. Could that be the default value if g:speeddating_no_mappings == 1 ?
Doesn't fix mswin either.
Feels to me like integrating with other plugins should be an option instead of the default. But I can go with your solution if you want to close.
I don't really want to change that now, but I'd entertain special casing for not chaining to gggH<C-O>G, or something like that.