Christian J. Robinson wrote:

> I remotely send ^\^N to Vim to invoke a user-defined command on a 
> regular basis.  Unfortunately, when the cursor is in a terminal window 
> it just sends the control characters directly to the shell (along with 
> the command).

I suppose you don't run Vim in the terminal window.  Or, if you did, you
would sent the keys to that Vim instance.

I was hoping to keep the number of exceptions minimal, but you have a
good point that for remote commands you need C-\ C-N to work.  I assume
what follows is not specific for the current window but something

> I know ^W: exists, but I can't think of any good way to detect whether 
> I should be sending that instead (under Windows, --remote-expr 
> "&buftype" only gives me an error window from the running vim instance 
> and fails to return anything, which doesn't look like correct 
> behavior).

We can accept CTRL-\ CTRL-N to execute a Normal mode command, but what
happens next?  Does the terminal go back to send keys to the terminal,
or would it be in Terminal Normal mode, where you execute more Vim
commands until "i" is typed.

With your remote command you most likely don't want to change the mode
in the terminal window.  So we would support only one Normal mode
command.  Would that work?  Or do you expect to be in Normal mode, where
a sequence of commands can be used?

We can start by making CTRL-\ CTRL-N work as a prefix for one Normal
mode command.

CRONE:  Who sent you?
ARTHUR: The Knights Who Say Ni!
CRONE:  Aaaagh!  (she looks around in rear) No!  We have no shrubberies here.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- --   \\\
///        sponsor Vim, vote for features -- \\\
\\\  an exciting new programming language --        ///
 \\\            help me help AIDS victims --    ///

You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit

You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Raspunde prin e-mail lui