You are not logged in.

#26 2010-11-28 23:30:27

q0tsa
Member
Registered: 2009-07-20
Posts: 39

Re: urxvt-keyboard-select - mouseless text selection in urxvt

Hello,

First, great extension, love it!

It would be nice if you could implement the vi motion commands e and E, they seem to be the only two that are missing.

I also installed your clipboard module. Unfortuneately it does not work together with text-selection, ie when I select text with M-Escape I cannot copy it with M-c. Is there a specific reason for this?

Offline

#27 2010-11-29 19:09:56

ber_t
Member
From: Berlin, Germany
Registered: 2010-03-10
Posts: 214
Website

Re: urxvt-keyboard-select - mouseless text selection in urxvt

q0tsa wrote:

It would be nice if you could implement the vi motion commands e and E, they seem to be the only two that are missing.

Well, I seem to forgot these two, but I've just implemented them and put them into the current git HEAD. I will release a new stable version in a few days...

q0tsa wrote:

I also installed your clipboard module. Unfortuneately it does not work together with text-selection, ie when I select text with M-Escape I cannot copy it with M-c. Is there a specific reason for this?

That's due to the limitations of urxvt's perl extension API and the design decisions I've made for keyboard-select.
The latter does not select text, but simply highlights it using reverse video. The selected text is only copied into the primary buffer when pressing the y/Return key. That's because of the inability to blockwise select text using logical lines, and because I wanted to be able to abort visual mode, without overwriting the primary buffer, and that was the nicest way to achieve this.
Using M-c from the clipboard extension copies the contents of the primary buffer into the system clipboard. Note, that this does also work, after the text got deselected.

This leaves two possibilities to get what you want: pressing the y key before using M-c, or merging clipboard's functionality into keyboard-select, what I refuse to do, because I don't want keyboard-select to depend on something like xclip/xsel.

I'm sorry, but this explanation got a bit lengthy...

Last edited by ber_t (2010-11-29 19:13:48)

Offline

#28 2011-01-06 19:03:17

ber_t
Member
From: Berlin, Germany
Registered: 2010-03-10
Posts: 214
Website

Re: urxvt-keyboard-select - mouseless text selection in urxvt

Updated to version 1.5

Only wanted to put the e/E mappings into a stable release...

Offline

#29 2011-01-07 10:29:07

iosonofabio
Member
From: Italy
Registered: 2008-10-09
Posts: 101

Re: urxvt-keyboard-select - mouseless text selection in urxvt

e/E are not mentioned in the header, where you document the features of the script. Please add. Thanks!

[edit]
Sorry, they ARE there, only a bit hidden... my fault :-)

Last edited by iosonofabio (2011-01-07 10:38:12)

Offline

#30 2011-03-28 20:37:03

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: urxvt-keyboard-select - mouseless text selection in urxvt

Hi, the url-select extension is great. Do you know if theres any way to expand the url selection in more than one line?
For example i get RSS feeds from H Online which look like this:
http://rss.feedsportal.com/c/32569/f/49 … neycomb0Es
ource0Eno0Eshow0ESSL0Emeltdown0EFirefox0E40Efinally0E12155630Bhtml0Cfrom0Crss/story01.htm which takes more than 1 line in my terminal. In xterm i can select these urls just fine, but urxvt cuts off at the end of the first line.
Not with just this extension, but matcher and selection as well.

Last edited by dolby (2011-03-28 20:37:55)


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

#31 2011-03-29 12:35:30

ber_t
Member
From: Berlin, Germany
Registered: 2010-03-10
Posts: 214
Website

Re: urxvt-keyboard-select - mouseless text selection in urxvt

First of all, you've posted in the wrong thread. I will upload the titles, to make them more distinguishable...

Regarding your problem: It should work, if the url is directly printed to the terminal buffer. But it doesn't work, if there's some layer in between, most likely a curses variant. I once tried to come up with a decent version to detect multi-line-urls in mcabber, tmux, vim, newsbeuter and the like, but I failed. It's way too complex, because of split-screens etc.

BTW, how did you get url highlighting in xterm?

Offline

#32 2011-03-29 17:59:54

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: urxvt-keyboard-select - mouseless text selection in urxvt

ber_t wrote:

First of all, you've posted in the wrong thread. I will upload the titles, to make them more distinguishable...

BTW, how did you get url highlighting in xterm?

Indeed wrong thread, but it was the first one i found while moving backwards in the Community Contributions pages history. Sorry.

