Hi Neal,

I tried to change my vim script by using the "readbuf" and "paste"
commands, and I immediately noticed that the message "Slurped XXX
characters into buffer" issued by the "readbuf" is very annoying, and it
actually pause the remote screen a little bit, I tried '-q' but it does not
help. How do you get rid of that issue?

On Tue, Sep 11, 2018 at 8:53 PM 张小潘 <zhangxiao...@gmail.com> wrote:

> Hi Neal,
>
> BTW, if you can answer the question in this thread,
> http://lists.gnu.org/archive/html/screen-users/2018-09/msg00003.html,
> that will be super helpful.
>
> Regards.
>
> On Tue, Sep 11, 2018 at 11:33 AM 张小潘 <zhangxiao...@gmail.com> wrote:
>
>> Hi Neal,
>>
>> Using 'readbuf' and 'paste' looks also very cool!
>>
>> On Tue, Sep 11, 2018 at 9:11 AM Neal Fultz <nfu...@gmail.com> wrote:
>>
>>> I have a similar vim shortcut - for me, instead of using the stuff
>>> command, I write to /tmp/screen-exchange, and then use readbuf and paste
>>> screen commands.  This also lets you send text containing multiple lines eg
>>> for python.
>>>
>>> On Tue, Sep 11, 2018 at 8:43 AM 张小潘 <zhangxiao...@gmail.com> wrote:
>>>
>>>> Hi there,
>>>>
>>>> I have been using GNU screen for many years and have some personal
>>>> modifications to make it work better in my environment. There is one change
>>>> I am looking for contribute back to main repository.
>>>>
>>>> Typically I have two monitors connected to my workstation, and I run
>>>> one screen session in a terminal window on each of these monitors.  One
>>>> screen is used to run a Vim session, another screen is used to run a bash
>>>> session.  The trick here is I wrote a Vim script so that in a special
>>>> buffer of the vim window, I can edit bash commands, and send these commands
>>>> to run on the screen window by using  "/usr/bin/screen -S <session> -p
>>>> <window> -X stuff <shell-command>", which is really handy. (I can share the
>>>> vim script if anybody wants to see, but that is not my main point here)
>>>>
>>>> One thing annoys me is that screen uses a predefined constant in the
>>>> source code to define the size to receive the remote command, that is:
>>>>
>>>>     http://git.savannah.gnu.org/cgit/screen.git/tree/src/screen.h#n44
>>>>     #define MAXSTR 768
>>>>
>>>>     http://git.savannah.gnu.org/cgit/screen.git/tree/src/socket.c#n1297
>>>>     char fullcmd[MAXSTR];
>>>>
>>>>     http://git.savannah.gnu.org/cgit/screen.git/tree/src/socket.c#n1309
>>>>     ...
>>>>     if (!(fc = strncpy_escape_quote(fc, p, fullcmd +
>>>> ARRAY_SIZE(fullcmd) - 2))) { /* '"' ' ' */
>>>>
>>>>      Msg(0, "Remote command too long.");
>>>>
>>>>    ...
>>>>
>>>> My shell commands are usually quite long (binary with dozens of command
>>>> line flags) and it can easily exceed the 768 limit. So in my local screen
>>>> source copy, I changed it to 16384, which works really well for me. As I
>>>> think in modern computers usually come up with several Gigabytes memory, 16
>>>> k is really a small number, so I am writing this email to see if I can
>>>> contribute this change back to screen main repository, and if yes, what is
>>>> the appropriate steps to do it.
>>>>
>>>> Regards.
>>>>
>>>> --
>>>> Xiaopan Zhang - (张小潘)
>>>> _______________________________________________
>>>> screen-users mailing list
>>>> screen-users@gnu.org
>>>> https://lists.gnu.org/mailman/listinfo/screen-users
>>>>
>>>
>>
>> --
>> Xiaopan Zhang - (张小潘)
>>
>
>
> --
> Xiaopan Zhang - (张小潘)
>


-- 
Xiaopan Zhang - (张小潘)
_______________________________________________
screen-users mailing list
screen-users@gnu.org
https://lists.gnu.org/mailman/listinfo/screen-users

Reply via email to