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

Attachment: undefer-tmux.patch.gz
Description: Binary data

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