This file is indexed.

/usr/share/doc/kde/HTML/en/kate/vi.docbook is in kate-data 4:4.8.2-0ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
<!--pulled in by kwrite too-->
<chapter id="vi-input-mode-chapter">
<chapterinfo>
<authorgroup><author>
&Erlend.Hamberg; &Erlend.Hamberg.mail;
</author>
<!-- TRANS:ROLES_OF_TRANSLATORS -->
</authorgroup>
</chapterinfo>

<title>The VI Input Mode</title>

<sect1 id="vi-mode-sect1">
<title>VI Input Mode</title>

<para>The goal of the VI mode is not to be a complete replacement
for Vim and support all Vim’s features. Its aim is to make
the <quote>Vim way</quote> of text editing - and the Vim habits learned -
available for programs using the &kappname; text editor as their internal editor.</para>

<para>The VI mode aims integrate nicely with the programs and deviate
from Vim’s behavior where it makes sense. For example,
<userinput><command>:w</command></userinput> will open a save dialog in &kappname;’s VI mode.</para>

<para>To enable the VI input mode for all new views, go to
<menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure &kappname;...</guimenuitem>
<guimenu>Editing</guimenu><guimenuitem>VI Input Mode</guimenuitem></menuchoice>.
On this tab you can set options for the VI Input Mode and define and edit
the key mapping in this mode.
VI Input Mode can also be toggled with the <guimenuitem>VI Input Mode</guimenuitem>
setting in the <guimenu>Edit</guimenu> menu. (The default shortcut key is
<keycombo action="simul"><keysym>Meta</keysym>&Ctrl;<keycap>V</keycap></keycombo>
 - where <keysym>Meta</keysym> usually is the <keysym>Windows</keysym> key).</para>

<note>
<para>Many Vi Mode keyboard commands are case-sensitive, unlike most &kde;
keyboard shortcuts.  That means that <userinput>y</userinput> and
<userinput>Y</userinput> are different commands.  To enter the
<userinput>y</userinput> (yank) command, make sure <keysym>Caps Lock</keysym> is
disabled and press <keycap>Y</keycap>.  To enter the <userinput>Y</userinput>
(yank to end of line) command, 
<keycombo action="simul">&Shift;<keycap>Y</keycap></keycombo>.</para>

<para>This does not apply to commands that use the &Ctrl; key, which may be
entered regardless of <keycap>Caps Lock</keycap> mode and without pressing 
&Shift;.  However, some commands require the use of &Ctrl;-key combination
followed by another key which is case sensitive.  For instance, to input
<quote><keycombo action="simul">&Ctrl;<keycap>W</keycap></keycombo>,
<userinput>h</userinput></quote> (switch to split view right) make sure
<keycap>Caps Lock</keycap> is disabled, press
<keycombo action="simul">&Ctrl;<keycap>W</keycap></keycombo>, release, and
then press <keycap>H</keycap>.</para>
</note>

<sect2 id="vi-incompatibilities">
<title>Incompatibilities with Vim</title>