In xterm i highlight urls with this awesome resource setting:

xterm*charClass:        33:48,35-38:48,39:43,42-47:48,58-59:48,61:48,63-64:48,126:48

FWIW since we're offtopic anyway i "forked" your clipboard script making it use xclip again.
Its only a substitution of xsel to xclip commands, like it was when you had first wrote it.


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

#33 2011-03-29 21:05:44

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: urxvt-keyboard-select - mouseless text selection in urxvt

dolby wrote:

In xterm i highlight urls with this awesome resource setting:

xterm*charClass:        33:48,35-38:48,39:43,42-47:48,58-59:48,61:48,63-64:48,126:48

I should probably note that this awesome resource setting works with the mouse, so it may not be that awesome after all. smile
But it works.


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

#34 2011-09-05 18:07:23

corvinus
Member
Registered: 2011-09-05
Posts: 8

Re: urxvt-keyboard-select - mouseless text selection in urxvt

The extension is an excellent idea, very useful to me. Just two questions:

After adding the following from README:
  URxvt.keysym.M-Escape: perl:keyboard-select:activate
Alt-s key just triggers visual bell, while it shown search prompt before (as far as I can remember). Alt-Esc works though.

Also, yw doesn't yank word, while yy works.

Offline

#35 2011-09-06 07:58:35

ber_t
Member
From: Berlin, Germany
Registered: 2010-03-10
Posts: 214
Website

Re: urxvt-keyboard-select - mouseless text selection in urxvt

corvinus wrote:

After adding the following from README:
  URxvt.keysym.M-Escape: perl:keyboard-select:activate
Alt-s key just triggers visual bell, while it shown search prompt before (as far as I can remember). Alt-Esc works though.

You also need to add this line to your .Xresources/.Xdefaults:

URxvt.keysym:M-s: perl:keyboard-select:search
corvinus wrote:

Also, yw doesn't yank word, while yy works.

There is only a simple y-mapping. Pressing this key copies the current selection to the primary buffer. Real vim-like double bindings (yw, yy, etc.) are not available.

Offline

#36 2011-09-06 11:44:55

corvinus
Member
Registered: 2011-09-05
Posts: 8

Re: urxvt-keyboard-select - mouseless text selection in urxvt

ber_t wrote:
corvinus wrote:

After adding the following from README:
  URxvt.keysym.M-Escape: perl:keyboard-select:activate
Alt-s key just triggers visual bell, while it shown search prompt before (as far as I can remember). Alt-Esc works though.

You also need to add this line to your .Xresources/.Xdefaults:

URxvt.keysym:M-s: perl:keyboard-select:search

Sorry, I posted the wrong line. Of course I mean this:
URxvt.keysym:M-s: perl:keyboard-select:search

ber_t wrote:
corvinus wrote:

Also, yw doesn't yank word, while yy works.

There is only a simple y-mapping. Pressing this key copies the current selection to the primary buffer. Real vim-like double bindings (yw, yy, etc.) are not available.

Yes, I noticed that w just moves cursor (and yy doesn't yank line, here I mistaked again). So this is more like feature suggestion I guess.

Offline

#37 2011-09-06 13:36:41

ber_t
Member
From: Berlin, Germany
Registered: 2010-03-10
Posts: 214
Website

Re: urxvt-keyboard-select - mouseless text selection in urxvt

corvinus wrote:

Sorry, I posted the wrong line. Of course I mean this:
URxvt.keysym:M-s: perl:keyboard-select:search

Sorry, this line in the file header of keyboard-select contains a typo. The correct line is:

URxvt.keysym.M-s: perl:keyboard-select:search

Offline

#38 2011-09-06 15:29:01

corvinus
Member
Registered: 2011-09-05
Posts: 8

Re: urxvt-keyboard-select - mouseless text selection in urxvt

ber_t wrote:
corvinus wrote:

Sorry, I posted the wrong line. Of course I mean this:
URxvt.keysym:M-s: perl:keyboard-select:search

Sorry, this line in the file header of keyboard-select contains a typo. The correct line is:

URxvt.keysym.M-s: perl:keyboard-select:search

Thanks, that fixed it. Still, page at github.com (or file README.md) contains old line.

Offline

#39 2019-03-08 07:24:02

mountaineerbr
Banned
Registered: 2018-12-08
Posts: 48

Re: urxvt-keyboard-select - mouseless text selection in urxvt

Thanks!

Offline

Board footer

Powered by FluxBB