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


------------------------------------------------------------------------------
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

Reply via email to