<para>There are only a few features of &kappname;’s VI mode which are incompatible
with Vim (not counting things missing). They are listed below together
with the respective reasons.</para>
<itemizedlist>
<listitem>
<para>&kappname;: <userinput>U</userinput> and
<keycombo action="simul">&Ctrl;<keycap>R</keycap></keycombo> is redo.</para>
<para>Vim: <keycombo action="simul">&Ctrl;<keycap>R</keycap></keycombo> is
normal redo, <keycap>U</keycap> is used to undo all latest changes on one line.</para>
<para>The reason for having <keycap>U</keycap> act as redo in &kappname;’s VI mode is
that the shortcut <keycombo action="simul">&Ctrl;<keycap>R</keycap></keycombo>
by default is taken by &kappname;’s replace function (search and replace). By default,
the VI mode won’t override &kappname;’s shortcuts (this can be configured in
<menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure &kappname;...</guimenuitem>
<guimenu>Editing</guimenu><guimenuitem>Vi Input Mode</guimenuitem></menuchoice>),
therefore a redo-action needs to be available as a <quote>regular</quote> key press, too.
Besides, the behavior of the <userinput>U</userinput> command in Vim does not map well
to &kappname;’s internal undo system, so it would be non-trivial to support anyway.</para>
</listitem>
<listitem>
<para>&kappname;: <userinput><command>print</command></userinput> shows the <guilabel>Print</guilabel> dialog.</para>
<para>Vim: <userinput><command>print</command></userinput> prints the lines of
the given range like its grandfather ed.</para>
<para>Commands like <userinput><command>:print</command></userinput> are available
not only in the VI mode but for users using <quote>regular</quote> &kappname;, too - therefore
the <userinput><command>:print</command></userinput> command opens
the print dialog - following the principle of least surprise instead of
mimicking Vim’s behavior.</para>
</listitem>
<listitem>
<para>&kappname;: <userinput>Y</userinput> yanks to end of line.</para>
<para>Vim: <userinput>Y</userinput> yanks whole line, just like
<userinput>y</userinput><userinput>y</userinput>.</para>
<para>VI’s behavior for the <userinput>Y</userinput> command is in practice a bug.
For both change and delete commands,
<userinput>c</userinput><userinput>c</userinput>/
<userinput>d</userinput><userinput>d</userinput> will do its action on
the current line and <userinput>C</userinput>/<userinput>D</userinput> will work from the
cursor column to the end of the line. However, both
<userinput>y</userinput><userinput>y</userinput> and <userinput>Y</userinput>
yanks the current line. In &kappname;’s VI Mode <userinput>Y</userinput> will yank to the end
of the line. This is described as <quote>more logical</quote> in the Vim
<ulink url="http://vimdoc.sourceforge.net/htmldoc/change.html#Y">documentation</ulink>.
</para>
</listitem>
<listitem>
<para>&kappname;: <userinput>O</userinput> and <userinput>o</userinput> opens [<replaceable>count</replaceable>] new lines
and puts you in insert mode.</para>
<para>Vim: <userinput>O</userinput> and <userinput>o</userinput> opens a new line and inserts
text [<replaceable>count</replaceable>] times when leaving insert mode.</para>
<para>This is mostly done as a consequence of witnessing many people being
confused by this behavior on a vim irc channel (#vim on freenode).</para>
</listitem>
</itemizedlist>

</sect2>

<sect2 id="vi-switching-modes">
<title>Switching Modes</title>

<itemizedlist>
<listitem>
<para><emphasis>Normal Mode</emphasis> permits you to enter commands to navigate or edit
a document, and is the default mode.  You can return to it from any other mode by
pressing &Esc;.
</para></listitem>
<listitem>
<para><emphasis>Visual Mode</emphasis> permits you to highlight text in a document.
Most Normal Mode commands are also valid in this mode.  You can enter it by pressing
<userinput>v</userinput> to select characters or <userinput>V</userinput> to select lines.
</para></listitem>
<listitem>
<para><emphasis>Insert Mode</emphasis> permits you to edit the document directly. You
can enter it by pressing <userinput>i</userinput> or one of several other commands
listed below.
</para></listitem>
<listitem>
<para><emphasis>Command Mode</emphasis> invokes &kappname;'s command line,
permitting you to run many commands available in Vi implementations as well as
some specific to &kappname;.  For more information on these commands, see
<xref linkend="advanced-editing-tools-commandline" />.  To use it,
press <keycap>:</keycap>, enter the command, and press &Enter;.</para>
</listitem>
</itemizedlist>
<!-- add a picture like http://de.wikipedia.org/wiki/Vi#Arbeitsmodi here? -->
</sect2>

<sect2 id="vi-integration">
<title>Integration with Kate features</title>
<itemizedlist>

<listitem>
<para>Visual Mode is entered automatically when text is selected with the mouse.
It is also entered when using functions of Kate that select text, such as Select
All (either from the menu or via <keycombo action="simul">&Ctrl;<keycap>A</keycap>
</keycombo>.)</para>
</listitem>

<listitem>
<para>Vi marks and <link linkend="kate-part-bookmarks">Kate bookmarks</link> are
integrated.  When a mark is created in Vi Mode, a corresponding Kate bookmark is
created and appears in the <guimenu>Bookmarks</guimenu> menu.  Conversely, when
a Kate bookmark is created, a corresponding Vi mark at the 0 column is also
created.</para>
</listitem>

</itemizedlist>
</sect2>

<sect2 id="vi-normal-visual-mode-commands">
<title>Supported normal/visual mode commands</title>

<informaltable>
<tgroup cols="2">
<!--thead>
<row>
<entry><para>Key</para></entry>
<entry><para>Command</para></entry>
</row>
</thead-->
<tbody>
<row><entry><para><userinput>a</userinput></para></entry>
<entry><para>Enter Insert Mode; append after cursor</para></entry>
</row>
<row><entry><para><userinput>A</userinput></para></entry>
<entry><para>Enter Insert Mode; append after line</para></entry>
</row>
<row><entry><para><userinput>i</userinput></para></entry>
<entry><para>Enter Insert Mode; insert before cursor</para></entry>
</row>
<row><entry><para><userinput>v</userinput></para></entry>
<entry><para>Enter Visual Mode; select characters</para></entry>
</row>
<row><entry><para><userinput>V</userinput></para></entry>
<entry><para>Enter Visual Mode; select lines</para></entry>
</row>
<row><entry><para><userinput>o</userinput></para></entry>
<entry><para>Open a new line below current line</para></entry>
</row>
<row><entry><para><userinput>O</userinput></para></entry>
<entry><para>Open a new line above current line</para></entry>
</row>
<row><entry><para><userinput>J</userinput></para></entry>
<entry><para>Join lines</para></entry>
</row>
<row><entry><para><userinput>c</userinput></para></entry>
<entry><para>Change:  follow by a motion to delete and enter Insert mode</para></entry>
</row>
<row><entry><para><userinput>C</userinput></para></entry>
<entry><para>Change to end of line:  Delete to end of line and enter Insert Mode</para></entry>
</row>
<row><entry><para><userinput>cc</userinput></para></entry>
<entry><para>Change line:  Delete line and enter Insert Mode</para></entry>
</row>
<row><entry><para><userinput>s</userinput></para></entry>
<entry><para>Substitute character<!--needs explanation--></para></entry>
</row>
<row><entry><para><userinput>S</userinput></para></entry>
<entry><para>Substitute line<!--needs explanation--></para></entry>
</row>
<row><entry><para><userinput>dd</userinput></para></entry>
<entry><para>Delete line</para></entry>
</row>
<row><entry><para><userinput>d</userinput></para></entry>
<entry><para>Follow by a motion to delete</para></entry>
</row>
<row><entry><para><userinput>D</userinput></para></entry>
<entry><para>Delete to end of line</para></entry>
</row>
<row><entry><para><userinput>x</userinput></para></entry>
<entry><para>Delete character to right of cursor</para></entry>
</row>
<row><entry><para><userinput>X</userinput></para></entry>
<entry><para>Delete character to left of cursor</para></entry>
</row>
<row><entry><para><userinput>gu</userinput></para></entry>
<entry><para>Follow with a motion to make lowercase</para></entry>
</row>
<row><entry><para><userinput>g</userinput></para></entry>
<entry><para>Make the current line lowercase</para></entry>
</row>
<row><entry><para><userinput>gU</userinput></para></entry>
<entry><para>Follow with a motion to make uppercase</para></entry>
</row>
<row><entry><para><userinput>g</userinput></para></entry>
<entry><para>Make the current line uppercase</para></entry>
</row>
<row><entry><para><userinput>y</userinput></para></entry>
<entry><para>Follow by a motion to <quote>yank</quote> (copy)</para></entry>
</row>
<row><entry><para><userinput>yy</userinput></para></entry>
<entry><para>Yank (copy) line</para></entry>
</row>
<row><entry><para><userinput>Y</userinput></para></entry>
<entry><para>Yank (copy) line</para></entry>
</row>
<row><entry><para><userinput>p</userinput></para></entry>
<entry><para>Paste after cursor</para></entry>
</row>
<row><entry><para><userinput>P</userinput></para></entry>
<entry><para>Paste before cursor</para></entry>
</row>
<row><entry><para><userinput>r</userinput></para></entry>
<entry><para>Follow with a character to replace the character after the cursor</para></entry>
</row>
<row><entry><para><userinput>:</userinput></para></entry>
<entry><para>Enter Command Mode</para></entry>
</row>
<row><entry><para><userinput>/</userinput></para></entry>
<entry><para>Search</para></entry>
</row>
<row><entry><para><userinput>u</userinput></para></entry>
<entry><para>Undo</para></entry>
</row>
<row><entry><para><keycombo action="simul">&Ctrl;<keycap>R</keycap></keycombo></para></entry>
<entry><para>Redo</para></entry>
</row>
<row><entry><para><userinput>U</userinput></para></entry>
<entry><para>Redo</para></entry>
</row>
<row><entry><para><userinput>m</userinput></para></entry>
<entry><para>Set mark (can be used by motions later)</para></entry>
</row>
<row><entry><para><userinput>n</userinput></para></entry>
<entry><para>Find next</para></entry>
</row>
<row><entry><para><userinput>N</userinput></para></entry>
<entry><para>Find previous</para></entry>
</row>
<row><entry><para><userinput>&gt;&gt;</userinput></para></entry>
<entry><para>Indent line</para></entry>
</row>
<row><entry><para><userinput>&lt;&lt;</userinput></para></entry>
<entry><para>Unindent line</para></entry>
</row>
<row><entry><para><userinput>&gt;</userinput></para></entry>
<entry><para>Indent lines</para></entry>
</row>
<row><entry><para><userinput>&lt;</userinput></para></entry>
<entry><para>Unindent lines</para></entry>
</row>
<row><entry><para><keycombo action="simul">&Ctrl;<keycap>F</keycap></keycombo></para></entry>
<entry><para>Page down</para></entry>
</row>
<row><entry><para><keycombo action="simul">&Ctrl;<keycap>B</keycap></keycombo></para></entry>
<entry><para>Page up</para></entry>
</row>
<row><entry><para><userinput>ga</userinput></para></entry>
<entry><para>Print the ASCII value of the character</para></entry>
</row>
<row><entry><para><userinput>.</userinput></para></entry>
<entry><para>Repeat last change</para></entry>
</row>
<row><entry><para><userinput>==</userinput></para></entry>
<entry><para>commandAlignLine<!--needs explanation--></para></entry>
</row>
<row><entry><para><userinput>=</userinput></para></entry>
<entry><para>commandAlignLines<!--needs explanation--></para></entry>
</row>
<row><entry><para><userinput>~</userinput></para></entry>
<entry><para>Change case of current character</para></entry>
</row>
<row><entry><para><keycombo action="simul">&Ctrl;<keycap>S</keycap></keycombo></para></entry>
<entry><para>Split view horizontally</para></entry>
</row>
<row><entry><para><keycombo action="simul">&Ctrl;<keycap>V</keycap></keycombo></para></entry>
<entry><para>Split view vertically</para></entry>
</row>
<row><entry><para><keycombo action="simul">&Ctrl;
<keycap>W</keycap></keycombo>, <userinput>w</userinput></para></entry>
<entry><para>Cycle to next split window</para></entry>
</row>
<row><entry><para><keycombo action="simul">&Ctrl;
<keycap>W</keycap></keycombo>, <userinput>h</userinput></para>
<para><keycombo action="seq"><keycombo action="simul">&Ctrl;
<keycap>W</keycap></keycombo><keysym>Left</keysym></keycombo></para></entry>
<entry><para>Go to left split window</para></entry>
</row>
<row><entry><para><keycombo action="simul">&Ctrl;
<keycap>W</keycap></keycombo>, <userinput>l</userinput></para>
<para><keycombo action="seq"><keycombo action="simul">&Ctrl;
<keycap>W</keycap></keycombo><keysym>Right</keysym></keycombo></para></entry>
<entry><para>Go to right split window</para></entry>
</row>
<row><entry><para><keycombo action="simul">&Ctrl;
<keycap>W</keycap></keycombo>, <userinput>k</userinput></para>
<para><keycombo action="seq"><keycombo action="simul">&Ctrl;
<keycap>W</keycap></keycombo><keysym>Up</keysym></keycombo></para></entry>
<entry><para>Go to above split window</para></entry>
</row>
<row><entry><para><keycombo action="simul">&Ctrl;
<keycap>W</keycap></keycombo>, <userinput>j</userinput></para>
<para><keycombo action="seq"><keycombo action="simul">&Ctrl;
<keycap>W</keycap></keycombo><keysym>Down</keysym></keycombo></para></entry>
<entry><para>Go to below split window</para></entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect2>

<sect2 id="vi-supported-motions">
<title>Supported motions</title>

<para>These may be used to move around a document in Normal or Visual mode, or in
conjunction with one of the above commands.  They may be preceded by a count,
which indicates how many of the appropriate movements to make.</para>

<informaltable>
<tgroup cols="2">
<!--thead>
<row>
<entry><para>Key</para></entry>
<entry><para>Command</para></entry>
</row>
</thead-->
<tbody>
<row><entry><para><userinput>h</userinput></para></entry>
<entry><para>Left</para></entry>
</row>
<row><entry><para><keysym>Left</keysym></para></entry>
<entry><para>Left</para></entry>
</row>
<row><entry><para>&Backspace;</para></entry>
<entry><para>Left</para></entry>
</row>
<row><entry><para><userinput>j</userinput></para></entry>
<entry><para>Down</para></entry>
</row>
<row><entry><para><keysym>Down</keysym></para></entry>
<entry><para>Down</para></entry>
</row>
<row><entry><para><userinput>k</userinput></para></entry>
<entry><para>Up</para></entry>
</row>
<row><entry><para><keysym>Up</keysym></para></entry>
<entry><para>Up</para></entry>
</row>
<row><entry><para><userinput>l</userinput></para></entry>
<entry><para>Right</para></entry>
</row>
<row><entry><para><keysym>Right</keysym></para></entry>
<entry><para>Right</para></entry>
</row>
<row><entry><para><keysym>Space</keysym></para></entry>
<entry><para>Right</para></entry>
</row>
<row><entry><para><userinput>$</userinput></para></entry>
<entry><para>End of line</para></entry>
</row>
<row><entry><para><keycap>End</keycap></para></entry>
<entry><para>End of line</para></entry>
</row>
<row><entry><para><userinput>0</userinput></para></entry>
<entry><para>First character of line (Column 0)</para></entry>
</row>
<row><entry><para><keycap>Home</keycap></para></entry>
<entry><para>First character of line</para></entry>
</row>
<row><entry><para><userinput>^</userinput></para></entry>
<entry><para>First non-blank character of line</para></entry>
</row>
<row><entry><para><userinput>f</userinput></para></entry>
<entry><para>Follow by character to move to right of cursor</para></entry>
</row>
<row><entry><para><userinput>F</userinput></para></entry>
<entry><para>Follow by character to move to left of cursor</para></entry>
</row>
<row><entry><para><userinput>t</userinput></para></entry>
<entry><para>Follow by character to move to right of cursor, placing the cursor on character before it</para></entry>
</row>
<row><entry><para><userinput>T</userinput></para></entry>
<entry><para>Follow by character to move to left of cursor, placing the cursor on character before it</para></entry>
</row>
<row><entry><para><userinput>gg</userinput></para></entry>
<entry><para>First line</para></entry>
</row>
<row><entry><para><userinput>G</userinput></para></entry>
<entry><para>Last line</para></entry>
</row>
<row><entry><para><userinput>w</userinput></para></entry>
<entry><para>Next Word</para></entry>
</row>
<row><entry><para><userinput>W</userinput></para></entry>
<entry><para>Next word separated by whitespace</para></entry>
</row>
<row><entry><para><userinput>b</userinput></para></entry>
<entry><para>Previous word</para></entry>
</row>
<row><entry><para><userinput>B</userinput></para></entry>
<entry><para>Previous word separated by whitespace</para></entry>
</row>
<row><entry><para><userinput>e</userinput></para></entry>
<entry><para>End of word</para></entry>
</row>
<row><entry><para><userinput>E</userinput></para></entry>
<entry><para>End of word separated by whitespace</para></entry>
</row>
<row><entry><para><userinput>ge</userinput></para></entry>
<entry><para>End of previous word</para></entry>
</row>
<row><entry><para><userinput>gE</userinput></para></entry>
<entry><para>End of previous word separated by whitespace</para></entry>
</row>
<row><entry><para><userinput>|</userinput></para></entry>
<entry><para>Follow by a column number to move to that column</para></entry>
</row>
<row><entry><para><userinput>%</userinput></para></entry>
<entry><para>Follow by an item to move to that item<!--needs explanation--></para></entry>
</row>
<row><entry><para><userinput>`</userinput></para></entry>
<entry><para>Mark</para></entry>
</row>
<row><entry><para><userinput></userinput></para></entry>
<entry><para>First non-whitespace character of the line the mark is on</para></entry>
</row>
<row><entry><para><userinput>[[</userinput></para></entry>
<entry><para>Previous opening bracket</para></entry>
</row>
<row><entry><para><userinput>]]</userinput></para></entry>
<entry><para>Next opening bracket</para></entry>
</row>
<row><entry><para><userinput>[]</userinput></para></entry>
<entry><para>Previous closing bracket</para></entry>
</row>
<row><entry><para><userinput>][</userinput></para></entry>
<entry><para>Next closing bracket</para></entry>
</row>
<row><entry><para><keycombo action="simul">&Ctrl;<keycap>I</keycap></keycombo></para></entry>
<entry><para>Jump forward to next location</para></entry></row>
<row><entry><para><keycombo action="simul">&Ctrl;<keycap>O</keycap></keycombo></para></entry>
<entry><para>Jump back to previous location</para></entry></row>
<row><entry><para><userinput>H</userinput></para></entry>
<entry>Go to first line of screen</entry></row>
<row><entry><para><userinput>M</userinput></para></entry>
<entry>Go to middle line of screen</entry></row>
<row><entry><para><userinput>L</userinput></para></entry>
<entry>Go to last line of screen</entry></row>
<row><entry><para><userinput>%<replaceable>percentage</replaceable></userinput></para></entry>
<entry><para>Go to specified percentage of the document</para></entry></row>
<row><entry><para><userinput>gk</userinput></para></entry>
<entry><para>Go one line up visually (when using dynamic word wrap)</para></entry></row>
<row><entry><para><userinput>gj</userinput></para></entry>
<entry><para>Go one line down visually (when using dynamic word wrap)</para></entry></row>
</tbody>
</tgroup>
</informaltable>
</sect2>

<sect2 id="vi-supported-text-objects">
<title>Supported text objects</title>

<para>These may be used to select certain portions of a document.</para>

<informaltable>
<tgroup cols="2">
<!--thead>
<row>
<entry><para>Key</para></entry>
<entry><para>Command</para></entry>
</row>
</thead-->
<tbody>
<row><entry><para><userinput>iw</userinput></para></entry>
<entry><para>Inner word: word including whitespace</para></entry>
</row>
<row><entry><para><userinput>aw</userinput></para></entry>
<entry><para>A word: word excluding whitespace</para></entry>
</row>
<row><entry><para><userinput>i"</userinput></para></entry>
<entry><para>Previous double-quote (<userinput>"</userinput>) to next double-quote,
including quotation marks</para></entry>
</row>
<row><entry><para><userinput>a”</userinput></para></entry>
<entry><para>Previous double-quote (<userinput>"</userinput>) to next double-quote,
excluding quotation marks</para></entry>
</row>
<row><entry><para><userinput>i'</userinput></para></entry>
<entry><para>Previous single-quote (<userinput>'</userinput>) to next single-quote,
including quotation marks</para></entry>
</row>
<row><entry><para><userinput>a'</userinput></para></entry>
<entry><para>Previous single-quote (<userinput>'</userinput>) to next single-quote,
excluding quotation marks</para></entry>
</row>
<row><entry><para><userinput>i(</userinput></para></entry>
<entry><para>Previous opening parenthesis [<userinput>(</userinput>] to next closing
parenthesis [<userinput>)</userinput>], including the parenthesis</para></entry>
</row>
<row><entry><para><userinput>a(</userinput></para></entry>
<entry><para>Previous opening parenthesis [<userinput>(</userinput>] to next closing
parenthesis [<userinput>)</userinput>], excluding the parenthesis</para></entry>
</row>
<row><entry><para><userinput>i[</userinput></para></entry>
<entry><para>Previous opening square bracket (<userinput>[</userinput>) to next closing
square bracket (<userinput>]</userinput>), including the brackets</para></entry>
</row>
<row><entry><para><userinput>a[</userinput></para></entry>
<entry><para>Previous opening square bracket (<userinput>[</userinput>) to next closing
square bracket (<userinput>]</userinput>), excluding the brackets</para></entry>
</row>
<row><entry><para><userinput>i{</userinput></para></entry>
<entry><para>Previous opening curly bracket (<userinput>{</userinput>) to next closing
curly bracket (<userinput>}</userinput>), including the brackets</para></entry>
</row>
<row><entry><para><userinput>a{</userinput></para></entry>
<entry><para>Previous opening curly bracket (<userinput>{</userinput>) to next closing
curly bracket (<userinput>}</userinput>), excluding the brackets</para></entry>
</row>
<row><entry><para><userinput>i&lt;</userinput></para></entry>
<entry><para>Previous opening angle bracket (<userinput>&lt;</userinput>) to next closing
angle bracket (<userinput>&gt;</userinput>), including the brackets</para></entry>
</row>
<row><entry><para><userinput>a&lt;</userinput></para></entry>
<entry><para>Previous opening angle bracket (<userinput>&lt;</userinput>) to next closing
square bracket (<userinput>&gt;</userinput>), excluding the brackets</para></entry>
</row>
<row><entry><para><userinput>i`</userinput></para></entry>
<entry><para>Previous backtick (<userinput>`</userinput>) to next backtick,
including the backticks</para></entry>
</row>
<row><entry><para><userinput>a`</userinput></para></entry>
<entry><para>Previous backtick (<userinput>`</userinput>) to next backtick,
excluding the backticks</para></entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect2>

<sect2 id="vi-insert-mode-commands">
<title>Supported insert mode commands</title>

<informaltable>
<tgroup cols="2">
<!--thead>
<row>
<entry><para>Key</para></entry>
<entry><para>Command</para></entry>
</row>
</thead-->
<tbody>
<row><entry><para><keycombo action="simul">&Ctrl;<keycap>D</keycap></keycombo></para></entry>
<entry><para>Unindent</para></entry>
</row>
<row><entry><para><keycombo action="simul">&Ctrl;<keycap>T</keycap></keycombo></para></entry>
<entry><para>Indent</para></entry>
</row>
<row><entry><para><keycombo action="simul">&Ctrl;<keycap>E</keycap></keycombo></para></entry>
<entry><para>commandInsertFromBelow</para></entry>
</row>
<row><entry><para><keycombo action="simul">&Ctrl;<keycap>Y</keycap></keycombo></para></entry>
<entry><para>Delete word</para></entry>
</row>
<row><entry><para><keycombo action="simul">&Ctrl;<keycap>W</keycap></keycombo></para></entry>
<entry><para>Delete word</para></entry>
</row>
<row><entry><para><keycombo action="simul">&Ctrl;<keycap>Home</keycap></keycombo></para></entry>
<entry><para>Move to first character in the document</para></entry>
</row>
<row><entry><para><keycombo action="simul">&Ctrl;<keycap>R</keycap></keycombo>
<userinput>n</userinput></para></entry>
<entry>Insert the contents of register <literal>n</literal></entry></row>
<row><entry><para><keycombo action="simul">&Ctrl;<keycap>O</keycap></keycombo>,
<replaceable>command</replaceable></para></entry>
<entry><para>Enter normal mode for one command only</para></entry></row>
<row><entry><para><keycombo action="simul">&Ctrl;<keycap>A</keycap></keycombo></para></entry>
<entry><para>Increment currently selected number</para></entry></row>
<row><entry><para><keycombo action="simul">&Ctrl;<keycap>X</keycap></keycombo></para></entry>
<entry><para>Decrement currently selected number</para></entry></row>
</tbody>
</tgroup>
</informaltable>
</sect2>

<sect2 id="vi-text-object">
<title>The Comma Text Object</title>

<para>This object is missing in Vim. The comma text object
makes it easy to modify parameter lists in C-like languages and other comma
separated lists. It is basically the area between two commas or between a comma
and a bracket. In the line shown in the illustration to the right, the three
ranges this text object can span are highlighted in red.</para>

<screenshot id="screenshot-resources">
<screeninfo>An example of Comma Text Object</screeninfo>
<mediaobject>
<imageobject><imagedata fileref="comma-to.png" format="PNG"/></imageobject>
<textobject><phrase>An example of Comma Text Object</phrase></textobject>
<caption><para>Comma text object ranges. If the cursor is over &eg;
<replaceable>arg2</replaceable>, pressing
<userinput>ci</userinput>, (<quote>change inner comma</quote>)
would delete <replaceable>double arg2</replaceable> and place the cursor between
the two commas in insert mode. A very convenient way to change a function's
parameters.</para></caption>
</mediaobject>
</screenshot>

</sect2>

<sect2 id="vi-missing-features">
<title>Missing Features</title>

<para>As stated earlier, the goal of &kappname;’s VI Mode is not to support 100% of
Vim’s features, however, there are some features which are sorely missed:</para>
<itemizedlist>
<listitem>
<para>Visual block mode - especially the ability to prepend/append text to the
visual block selection.</para></listitem>
<listitem>
<para>Having ex commands available in other programs than the &kappname; application.</para></listitem>
<listitem>
<para>The search code needs improvement and the <userinput>*</userinput> and
<userinput>#</userinput>commands should just be regular searches.</para></listitem>
</itemizedlist>
</sect2>

</sect1>

</chapter>