On Thu, Nov 30, 2017 at 08:32:17AM +0100, Florian Rehnisch wrote:
> 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 ?
>
here..
> 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.
Ah, the backslash gives another error (E10).
:nnoremap <space>x :silent !./test.sh<c-m>
Should do the trick.
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.
Wednesday, November 29, 2017
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment