… | |
… | |
112 | "End" jumps to the bottom. "Escape" leaves search mode and returns |
112 | "End" jumps to the bottom. "Escape" leaves search mode and returns |
113 | to the point where search was started, while "Enter" or "Return" |
113 | to the point where search was started, while "Enter" or "Return" |
114 | stay at the current position and additionally stores the first match |
114 | stay at the current position and additionally stores the first match |
115 | in the current line into the primary selection. |
115 | in the current line into the primary selection. |
116 | |
116 | |
117 | selection-autotransform |
117 | readline (enabled by default) |
118 | This selection allows you to do automatic transforms on a selection |
|
|
119 | whenever a selection is made. |
|
|
120 | |
|
|
121 | It works by specifying perl snippets (most useful is a single "s///" |
|
|
122 | operator) that modify $_ as resources: |
|
|
123 | |
|
|
124 | URxvt.selection-autotransform.0: transform |
|
|
125 | URxvt.selection-autotransform.1: transform |
|
|
126 | ... |
|
|
127 | |
|
|
128 | For example, the following will transform selections of the form |
|
|
129 | "filename:number", often seen in compiler messages, into "vi |
|
|
130 | +$filename $word": |
|
|
131 | |
|
|
132 | URxvt.selection-autotransform.0: s/^([^:[:space:]]+):(\\d+):?$/vi +$2 \\Q$1\\E\\x0d/ |
|
|
133 | |
|
|
134 | And this example matches the same,but replaces it with vi-commands |
|
|
135 | you can paste directly into your (vi :) editor: |
|
|
136 | |
|
|
137 | URxvt.selection-autotransform.0: s/^([^:[:space:]]+(\\d+):?$/:e \\Q$1\\E\\x0d:$2\\x0d/ |
|
|
138 | |
|
|
139 | Of course, this can be modified to suit your needs and your editor |
|
|
140 | :) |
|
|
141 | |
|
|
142 | To expand the example above to typical perl error messages ("XXX at |
|
|
143 | FILENAME line YYY."), you need a slightly more elaborate solution: |
|
|
144 | |
|
|
145 | URxvt.selection.pattern-0: ( at .*? line \\d+[,.]) |
|
|
146 | URxvt.selection-autotransform.0: s/^ at (.*?) line (\\d+)[,.]$/:e \\Q$1\E\\x0d:$2\\x0d/ |
|
|
147 | |
|
|
148 | The first line tells the selection code to treat the unchanging part |
|
|
149 | of every error message as a selection pattern, and the second line |
|
|
150 | transforms the message into vi commands to load the file. |
|
|
151 | |
|
|
152 | readline |
|
|
153 | A support package that tries to make editing with readline easier. |
118 | A support package that tries to make editing with readline easier. |
154 | At the moment, it reacts to clicking with the left mouse button by |
119 | At the moment, it reacts to clicking with the left mouse button by |
155 | trying to move the text cursor to this position. It does so by |
120 | trying to move the text cursor to this position. It does so by |
156 | generating as many cursor-left or cursor-right keypresses as |
121 | generating as many cursor-left or cursor-right keypresses as |
157 | required (the this only works for programs that correctly support |
122 | required (the this only works for programs that correctly support |
158 | wide characters). |
123 | wide characters). |
159 | |
124 | |
160 | It only works when clicking into the same line (possibly extended |
125 | To avoid too many false positives, this is only done when: |
161 | over multiple rows) as the text cursor and on the primary screen, to |
126 | |
162 | reduce the risk of misinterpreting. The normal selection isn't |
127 | - the tty is in ICANON state. |
163 | disabled, so quick successive clicks might interfere with selection |
128 | - the text cursor is visible. |
164 | creation in harmless ways. |
129 | - the primary screen is currently being displayed. |
|
|
130 | - the mouse is on the same (multi-row-) line as the text cursor. |
|
|
131 | |
|
|
132 | The normal selection mechanism isn't disabled, so quick successive |
|
|
133 | clicks might interfere with selection creation in harmless ways. |
|
|
134 | |
|
|
135 | selection-autotransform |
|
|
136 | This selection allows you to do automatic transforms on a selection |
|
|
137 | whenever a selection is made. |
|
|
138 | |
|
|
139 | It works by specifying perl snippets (most useful is a single "s///" |
|
|
140 | operator) that modify $_ as resources: |
|
|
141 | |
|
|
142 | URxvt.selection-autotransform.0: transform |
|
|
143 | URxvt.selection-autotransform.1: transform |
|
|
144 | ... |
|
|
145 | |
|
|
146 | For example, the following will transform selections of the form |
|
|
147 | "filename:number", often seen in compiler messages, into "vi |
|
|
148 | +$filename $word": |
|
|
149 | |
|
|
150 | URxvt.selection-autotransform.0: s/^([^:[:space:]]+):(\\d+):?$/vi +$2 \\Q$1\\E\\x0d/ |
|
|
151 | |
|
|
152 | And this example matches the same,but replaces it with vi-commands |
|
|
153 | you can paste directly into your (vi :) editor: |
|
|
154 | |
|
|
155 | URxvt.selection-autotransform.0: s/^([^:[:space:]]+(\\d+):?$/:e \\Q$1\\E\\x0d:$2\\x0d/ |
|
|
156 | |
|
|
157 | Of course, this can be modified to suit your needs and your editor |
|
|
158 | :) |
|
|
159 | |
|
|
160 | To expand the example above to typical perl error messages ("XXX at |
|
|
161 | FILENAME line YYY."), you need a slightly more elaborate solution: |
|
|
162 | |
|
|
163 | URxvt.selection.pattern-0: ( at .*? line \\d+[,.]) |
|
|
164 | URxvt.selection-autotransform.0: s/^ at (.*?) line (\\d+)[,.]$/:e \\Q$1\E\\x0d:$2\\x0d/ |
|
|
165 | |
|
|
166 | The first line tells the selection code to treat the unchanging part |
|
|
167 | of every error message as a selection pattern, and the second line |
|
|
168 | transforms the message into vi commands to load the file. |
165 | |
169 | |
166 | tabbed |
170 | tabbed |
167 | This transforms the terminal into a tabbar with additional |
171 | This transforms the terminal into a tabbar with additional |
168 | terminals, that is, it implements what is commonly refered to as |
172 | terminals, that is, it implements what is commonly refered to as |
169 | "tabbed terminal". The topmost line displays a "[NEW]" button, |
173 | "tabbed terminal". The topmost line displays a "[NEW]" button, |
… | |
… | |
794 | Replaces the event mask of the pty watcher by the given event mask. |
798 | Replaces the event mask of the pty watcher by the given event mask. |
795 | Can be used to suppress input and output handling to the pty/tty. |
799 | Can be used to suppress input and output handling to the pty/tty. |
796 | See the description of "urxvt::timer->events". Make sure to always |
800 | See the description of "urxvt::timer->events". Make sure to always |
797 | restore the previous value. |
801 | restore the previous value. |
798 | |
802 | |
|
|
803 | $fd = $term->pty_fd |
|
|
804 | Returns the master file descriptor for the pty in use, or -1 if no |
|
|
805 | pty is used. |
|
|
806 | |
799 | $windowid = $term->parent |
807 | $windowid = $term->parent |
800 | Return the window id of the toplevel window. |
808 | Return the window id of the toplevel window. |
801 | |
809 | |
802 | $windowid = $term->vt |
810 | $windowid = $term->vt |
803 | Return the window id of the terminal window. |
811 | Return the window id of the terminal window. |
… | |
… | |
840 | applicable. |
848 | applicable. |
841 | |
849 | |
842 | $screen = $term->current_screen |
850 | $screen = $term->current_screen |
843 | Returns the currently displayed screen (0 primary, 1 secondary). |
851 | Returns the currently displayed screen (0 primary, 1 secondary). |
844 | |
852 | |
|
|
853 | $cursor_is_hidden = $term->hidden_cursor |
|
|
854 | Returns wether the cursor is currently hidden or not. |
|
|
855 | |
845 | $view_start = $term->view_start ([$newvalue]) |
856 | $view_start = $term->view_start ([$newvalue]) |
846 | Returns the row number of the topmost displayed line. Maximum value |
857 | Returns the row number of the topmost displayed line. Maximum value |
847 | is 0, which displays the normal terminal contents. Lower values |
858 | is 0, which displays the normal terminal contents. Lower values |
848 | scroll this many lines into the scrollback buffer. |
859 | scroll this many lines into the scrollback buffer. |
849 | |
860 | |
… | |
… | |
866 | replace only parts of a line. The font index in the rendition will |
877 | replace only parts of a line. The font index in the rendition will |
867 | automatically be updated. |
878 | automatically be updated. |
868 | |
879 | |
869 | $text is in a special encoding: tabs and wide characters that use |
880 | $text is in a special encoding: tabs and wide characters that use |
870 | more than one cell when displayed are padded with $urxvt::NOCHAR |
881 | more than one cell when displayed are padded with $urxvt::NOCHAR |
871 | characters. Characters with combining characters and other |
882 | (chr 65535) characters. Characters with combining characters and |
872 | characters that do not fit into the normal tetx encoding will be |
883 | other characters that do not fit into the normal tetx encoding will |
873 | replaced with characters in the private use area. |
884 | be replaced with characters in the private use area. |
874 | |
885 | |
875 | You have to obey this encoding when changing text. The advantage is |
886 | You have to obey this encoding when changing text. The advantage is |
876 | that "substr" and similar functions work on screen cells and not on |
887 | that "substr" and similar functions work on screen cells and not on |
877 | characters. |
888 | characters. |
878 | |
889 | |