Wednesday, November 29, 2017

Re: mapping error.

On Wed, Nov 29, 2017 at 11:06:19PM -0800, sinbad wrote:
> I'm trying to map <space>x in normal mode to do send a command to a pane in tmux.
>
> sudo tmux send-keys -t "1" C-z "test"
>
> I tried the following. wrote the above command in a test.sh file and made a mapping as below.
>
> :nnoremap <Space>x 'silent :!./test.sh<C-m>'
>
> I'm getting the following error.
>
> E20: Mark not set
>
> i think it's due to the following mapping.
>
> n ' & :call Showmarks() <CR>
>
> Isn't nnoremap disable recursive mapping ?

AFAICS recursive mapping /is/ disabled head. You're getting the error message
because Vim tries to jump to a mark s when hitting the first tick (') in the
right-hand side of your mapping. Furthermore, silent is AFAIK a command line
command, so your colon is misplaced. Untested:

:nnoremap <space>x :silent\ !./test.sh<c-m>

The backslash is for escaping the space.

Gruß,
fm-r

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: