I'm trying to use vim-repeat
with a <Plug>
that camel cases text:
nnoremap <silent> <Plug>CamelCase _ f_x~
\:call repeat#set("\<Plug>CamelCase")<CR>
nmap _ <Plug>CamelCase
This works fine for the most part, but in some cases it jumps to the beginning of the text and updates there:
function _noResponsesMessage(status_group) {
Even if I have my cursor at the beginning of status_group
, it jumps to the beginning of the text and swaps there instead:
function NoResponsesMessage(status_group) {
Oddly, if I don't do this <Plug>
setup and instead nmap
it directly it works as expected:
nmap _ f_x~
Result as desired:
function _noResponsesMessage(statusGroup) {
Why does the first approach jump to the beginning of the line and the other replaces after the cursor?