airblade / vim-gitgutter

A Vim plugin which shows git diff markers in the sign column and stages/previews/undoes hunks and partial hunks.
MIT License
8.34k stars 296 forks source link

key map expr needs more backslashes? #889

Open ajrh1 opened 5 months ago

ajrh1 commented 5 months ago

vim: Debian VIM - Vi IMproved 9.1 vim-gitgutter: 67ef116100b40f9ca128196504a2e0bc0a2753b0

Seems strange I'm encountering this if nobody else is, but in the map expr lines such as nnoremap <silent> <expr> <Plug>(GitGutterNextHunk) [...] I needed to change the escape sequences such as \<CR> to \\\<CR>. Without adding extra backslashes I just get literal <CR> strings in the command buffer.

Patch attached in case HTML escaping also eats backslashes.

map.txt

airblade commented 5 months ago

That's weird. Those lines haven't changed for years and I don't have any trouble with Vim 9.1 on macOS.

Not sure how to proceed...perhaps leave this here and wait to see if anyone else is affected?