… | |
… | |
181 | \&\f(CW\*(C`\-\-quoting\-style=shell\*(C'\fR. |
181 | \&\f(CW\*(C`\-\-quoting\-style=shell\*(C'\fR. |
182 | .Sp |
182 | .Sp |
183 | A double-click usually selects the word under the cursor, further clicks |
183 | A double-click usually selects the word under the cursor, further clicks |
184 | will enlarge the selection. |
184 | will enlarge the selection. |
185 | .Sp |
185 | .Sp |
|
|
186 | The selection works by trying to match a number of regexes and displaying |
|
|
187 | them in increasing order of length. You can add your own regexes by |
|
|
188 | specifying resources of the form: |
|
|
189 | .Sp |
|
|
190 | .Vb 3 |
|
|
191 | \& URxvt.selection.pattern-0: perl-regex |
|
|
192 | \& URxvt.selection.pattern-1: perl-regex |
|
|
193 | \& ... |
|
|
194 | .Ve |
|
|
195 | .Sp |
|
|
196 | The index number (0, 1...) must not have any holes, and each regex must |
|
|
197 | contain at least one pair of capturing parentheses, which will be used for |
|
|
198 | the match. For example, the followign adds a regex that matches everything |
|
|
199 | between two vertical bars: |
|
|
200 | .Sp |
|
|
201 | .Vb 1 |
|
|
202 | \& URxvt.selection.pattern-0: \e\e|([^|]+)\e\e| |
|
|
203 | .Ve |
|
|
204 | .Sp |
|
|
205 | You can look at the source of the selection extension to see more |
|
|
206 | interesting uses, such as parsing a line from beginning to end. |
|
|
207 | .Sp |
186 | It also offers the following bindable keyboard command: |
208 | This extension also offers the following bindable keyboard command: |
187 | .RS 4 |
209 | .RS 4 |
188 | .IP "rot13" 4 |
210 | .IP "rot13" 4 |
189 | .IX Item "rot13" |
211 | .IX Item "rot13" |
190 | Rot\-13 the selection when activated. Used via keyboard trigger: |
212 | Rot\-13 the selection when activated. Used via keyboard trigger: |
191 | .Sp |
213 | .Sp |
… | |
… | |
216 | search upwards/downwards in the scrollback buffer, \f(CW\*(C`End\*(C'\fR jumps to the |
238 | search upwards/downwards in the scrollback buffer, \f(CW\*(C`End\*(C'\fR jumps to the |
217 | bottom. \f(CW\*(C`Escape\*(C'\fR leaves search mode and returns to the point where search |
239 | bottom. \f(CW\*(C`Escape\*(C'\fR leaves search mode and returns to the point where search |
218 | was started, while \f(CW\*(C`Enter\*(C'\fR or \f(CW\*(C`Return\*(C'\fR stay at the current position and |
240 | was started, while \f(CW\*(C`Enter\*(C'\fR or \f(CW\*(C`Return\*(C'\fR stay at the current position and |
219 | additionally stores the first match in the current line into the primary |
241 | additionally stores the first match in the current line into the primary |
220 | selection. |
242 | selection. |
221 | .IP "digital-clock" 4 |
243 | .IP "selection-autotransform" 4 |
222 | .IX Item "digital-clock" |
244 | .IX Item "selection-autotransform" |
223 | Displays a digital clock using the built-in overlay. |
245 | This selection allows you to do automatic transforms on a selection |
|
|
246 | whenever a selection is made. |
|
|
247 | .Sp |
|
|
248 | It works by specifying perl snippets (most useful is a single \f(CW\*(C`s///\*(C'\fR |
|
|
249 | operator) that modify \f(CW$_\fR as resources: |
|
|
250 | .Sp |
|
|
251 | .Vb 3 |
|
|
252 | \& URxvt.selection-autotransform.0: transform |
|
|
253 | \& URxvt.selection-autotransform.1: transform |
|
|
254 | \& ... |
|
|
255 | .Ve |
|
|
256 | .Sp |
|
|
257 | For example, the following will transform selections of the form |
|
|
258 | \&\f(CW\*(C`filename:number\*(C'\fR, often seen in compiler messages, into \f(CW\*(C`vi +$filename |
|
|
259 | $word\*(C'\fR: |
|
|
260 | .Sp |
|
|
261 | .Vb 1 |
|
|
262 | \& URxvt.selection-autotransform.0: s/^(\e\eS+):(\e\ed+):?$/vi +$2 \e\eQ$1\e\eE\e\ex0d/ |
|
|
263 | .Ve |
|
|
264 | .Sp |
|
|
265 | And this example matches the same,but replaces it with vi-commands you can |
|
|
266 | paste directly into your (vi :) editor: |
|
|
267 | .Sp |
|
|
268 | .Vb 1 |
|
|
269 | \& URxvt.selection-autotransform.0: s/^(S+):(d+):?$/\e\ex1b:e \e\eQ$1\e\eE\e\ex0d:$2\e\ex0d/ |
|
|
270 | .Ve |
224 | .IP "mark-urls" 4 |
271 | .IP "mark-urls" 4 |
225 | .IX Item "mark-urls" |
272 | .IX Item "mark-urls" |
226 | Uses per-line display filtering (\f(CW\*(C`on_line_update\*(C'\fR) to underline urls and |
273 | Uses per-line display filtering (\f(CW\*(C`on_line_update\*(C'\fR) to underline urls and |
227 | make them clickable. When middle\-clicked, the program specified in the |
274 | make them clickable. When middle\-clicked, the program specified in the |
228 | resource \f(CW\*(C`urlLauncher\*(C'\fR (default \f(CW\*(C`x\-www\-browser\*(C'\fR) will be started with |
275 | resource \f(CW\*(C`urlLauncher\*(C'\fR (default \f(CW\*(C`x\-www\-browser\*(C'\fR) will be started with |
… | |
… | |
230 | .IP "block-graphics-to-ascii" 4 |
277 | .IP "block-graphics-to-ascii" 4 |
231 | .IX Item "block-graphics-to-ascii" |
278 | .IX Item "block-graphics-to-ascii" |
232 | A not very useful example of filtering all text output to the terminal, |
279 | A not very useful example of filtering all text output to the terminal, |
233 | by replacing all line-drawing characters (U+2500 .. U+259F) by a |
280 | by replacing all line-drawing characters (U+2500 .. U+259F) by a |
234 | similar-looking ascii character. |
281 | similar-looking ascii character. |
|
|
282 | .IP "digital-clock" 4 |
|
|
283 | .IX Item "digital-clock" |
|
|
284 | Displays a digital clock using the built-in overlay. |
235 | .IP "example-refresh-hooks" 4 |
285 | .IP "example-refresh-hooks" 4 |
236 | .IX Item "example-refresh-hooks" |
286 | .IX Item "example-refresh-hooks" |
237 | Displays a very simple digital clock in the upper right corner of the |
287 | Displays a very simple digital clock in the upper right corner of the |
238 | window. Illustrates overwriting the refresh callbacks to create your own |
288 | window. Illustrates overwriting the refresh callbacks to create your own |
239 | overlays or changes. |
289 | overlays or changes. |