I have this mapping to surround a Word with jQuery id selector $("#...")
and it works fine using a command:
command! JqId normal viwo^[i#^[ysiW"ysiW)i$^[Ennoremap <Leader>jqid :JqId<CR>
But I cannot make it works only with the mapping, it inserts the $
sign, but the vim-surround commands do nothing:
nnoremap <silent> <Leader>jqid viwo^[i#^[ysiW"ysiW)i$^[E
I also tried this (for testing purposes) and it doesn't work either:
nnoremap <silent> <Leader>jqid ysiW"
Any hint? Thanks!