… | |
… | |
120 | |
120 | |
121 | For example, the following will transform selections of the form |
121 | For example, the following will transform selections of the form |
122 | C<filename:number>, often seen in compiler messages, into C<vi +$filename |
122 | C<filename:number>, often seen in compiler messages, into C<vi +$filename |
123 | $word>: |
123 | $word>: |
124 | |
124 | |
125 | URxvt.selection-autotransform.0: s/^(\\S+):(\\d+):?$/vi +$2 \\Q$1\\E\\x0d/ |
125 | URxvt.selection-autotransform.0: s/^([^:[:space:]]+):(\\d+):?$/vi +$2 \\Q$1\\E\\x0d/ |
126 | |
126 | |
127 | And this example matches the same,but replaces it with vi-commands you can |
127 | And this example matches the same,but replaces it with vi-commands you can |
128 | paste directly into your (vi :) editor: |
128 | paste directly into your (vi :) editor: |
129 | |
129 | |
130 | URxvt.selection-autotransform.0: s/^(S+):(d+):?$/\\x1b:e \\Q$1\\E\\x0d:$2\\x0d/ |
130 | URxvt.selection-autotransform.0: s/^([^:[:space:]]+(\\d+):?$/\\x1b:e \\Q$1\\E\\x0d:$2\\x0d/ |
131 | |
131 | |
132 | Of course, this can be modified to suit your needs and your editor :) |
132 | Of course, this can be modified to suit your needs and your editor :) |
133 | |
133 | |
134 | To expand the example above to typical perl error messages ("XXX at |
134 | To expand the example above to typical perl error messages ("XXX at |
135 | FILENAME line YYY."), you need a slightly more elaborate solution: |
135 | FILENAME line YYY."), you need a slightly more elaborate solution: |