url-select: g/G mappings to select first/last URL
This commit is contained in:
parent
b3249e81dd
commit
95c1029b64
@ -53,8 +53,8 @@ After installing, put the following lines in your .Xdefaults/.Xresources:
|
|||||||
|
|
||||||
Use Meta-u to activate URL selection mode, then use the following keys:
|
Use Meta-u to activate URL selection mode, then use the following keys:
|
||||||
|
|
||||||
k: Select next upward URL (also with Meta-u)
|
j/k: Select next downward/upward URL
|
||||||
j: Select next downward URL
|
g/G: Select first/last URL
|
||||||
o/Return: Open selected URL in browser, Return: deactivate afterwards
|
o/Return: Open selected URL in browser, Return: deactivate afterwards
|
||||||
y: Copy (yank) selected URL and deactivate selection mode
|
y: Copy (yank) selected URL and deactivate selection mode
|
||||||
q/Escape: Deactivate URL selection mode
|
q/Escape: Deactivate URL selection mode
|
||||||
|
12
url-select
12
url-select
@ -2,7 +2,7 @@
|
|||||||
# Author: Bert Muennich
|
# Author: Bert Muennich
|
||||||
# Website: http://www.github.com/muennich/urxvt-perls
|
# Website: http://www.github.com/muennich/urxvt-perls
|
||||||
# Based on: http://www.jukie.net/~bart/blog/urxvt-url-yank
|
# Based on: http://www.jukie.net/~bart/blog/urxvt-url-yank
|
||||||
# Version: 1.5
|
# Version: git-20110803
|
||||||
# License: GPLv2
|
# License: GPLv2
|
||||||
|
|
||||||
# Use keyboard shortcuts to select URLs.
|
# Use keyboard shortcuts to select URLs.
|
||||||
@ -14,8 +14,8 @@
|
|||||||
# URxvt.keysym.M-u: perl:url-select:select_next
|
# URxvt.keysym.M-u: perl:url-select:select_next
|
||||||
|
|
||||||
# Use Meta-u to activate URL selection mode, then use the following keys:
|
# Use Meta-u to activate URL selection mode, then use the following keys:
|
||||||
# k: Select next upward URL (also with Meta-u)
|
# j/k: Select next downward/upward URL
|
||||||
# j: Select next downward URL
|
# g/G: Select first/last URL
|
||||||
# o/Return: Open selected URL in browser, Return: deactivate afterwards
|
# o/Return: Open selected URL in browser, Return: deactivate afterwards
|
||||||
# y: Copy (yank) selected URL and deactivate selection mode
|
# y: Copy (yank) selected URL and deactivate selection mode
|
||||||
# q/Escape: Deactivate URL selection mode
|
# q/Escape: Deactivate URL selection mode
|
||||||
@ -108,6 +108,12 @@ sub key_press {
|
|||||||
select_next($self, -1);
|
select_next($self, -1);
|
||||||
} elsif ($char eq 'j') {
|
} elsif ($char eq 'j') {
|
||||||
select_next($self, 1);
|
select_next($self, 1);
|
||||||
|
} elsif ($char eq 'g') {
|
||||||
|
$self->{row} = $self->top_row - 1;
|
||||||
|
select_next($self, 1);
|
||||||
|
} elsif ($char eq 'G') {
|
||||||
|
$self->{row} = $self->nrow;
|
||||||
|
select_next($self, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user