aboutsummaryrefslogtreecommitdiffstats
path: root/ido-mode/README.pod
blob: 62f7190f009398428f2c593b712ae78388221d5b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
=pod

=head1 NAME

ido_switcher.pl

=head1 DESCRIPTION 

Search and select windows similar to ido-mode for emacs

=head1 INSTALLATION

This script requires that you have first installed and loaded F<uberprompt.pl>

Uberprompt can be downloaded from:

L<https://github.com/shabble/irssi-scripts/raw/master/prompt_info/uberprompt.pl>

and follow the instructions at the top of that file or its README for installation.

If uberprompt.pl is available, but not loaded, this script will make one
attempt to load it before giving up.  This eliminates the need to precisely
arrange the startup order of your scripts.

=head2 SETUP

C</bind ^G /ido_switch_start [options]>

Where C<^G> is a key of your choice.

=head2 USAGE

C<C-g> (or whatever you've set the above bind to), enters IDO window switching mode.
You can then type either a search string, or use one of the additional key-bindings
to change the behaviour of the search.  C<C-h> provides online help regarding
the possible interactive options.

=head3 EXTENDED USAGE:

It is possible to pass arguments to the C</ido_switch_start> command, which
correspond to some of the interactively settable parameters listed below.

The following options are available:

=over 4

=item C<-channels>

Search through only channels.

=item C<-queries>

Search through only queries.

=item C<-all>

search both queries and channels (Default).

=item C<-active>

Lmit search to only window items with activity.

=item C<-exact>

Enable exact-substring matching

=item C<-flex>

Enable flex-string matching

=back

I<If neither of C<-exact> or C<-flex> are given, the default is the value of
C</set ido_use_flex>>

=head4 EXAMPLE

=over 2

=item C</bind ^G /ido_switch_start -channels>

=item C</bind ^F /ido_switch_start -queries -active>

=back

B<NOTE:> When entering window switching mode, the contents of your input line will
be saved and cleared, to avoid visual clutter whilst using the switching
interface.  It will be restored once you exit the mode using either C<C-g>, C<Esc>,
or C<RET>.

=head3 INTERACTIVE COMMANDS

The following key-bindings are available only once the mode has been
activated:

=over 4

=item C<C-g>

 Exit the mode without changing windows.

=item C<Esc>

Exit, as above.

=item C<C-s>

Rotate the list of window candidates forward by one item

=item C<C-r>

Rotate the list of window candidates backward by one item

=item C<C-e>

Toggle 'Active windows only' filter

=item C<C-f>

Switch between 'Flex' and 'Exact' matching.

=item C<C-d>

Select a network or server to filter candidates by

=item C<C-u>

Clear the current search string

=item C<C-q>

Cycle between showing only queries, channels, or all.

=item C<C-SPC>

Filter candidates by current search string, and then reset
the search string

=item C<RET>

Select the current head of the candidate list (the green one)

=item C<SPC>

Select the current head of the list, without exiting the
switching mode. The head is then moved one place to the right,
allowing one to cycle through channels by repeatedly pressing space.

=item C<TAB>

B<[currently in development]> displays all possible completions
at the bottom of the current window.

=item I<All other keys> (C<a-z, A-Z>, etc)

Add that character to the current search string.

=back

=head3 USAGE NOTES

=over 4

=item * 

Using C-e (show actives), followed by repeatedly pressing space will cycle
through all your currently active windows.

=item *

If you enter a search string fragment, and realise that more than one candidate
is still presented, rather than delete the whole string and modify it, you
can use C-SPC to 'lock' the current matching candidates, but allow you to
search through those matches alone.

=back

=head1 AUTHORS

Based originally on L<window_switcher.pl|http://scripts.irssi.org/scripts/window_switcher.pl> script Copyright 2007 Wouter Coekaerts
C<E<lt>coekie@irssi.orgE<gt>>.

Primary functionality Copyright 2010-2011 Tom Feist
C<E<lt>shabble+irssi@metavore.orgE<gt>>.

=head1 LICENCE

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

=head1 BUGS:

=over 4

=item B<FIXED> Sometimes selecting a channel with the same name on a different
   network will take you to the wrong channel.

=back

=head1 TODO

=over 4

=item B<DONE> C-g - cancel

=item B<DONE> C-spc - narrow

=item B<DONE> flex matching (on by default, but optional)

=item TODO server/network narrowing

=item B<DONE> colourised output (via uberprompt)

=item B<DONE> C-r / C-s rotate matches

=item B<DONE> toggle queries/channels

=item B<DONE> remove inputline content, restore it afterwards.

=item TODO tab - display all possibilities in window (clean up afterwards)
how exactly will this work?

=item B<DONE> sort by recent activity/recently used windows (separate commands?)

=item B<TODO> need to be able to switch ordering of active ones (numerical, or most
recently active, priority to PMs/hilights, etc?)

=item B<DONE> should space auto-move forward to next window for easy stepping
     through sequential/active windows?

=back



=cut