Man page - urxvt-selection-autotransform(1)
Packages contas this manual
- urxvt-confirm-paste(1)
- urxvt-xim-onthespot(1)
- urxvt-clickthrough(1)
- rxvt(1)
- urxvt-keysym-list(1)
- urxvt-extensions(1)
- urxvt-example-refresh-hooks(1)
- urxvt-block-graphics-to-ascii(1)
- urxvt-readline(1)
- urxvt-eval(1)
- urxvt-selection-pastebin(1)
- urxvt-tabbed(1)
- urxvt-matcher(1)
- urxvt-selection-popup(1)
- urxvtcd(1)
- urxvtperl(3)
- urxvt-option-popup(1)
- urxvt(1)
- urxvt-searchable-scrollback(1)
- urxvt-selection-to-clipboard(1)
- urxvtc(1)
- urclock(1)
- urxvtd(1)
- urxvt-overlay-osc(1)
- urxvt-font-size(1)
- urxvt-clipboard-osc(1)
- urxvt-background(1)
- urxvt-digital-clock(1)
- urxvt(7)
- urxvt-remote-clipboard(1)
- urxvt-selection(1)
- urxvt-selection-autotransform(1)
- urxvt-kuake(1)
- urxvt-bell-command(1)
- rxvt-unicode(1)
apt-get install rxvt-unicode
Manual
| urxvt-selection-autotransform(1) | RXVT-UNICODE | urxvt-selection-autotransform(1) |
NAME
selection-autotransform - automatically transform select text
DESCRIPTION
This selection allows you to do automatic transforms on a selection whenever a selection is made.
It works by specifying perl snippets (most useful is a single "s///" operator) that modify $_ as resources:
URxvt.selection-autotransform.0: transform URxvt.selection-autotransform.1: transform ...
For example, the following will transform selections of the form "filename:number", often seen in compiler messages, into vi +$filename $word:
URxvt.selection-autotransform.0: s/^([^:[:space:]]+):(\\d+):?$/vi +$2 \\Q$1\\E\\x0d/
And this example matches the same,but replaces it with vi-commands you can paste directly into your (vi :) editor:
URxvt.selection-autotransform.0: s/^([^:[:space:]]+(\\d+):?$/:e \\Q$1\\E\\x0d:$2\\x0d/
Of course, this can be modified to suit your needs and your editor :)
To expand the example above to typical perl error messages ("XXX at FILENAME line YYY."), you need a slightly more elaborate solution:
URxvt.selection.pattern-0: ( at .*? line \\d+[,.]) URxvt.selection-autotransform.0: s/^ at (.*?) line (\\d+)[,.]$/:e \\Q$1\E\\x0d:$2\\x0d/
The first line tells the selection code to treat the unchanging part of every error message as a selection pattern, and the second line transforms the message into vi commands to load the file.
| 2024-10-15 | 9.31 |