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 - (张小潘)
_______________________________________________ screen-users mailing list screen-users@gnu.org https://lists.gnu.org/mailman/listinfo/screen-users