SungHyun Nam wrote:

I could not find a way to avoid the error.

$ cat .vimrc
set nocp
nmap <buffer> ,nc :let @x='0ct*<tab>abcd <esc>f;i)<esc>+'<cr>
$ LANG= vim -u .vimrc -U NONE --noplugin

If I typed ',nc', then I've got error message.

E115: Missing quote: '0ct*^Iabcd
E15: Invalid expression: '0ct*^Iabcd
Press ENTER or type command to continue

Thanks in advance.


Well, after ":let @x =" you're opening a single-quoted string. But when the mapping is expanded, <esc> is expanded to the Esc keystrokes, which interrupts the ":let" statement. Try replacing <esc> by ^V^V^[ which is entered by hitting Ctrl-V five times and then Esc. See ":help using_CTRL-V".

Best regards,

Reply via email to