iTerm2's mouseless copy has worked pretty well and might serve as a basis for a similar feature here. Here's how it works: You press Cmd-F and you get a search box (like Chrome or Firefox). Type some text that matches what you want to copy. Pressing enter advances to the next match, shift-enter to the previous match. You can press tab to extend the selection to the right, or shift-tab to extend it to the left. It extends word-by-word, where word boundaries are user-defined. The selection is automatically copied to the clipboard when you extend it.
It's a little more typing than this proposal, but it's quite a bit simpler to use. > Message: 2 > Date: Thu, 26 Jan 2012 08:59:36 +0000 > From: Nicholas Marriott <nicholas.marri...@gmail.com> > Subject: Re: [patch] Selection with keyboard > To: unDEFER <unde...@gmail.com> > Cc: tmux-users@lists.sourceforge.net > Message-ID: <20120126085936.ga1...@yelena.nicm.ath.cx> > Content-Type: text/plain; charset=us-ascii > > This idea is nice, but I'm not sure about your implementation: > > I think the user interface is too unclear. I read your description and > tried to use this and I couldn't figure out what I was selecting at all. > > If I was doing this I think there are two ways I would consider making > it work... > > 1) It could split the screen into a grid and allow you to select, > so first it would give you: > > 0 1 2 3 4 5 .... > mytext here > more text here and here > another line > > You press 0 and it highlights column from 0-1, then gives youL > > 01234 > mytex > > You then press 2,3 to select the range of columns 2-3. And then the > same for the rows. So 4 keys to select any rectangular region on > screen (it could work by cell or by word). > > 2) It walks the whole screen and gives each word a key and prints > the character, so something like: > > 0ytext 1ere > 2ore 3ext 4ere 5nd 6ere > 7another 8ine > > Then you press 0,2 to select all text between the m in "mytext" and > the e in "more". It highlights that then you press Enter or C-w or > whatever to do the copy. So two or three keys to select any region > between two words on screen. > > I like the second way, which I think is sort of what your code does. > > In either case, the keys should run 0-9a-zA-z then meta+0-9a-zA-z then > the symbols last. > > Also you should use mode-bg and mode-fg I think not fixed blue > colours. There is an existing word-separators option too. > > > > On Thu, Jan 26, 2012 at 08:36:08AM +0400, unDEFER wrote: >> Hello! >> For the last time I'm trying to use only console applications on my >> Linux system (links as browser, mutt as e-mail client, barnowl as jabber >> client etc...). And tmux is excellent terminal multiplexer. >> Only one thing I dislike is that there is in more times faster use mouse >> to copy&paste. >> >> And I have decided this problem for me. This patch will be public as >> part of my http://unde.su project, but it will excellent if tmux >> developers can take it into the main branch. >> >> So my patch adds 2 commands into copy mode: >> start-char-selection-with-keys & start-word-selection-with-keys. >> >> 2 options to `copy-mode` command: >> -c & -w which accordingly execute start-char-selection-with-keys & >> start-word-selection-with-keys after entering to copy-mode. >> >> and 2 default keys for vi-mode of copy mode (I didn't add ones for >> emacs-mode only because I'm user of Vim). >> z & x which accordingly execute start-char-selection-with-keys & >> start-word-selection-with-keys. >> >> What do my commands? After executing one of these it prints some blue >> characters by vertical from "`" till " " (48 keys on a keyboard). >> And you have to press 2 keys to select the start and the end line of >> the selection. After it it prints characters by horizontal to select >> the start and the end column of the selection. After that the >> selection flash and the command exits from the copy mode. >> >> The difference of 2 commands that the "char-selection" makes key >> accrodings for each column, and "word-selection" makes it only for >> each word, white space sequences, and for each delimiter. >> >> If there is more 48 lines/columns/words it adds also to the first 48 >> characters the same shifted characters (from "~" till "Z" (which means >> Alt+Shift+Z, it is so only because I didn't find how to difference "Space" >> and "Shift+Space")). >> If there is more 96 lines/columns/words it adds also the same >> characters which must be pressed with "Alt" (it inverts this >> characters on screen). >> >> So by 4 keys you can select any text on the screen by constant time. >> I'm using the next .tmux.conf: >> >> bind -n M-c copy-mode -c >> bind -n M-w copy-mode -w >> bind -n M-v paste-buffer >> >> And I can copy&paste any text for 4-8 seconds. So sometimes it is also >> fast as copy&paste with mouse (which takes 3 seconds for one-word text). >> But really I yet not get accustomed to my own patch :-) So it will yet faster >> in several days. >> >> Thank you. >> >> -- >> Nikolay Krivchenkov a.k.a. unDEFER > > >> ------------------------------------------------------------------------------ >> Keep Your Developer Skills Current with LearnDevNow! >> The most comprehensive online learning library for Microsoft developers >> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, >> Metro Style Apps, more. Free future releases when you subscribe now! >> http://p.sf.net/sfu/learndevnow-d2d > >> _______________________________________________ >> tmux-users mailing list >> tmux-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/tmux-users > > > > > ------------------------------ > > Message: 3 > Date: Thu, 26 Jan 2012 14:37:35 +0400 > From: undefer <unde...@gmail.com> > Subject: Re: [patch] Selection with keyboard > To: Nicholas Marriott <nicholas.marri...@gmail.com> > Cc: tmux-users@lists.sourceforge.net > Message-ID: <20120126103735.GA8139@unDECOMP> > Content-Type: text/plain; charset=us-ascii > > I'm glad that you like the idea. And understand that it may be > not clear. But I have tried to implement it maximally effeciently. > > There is too many words on the screen and i think mark them all is not > too good. We can't to select columns before lines because for each > line must be different columns in each line. > > So I just try to show how it works. For example I have the next > terminal: > ________________________________________ > / Asking a working writer what he thinks \ > | about critics is like asking a | > | lamp-post how it feels about dogs. -- | > \ Christopher Hampton / > ---------------------------------------- > \ ^__^ > \ (oo)\_______ > (__)\ )\/\ > ||----w | > || || > > Lets select the "critics" word. I'm pressing "Alt+W" > ` ______________`_______________`________ > 1 Asking a worki1g writer what h1 thinks \ > 2 about critics 2s like asking a2 | > 3 lamp-post how 3t feels about d3gs. -- | > 4 Christopher Ha4pton 4 / > 5 --------------5---------------5-------- > 6 ......\ ^__^ > 7 .......\ (oo)7_______ > 8 ..........(__)8 )\/\ > 9 ..............9|----w | > 0 ..............0| || > > The line labels repeats each 16 columns to more easy find it with > eyes. So I have to press "2" to select the "about critics is like > asking a" line. I'm pressing "2" the first time (start line of selection), > then this line labels reverts to be sure that you do something, and > when press "2" the second time (end line of selection). > > After that I see: > ________________________________________ > `3 7 0 \ ru [ s g l zv , > | about critics is like asking a | > `3 7 0 \ ru [ s g l zv , > \ Christopher Hampton / > ---------------------------------------- > \ ^__^ > \ (oo)\_______ > (__)\ )\/\ > ||----w | > || || > > And I press "\" the first time (start of selection), and then "\" the > second time (end of selection). > > If I use "Alt+C" instead of "Alt+W" I will see instead of the last > shot: > ________________________________________ > `123567890-=qwertyuip[]asdfgjkl;'zxcbnm,./ > | about critics is like asking a | > `123567890-=qwertyuip[]asdfgjkl;'zxcbnm,./ > \ Christopher Hampton / > ---------------------------------------- > \ ^__^ > \ (oo)\_______ > (__)\ )\/\ > ||----w | > || || > > And then I will press "9" and "e" to select the same word. > > I just don't know how to make better the color tunable. For me enough > to change it in the my code :-) > > After selecting lines you see two lines of labels - it may be different > if you select two different lines in words selecton mode. > > Why we select it in order (y1, y2 x1, x2) and not (y1, x1) (y2, x2)? > It is because when you see lines labels it is more easier press the > same key two times fast or two near keys than press one key, then look > aside to press column number and when again see which you must press > key again for line. > > On Thu, Jan 26, 2012 at 08:59:36AM +0000, Nicholas Marriott wrote: >> This idea is nice, but I'm not sure about your implementation: >> >> I think the user interface is too unclear. I read your description and >> tried to use this and I couldn't figure out what I was selecting at all. >> >> If I was doing this I think there are two ways I would consider making >> it work... >> >> 1) It could split the screen into a grid and allow you to select, >> so first it would give you: >> >> 0 1 2 3 4 5 .... >> mytext here >> more text here and here >> another line >> >> You press 0 and it highlights column from 0-1, then gives youL >> >> 01234 >> mytex >> >> You then press 2,3 to select the range of columns 2-3. And then the >> same for the rows. So 4 keys to select any rectangular region on >> screen (it could work by cell or by word). >> >> 2) It walks the whole screen and gives each word a key and prints >> the character, so something like: >> >> 0ytext 1ere >> 2ore 3ext 4ere 5nd 6ere >> 7another 8ine >> >> Then you press 0,2 to select all text between the m in "mytext" and >> the e in "more". It highlights that then you press Enter or C-w or >> whatever to do the copy. So two or three keys to select any region >> between two words on screen. >> >> I like the second way, which I think is sort of what your code does. >> >> In either case, the keys should run 0-9a-zA-z then meta+0-9a-zA-z then >> the symbols last. >> >> Also you should use mode-bg and mode-fg I think not fixed blue >> colours. There is an existing word-separators option too. > > > > > ------------------------------ > > Message: 4 > Date: Fri, 27 Jan 2012 05:16:21 +0100 > From: Alex Ernst <a...@softcrumbs.com> > Subject: [PATCH] get current working directory on Darwin > To: tmux-users@lists.sourceforge.net > Message-ID: <26019675-f26f-4efb-a05c-344495213...@softcrumbs.com> > Content-Type: text/plain; charset=us-ascii > > Hello, > > this patch adds some platform specific code for Darwin to retrieve the > current working directory of the process in the active pane. > > Alex > > > diff --git a/osdep-darwin.c b/osdep-darwin.c > index c5820df..7b15446 100644 > --- a/osdep-darwin.c > +++ b/osdep-darwin.c > @@ -18,6 +18,7 @@ > > #include <sys/types.h> > #include <sys/sysctl.h> > +#include <libproc.h> > > #include <event.h> > #include <stdlib.h> > @@ -52,6 +53,15 @@ osdep_get_name(int fd, unused char *tty) > char * > osdep_get_cwd(pid_t pid) > { > + static char wd[PATH_MAX]; > + struct proc_vnodepathinfo pathinfo; > + int ret; > + > + ret = proc_pidinfo(pid, PROC_PIDVNODEPATHINFO, 0, &pathinfo, > sizeof(pathinfo)); > + if (ret == sizeof(pathinfo)) { > + strlcpy(wd, pathinfo.pvi_cdir.vip_path, sizeof(wd)); > + return (wd); > + } > return (NULL); > } > > > ------------------------------ > > ------------------------------------------------------------------------------ > Try before you buy = See our experts in action! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-dev2 > > ------------------------------ > > _______________________________________________ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users > > > End of tmux-users Digest, Vol 33, Issue 12 > ****************************************** ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users