summaryrefslogtreecommitdiffstats
path: root/doc/tdevelop/editing.docbook
blob: 54074bdbce6e6d82e17c780321ce543c33e66e57 (plain)
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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
<chapter id="editing">
<title>Editing Tools</title>

<sect1 id="editing-snippets">
<title>Code Snippets</title>

<itemizedlist>
  <title>Features (preliminary overview)</title>
  <listitem><para>
  SnippetPart adds a tool-view which by default docks to the right
  </para></listitem>
  <listitem><para>
  Adding, editing and removing of snippets is available via a popup-menu
  </para></listitem>
  <listitem><para>
  Double-clicking a snippet form the list inserts it into to the active view at the current cursor position
  </para></listitem>
  <listitem><para>
  Tool tips show the content of a snippet
  </para></listitem>
  <listitem><para>
  Snippets are stored in the users home-directory, so every user can have his own snippets
  </para></listitem>
  <listitem><para>
  Snippets can contain variables in the style of $<varname>VARNAME</varname>$. On using the snippet the user is prompted to enter replacement value for the variables
  </para></listitem>
</itemizedlist>
</sect1> <!-- editing-snippets -->

<sect1 id="keyboardmapping">
<title>Keyboard Mapping</title>
<indexterm zone="keyboardmapping"><primary>keybindings</primary></indexterm>

<para>
In the following, we will list the default keybindings of the
default editor. You can configure them as you like (how?)
</para>

<informaltable>
<tgroup cols="2">
<tbody>

<row><entry><para><keycap>
  Left
</keycap></para></entry>
<entry><para>
  Moves one character left
</para></entry></row>

<row><entry><para><keycap>
  Right
</keycap></para></entry>
<entry><para>
  Moves one character right
</para></entry></row>

<row><entry><para><keycombo>
&Ctrl;<keycap>
  Left
</keycap></keycombo></para></entry>
<entry><para>
  Moves one word left
</para></entry></row>

<row><entry><para><keycombo>
&Ctrl;<keycap>
  Right
</keycap></keycombo></para></entry>
<entry><para>
  Moves one word right
</para></entry></row>

<row><entry><para><keycap>
  Up
</keycap></para></entry>
<entry><para>
  Moves up one line
</para></entry></row>

<row><entry><para><keycap>
  Down
</keycap></para></entry>
<entry><para>
  Moves down one line
</para></entry></row>

<row><entry><para><keycap>
  Page Up
</keycap></para></entry>
<entry><para>
  Moves up one page
</para></entry></row>

<row><entry><para><keycap>
    Page Down
</keycap></para></entry>
<entry><para>
  Moves down one page
</para></entry></row>

<row><entry><para><keycombo>&Ctrl;<keycap>
  Page Down
</keycap></keycombo></para></entry>
<entry><para>
  Moves to the beginning of the file
</para></entry></row>

<row><entry><para><keycombo>&Ctrl;
<keycap>
  Page Down
</keycap></keycombo></para></entry>
<entry><para>
  Moves to the end of the file
</para></entry></row>

<row><entry><para><keycap>
    Home
</keycap></para></entry>
<entry><para>
  Moves to the beginning of the line
</para></entry></row>

<row><entry><para><keycap>
    End
</keycap></para></entry>
<entry><para>
  Moves to the end of the line
</para></entry></row>

</tbody>
</tgroup>
</informaltable>

<para>
For all the keys above, the &Shift; key can be pressed additionally,
to mark from the current cursor position to the one afterwards.
</para>

<informaltable>
<tgroup cols="2">
<tbody>

<row><entry><para><keycap>
  Backspace
</keycap></para></entry>
<entry><para>
  Deletes one character left
</para></entry></row>

<row><entry><para><keycap>
  Delete
</keycap></para></entry>
<entry><para>
  Deletes the character under the cursor
</para></entry></row>

<row><entry><para><keycombo>
&Ctrl;
<keycap>
  C
</keycap></keycombo></para></entry>
<entry><para>
  Copies the selected text to the clipboard
</para></entry></row>

<row><entry><para><keycombo>&Ctrl;<keycap>
  V
</keycap></keycombo></para></entry>
<entry><para>
  Pastes the selected text from the clipboard
</para></entry></row>

<row><entry><para><keycombo>&Ctrl;<keycap>
  X
</keycap></keycombo></para></entry>
<entry><para>
  Deletes the selected text and puts it into the clipboard
</para></entry></row>

<row><entry><para><keycombo>&Ctrl;<keycap>
  Z
</keycap></keycombo></para></entry>
<entry><para>
  Undo
</para></entry></row>

<row><entry><para><keycombo>&Shift;&Ctrl;<keycap>
  Z
</keycap></keycombo></para></entry>
<entry><para>
Redo
</para></entry></row>

</tbody>
</tgroup>
</informaltable>

</sect1> <!-- keyboardmapping -->

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

<sect1 id="editing-reporter">
<title>The Problem Reporter</title>

<para>
(... to be written ...)
</para>
</sect1> <!-- editing-reporter -->

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

