GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
urxvt-selection-autotransform(1) RXVT-UNICODE urxvt-selection-autotransform(1)

selection-autotransform - automatically transform select text

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.

2022-04-12 9.30

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.