The command is
nnoremap <leader>; :execute "normal! mqA;\<esc>`q"
If you then press
<leader>;, you will
E114: Missing quote: "normal! mqA;\ followed by
E15: Invalid expression: "normal! mqA;\. Why is this? The command works fine if input directly into the commandline.
The command adds a
; at the end of the current line, without changing the cursors position.
I realise that I can just do
nnoremap <leader>; mqA;<esc>`q which works, the question is why the above doesn't work, and what can be done to make it work in the execute-normal form.
My guess would be that some level of nested escaping is needed, but I couldn't find one that works.