<sect1 id="searchinggrepping">
<title>Searching and Grepping</title>
<indexterm zone="searchinggrepping"><primary>searching</primary></indexterm>
<indexterm zone="searchinggrepping"><primary>finding</primary></indexterm>

<sect2 id="searching">
<title>Searching for Text</title>

<para>
<keycombo>&Ctrl;<keycap>F</keycap></keycombo>- Find
<keycombo>&Ctrl;<keycap>R</keycap></keycombo>- Replace
</para>

</sect2> <!-- searching -->


<sect2 id="isearch">
<title>ISearch</title>
<indexterm zone="isearch"><primary>isearch</primary></indexterm>
<indexterm zone="isearch"><primary>incremental search</primary></indexterm>
<indexterm zone="isearch"><primary>search</primary><secondary>incremental</secondary></indexterm>

<para>
The conventional search with <menuchoice><guimenu>Edit</guimenu>
<guimenuitem>Find</guimenuitem></menuchoice> requires you to specify the full
search term before starting. Most of the time, it is much faster to search
incrementally. If you click into the edit field labeled
<guilabel>ISearch</guilabel> in the toolbar, the search is performed as you
type. You will find that often the desired term is already found after typing
in 3 or 4 letters.
</para>

</sect2> <!-- isearch -->


<sect2 id="grep">
<title>Grep</title>
<indexterm zone="grep"><primary>search</primary><secondary>in files</secondary></indexterm>

<para>
Both search mechanisms described above are restricted to searching within one
source file. An additional tool which allows you to search through a (possibly
large) number of files is available through the
<guimenuitem>Search in Files...</guimenuitem> item in the
<guimenu>Edit</guimenu> menu. It is basically a frontend for the
&grep;(1) program.
</para>

<para>
In the dialog, you can specify which files are searched. There is a number of
wildcard patterns available in a combobox. In this way, you can easily
restrict the find mechanism to header files. Furthermore, you specify a
directory where the search is started. If you check the
<guibutton>Recursive</guibutton> box, the search iterates through all
directories in the hierarchy below this one.
</para>

<para>
The search term is in general a regular expression following POSIX syntax.
For example, you can use the term <literal>"\&lt;K.*"</literal> if you want to
find all words which begin with the letter K. The following characters
are interpreted in a special way:
</para>

<informaltable>
<tgroup cols="2">
<tbody>

<row><entry>
  <literal>.</literal>
</entry><entry>
  Matches any character
</entry></row>
<row><entry>
  <literal>^</literal>
</entry><entry>
Matches the beginning of a line
</entry></row>
<row><entry>
  <literal>$</literal>
</entry><entry>
  Matches the end of a line
</entry></row>
<row><entry>
  <literal>\&lt;</literal>
</entry><entry>
  Matches the beginning of a word
</entry></row>
<row><entry>
  <literal>\&gt;</literal>
</entry><entry>
  Matches the end of a word
</entry></row>
<row><entry>
  <literal>?</literal>
</entry><entry>
  The preceding item matches less than once
</entry></row>
<row><entry>
  <literal>*</literal>
</entry><entry>
  The preceding item is matched zero or more times
</entry></row>
<row><entry>
  <literal>+</literal>
</entry><entry>
  The preceding item is matched once or more times
</entry></row>
<row><entry>
  <literal>{n}</literal>
</entry><entry>
  The preceding item is matched exactly n times
</entry></row>
<row><entry>
  <literal>{n,}</literal>
</entry><entry>
  The preceding item is matched n or more times
</entry></row>
<row><entry>
  <literal>{,n}</literal>
</entry><entry>
  The preceding item matches less than n times
</entry></row>
<row><entry>
  <literal>{n,m}</literal>
</entry><entry>
  The preceding item matches at least <literal>n</literal> times but less
than <literal>m</literal> times
</entry></row>

</tbody>
</tgroup>
</informaltable>

<para>
Backreferences to bracketed subexpressions are also available by the notation
<literal>\n</literal>.
</para>

<para>
For C++ programmers, as special bonus there are some search templates
available for typical patterns. These allow you to search for example
all calls of member functions of a certain object.
</para>

<para>
Once you start the search by clicking on the <guibutton>Search</guibutton>
button, it will be performed by an external, asynchronous process. All found
items will appear in the view called <guilabel>Grep</guilabel>. You can then
jump to the found items by clicking on them. Note that grep scans the files
as they stored in the file system. If you have modified versions of them in
your editor, you may get some mismatches in the line number, or some found
items will be invalid. You can avoid this by saving all files beforehand.
</para>

</sect2> <!-- grep -->

</sect1> <!-- searchinggrepping -->

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

<sect1 id="code-completion">
<title>Code Completion</title>

<para>
(... to be written ...)
</para>
</sect1> <!-- code-completion -->

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

<sect1 id="newfiles">
<title>Creating New Files and Classes</title>

<para>
(... to be written ...)
</para>

<sect2 id="newfiles-edittemplates">
<title>Editing the Templates</title>

<para>
(... to be written ...)
</para>
</sect2> <!-- newfiles-edittemplates -->

</sect1> <!-- newfiles -->

</chapter> <!-- editing -->
<!-- ====================================================================== -->