Source

xemacs-21.4 / man / viper-cmd.texi

   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
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
@node Commands,,Customization,Top,Top
@chapter Commands

This section is a semi-automatically bowdlerized version of the Vi 
reference created by @* @samp{maart@@cs.vu.nl} and others. It can be 
found on the Vi archives. Very little has been changed for Viper.@refill

@menu
* Groundwork::			Textual Conventions and Viper basics
* Text Handling::		Moving, Editing, Undoing.
* Display::			Scrolling.
* File and Buffer Handling::	Editing, Writing and Quitting.
* Mapping::			Mapping Keys, Keyboard Macros
* Shell Commands::		Accessing Shell Commands, Processing Text
* Options::			Ex options, the @kbd{:set} commands
* Emacs Related Commands::	Meta Keys, Windows
* Mouse-bound Commands::        Search and insertion of text
@end menu

@node Groundwork, Text Handling, Commands, Commands
@comment  node-name,  next,  previous,  up
@section Groundwork

The VI command set is based on the idea of combining motion commands
with other commands. The motion command is used as a text region
specifier for other commands.
We classify motion commands into @dfn{point commands} and
@dfn{line commands}.@refill

@cindex point commands

The point commands are:

@quotation
@kbd{h}, @kbd{l}, @kbd{0},  @kbd{$}, @kbd{w}, @kbd{W}, @kbd{b}, @kbd{B},
@kbd{e}, @kbd{E}, @kbd{(}, @kbd{)}, @kbd{/}, @kbd{?}, @kbd{`}, @kbd{f},
@kbd{F}, @kbd{t}, @kbd{T}, @kbd{%}, @kbd{;}, @kbd{,}, @kbd{^}
@end quotation

@cindex line commands

The line commands are:

@quotation
@kbd{j}, @kbd{k}, @kbd{+}, @kbd{-}, @kbd{H}, @kbd{M}, @kbd{L}, @kbd{@{},
@kbd{@}}, @kbd{G}, @kbd{'},  @kbd{[[}, @kbd{]]}, @kbd{[]}
@end quotation
@noindent

Text Deletion Commands (@xref{Deleting Text}), Change commands
(@xref{Changing Text}), even Shell Commands (@xref{Shell Commands})
use these commands to describe a region of text to operate on.

@cindex r and R region specifiers

Viper adds two region descriptors, @kbd{r} and @kbd{R}. These describe
the Emacs regions (@xref{Basics}), but they are not movement commands.

The command description uses angle brackets @samp{<>} to indicate
metasyntactic variables, since the normal conventions of using simple
text can be confusing with Viper where the commands themselves are
characters. Watch out where @kbd{<} shift commands and @kbd{<count>} are
mentioned together!!!

@kindex <move>
@kindex <a-z>
@kindex <address>
@cindex <move>
@cindex <a-z>
@cindex <address>
@cindex movements

@samp{<move>} refers to the above movement commands, and @samp{<a-z>}
refers to registers or textmarkers from @samp{a} to @samp{z}. Note
that the @samp{<move>}  is described by full move commands, that is to
say they will take counts, and otherwise behave like normal move commands.
@cindex Ex addresses
@samp{<address>} refers to Ex line addresses, which include

@table @kbd
@item . <No address>
Current line
@item .+n .-n
Add or subtract for current line
@item number
Actual line number, use @kbd{.=} to get the line number
@item '<a-z>
Textmarker
@item $
Last line
@item x,y
Where x and y are one of the above
@item %
@cindex % (Ex address)
For the whole file, same as (1,$).
@item /pat/
@item ?pat?
Next or previous line with pattern pat
@end table

@cindex % (Current file)
Note that @samp{%} is used in Ex commands to mean current file. If you
want a @samp{%} in your command, it must be escaped as @samp{\%}.
@cindex # (Previous file)
Similarly, @samp{#} expands to the previous file. The previous file is
the first file in @kbd{:args} listing. This defaults to previous window
in the VI sense if you have one window only.

@kindex <args>
@kindex <cmd>
@cindex <args>
@cindex <cmd>
@noindent
Others like @samp{<args> -- arguments}, @samp{<cmd> -- command} etc.
should be fairly obvious.

@noindent
Common characters referred to include:

@table @kbd
@item <sp>
Space 
@item <ht>
Tab 
@item <lf>
Linefeed 
@item <esc>
Escape
@item <cr>
Return, Enter
@end table
@cindex <cr>
@cindex <esc>
@cindex <lf>
@cindex <ht>
@cindex <sp>

@cindex words
@cindex WORDS
@cindex char
@cindex CHAR

We also use @samp{word} for alphanumeric/non-alphanumeric words, and 
@samp{WORD} for whitespace delimited words. @samp{char} refers to any
ASCII character, @samp{CHAR} to non-whitespace character. 
Brackets @samp{[]} indicate optional parameters; @samp{<count>} also 
optional, usually defaulting to 1. Brackets are elided for
@samp{<count>} to eschew obfuscation.

Viper's idea of Vi's words is slightly different from Vi. First, Viper
words understand Emacs symbol tables. Therefore, all symbols declared to be
alphanumeric in a symbol table can automatically be made part of the Viper
word.  This is useful when, for instance, editing text containing European,
Cyrillic, etc., letters.

Second, Viper lets you depart from Vi's idea of a word by changing the
value of @code{vip-syntax-preference}. By default, this variable is set to
@code{'strict-vi}, which means that alphanumeric symbols are exactly as
in Vi.
However, if the value is @code{'reformed-vi} then alphanumeric
symbols will be those specified by the current Emacs syntax table (which
may be different for different major modes) plus the underscore symbol
@code{_}. The user can also specify the value @code{'emacs}, which would
make Viper use exactly the Emacs notion of word. In particular, the
underscore may not be part of a word. Finally, if
@code{vip-syntax-preference} is set to @code{'extended}, Viper words would
consist of characters that are classified as alphanumeric @emph{or} as
parts of symbols. This is convenient for writing programs and in many other
situations.

@vindex @code{vip-syntax-preference}
@cindex syntax table

@code{vip-syntax-preference} is a local variable, so it can have different
values for different major modes. For instance, in programming modes it can
have the value @code{'extended}. In text modes where words contain special
characters, such as European (non-English) letters, Cyrillic letters, etc.,
the value can be @code{'reformed-vi} or @code{'emacs}.

Changes to @code{vip-syntax-preference} should be done in the hooks to
various major modes. Furthermore, for these changes to take effect, you
should execute @code{(vip-update-alphanumeric-class)} right after changing
the value of @code{vip-syntax-preference}.

The above discussion concerns only the movement commands. In regular
expressions, words remain the same as in Emacs.  That is, the expressions
@code{\w}, @code{\>}, @code{\<}, etc., use Emacs' idea of what is a word,
and they don't look into the value of variable
@code{vip-syntax-preference}. This is because Viper doesn't change syntax
tables in order to not thwart the various major modes that set these
tables.

The usual Emacs convention is used to indicate Control Characters, i.e
C-h for Control-h. @emph{Do not confuse this to mean the separate
characters C - h!!!} The @kbd{^} is itself, never used to indicate a
Control character.

@node Text Handling, Display, Groundwork, Commands
@section Text Handling

@menu
* Move Commands::		Moving, Searching
* Marking::		        Textmarkers in Viper and the Emacs Mark.
* Appending Text::		Text insertion, Shifting, Putting
* Editing in Insert State::	Autoindent, Quoting etc.
* Deleting Text::		Deleting
* Changing Text::		Changing, Replacement, Joining
* Search and Replace::		Searches, Query Replace, Pattern Commands
* Yanking::			Yanking, Viewing Registers
* Undoing::			Multiple Undo, Backups
@end menu

@node Move Commands,Marking,,Text Handling
@subsection Move Commands

@cindex movement commands
@cindex searching
@cindex textmarkers
@cindex markers
@cindex column movement
@cindex paragraphs
@cindex headings
@cindex sections
@cindex sentences
@cindex matching parens
@cindex paren matching

@table @kbd
@item <count>  h  C-h
<count> chars to the left.
@item <count>  j  <lf> C-n
<count> lines downward.
@item <count>  l  <sp>
<count> chars to the right.
@item <count>  k  C-p
<count> lines upward.
@item <count>  $
To the end of line <count> from the cursor.
@item <count>  ^
To the first CHAR <count> - 1 lines lower.
@item <count>  -
To the first CHAR <count> lines higher.
@item <count>  +  <cr>
To the first CHAR <count> lines lower.
@item  0
To the first char of the line.
@item <count> |
To column <count>
@item <count>  f<char>
<count> <char>s to the right (find).
@item <count>  t<char>
Till before <count> <char>s to the right.
@item <count>  F<char>
<count> <char>s to the left.
@item <count>  T<char>
Till after <count> <char>s to the left.
@item <count>  ;
Repeat latest @kbd{f t F T} <count> times.
@item <count>  ,
Repeat latest @kbd{f t F T}
<count> times in opposite direction.
@item <count>  w
<count> words forward.
@item <count>  W
<count> WORDS forward.
@item <count>  b
<count> words backward.
@item <count>  B
<count> WORDS backward.
@item <count>  e
To the end of word <count> forward.
@item <count>  E
To the end of WORD <count> forward.
@item <count>  G
Go to line <count> (default end-of-file).
@item <count>  H
To line <count> from top of the screen (home).
@item <count>  L
To line <count> from bottom of the screen (last).
@item  M
To the middle line of the screen.
@item <count>  )
<count> sentences forward.
@item <count>  (
<count> sentences backward.
@item <count>  @}
<count> paragraphs forward.
@item <count>  @{
<count> paragraphs backward.
@item <count>  ]]
To the <count>th heading.
@item <count>  [[
To the <count>th previous heading.
@item <count>  []
To the end of <count>th heading.
@item  m<a-z>
Mark the cursor position with a letter.
@item  `<a-z>
To the mark.
@item  '<a-z>
To the first CHAR of the line with the mark.
@item [<a-z>
Show contents of textmarker.
@item ]<a-z>
Show contents of register.
@item  ``
To the cursor position before the latest absolute
jump (of which are examples @kbd{/} and @kbd{G}).
@item  ''
To the first CHAR of the line on which the cursor
was placed before the latest absolute jump.
@item <count>  /<string>
To the <count>th occurrence of <string>.
@item <count>  /<cr>
To the <count>th occurrence of <string> from previous @kbd{/ or ?}.
@item <count>  ?<string>
To the <count>th previous occurrence of <string>.
@item <count>  ?<cr>
To the <count>th previous occurrence of <string> from previous @kbd{? or /}.
@item  n
Repeat latest @kbd{/} @kbd{?} (next).
@item  N
Repeat latest search in opposite direction.
@item C-c /
Without a prefix argument, this command toggles
case-sensitive/case-insensitive search modes and plain vanilla/regular
expression search. With the prefix argument 1, i.e.,
@kbd{1 C-c /}, this toggles case-sensitivity; with the prefix argument 2,
toggles plain vanilla search and search using
regular expressions. @xref{Viper Specials}, for alternative ways to invoke
this function.
@cindex vanilla search
@cindex case-sensitive search
@cindex case-insensitive search
@item  %
Find the next bracket and go to its match.
@end table
@kindex @kbd{%}
@kindex @kbd{C-c /}
@kindex @kbd{N}
@kindex @kbd{n}
@kindex @kbd{?<cr>}
@kindex @kbd{/<cr>}
@kindex @kbd{?<string>}
@kindex @kbd{/<string>}
@kindex @kbd{''}
@kindex @kbd{``}
@kindex @kbd{]<a-z>}
@kindex @kbd{[<a-z>}
@kindex @kbd{'<a-z>}
@kindex @kbd{`<a-z>}
@kindex @kbd{m<a-z>}
@kindex @kbd{[]}
@kindex @kbd{[[}
@kindex @kbd{]]}
@kindex @kbd{@{}
@kindex @kbd{@}}
@kindex @kbd{(}
@kindex @kbd{)}
@kindex @kbd{M}
@kindex @kbd{L}
@kindex @kbd{H}
@kindex @kbd{G}
@kindex @kbd{E}
@kindex @kbd{e}
@kindex @kbd{B}
@kindex @kbd{b}
@kindex @kbd{W}
@kindex @kbd{w}
@kindex @kbd{,}
@kindex @kbd{;}
@kindex @kbd{T<char>}
@kindex @kbd{F<char>}
@kindex @kbd{t<char>}
@kindex @kbd{f<char>}
@kindex @kbd{|}
@kindex @kbd{0}
@kindex @kbd{<cr>}
@kindex @kbd{+}
@kindex @kbd{-}
@kindex @kbd{^}
@kindex @kbd{$}
@kindex @kbd{C-p}
@kindex @kbd{<lf>}
@kindex @kbd{<sp>}
@kindex @kbd{C-n}
@kindex @kbd{C-h}
@kindex @kbd{h}
@kindex @kbd{j}
@kindex @kbd{k}
@kindex @kbd{l}

@node Marking,Appending Text,Move Commands,Text Handling
@subsection Marking

Emacs mark is referred to in the region specifiers @kbd{r} and @kbd{R}.
@xref{Emacs Preliminaries} and @pxref{Basics} for explanation. Also
see @ref{Mark,,Mark,emacs,The GNU Emacs manual}, for an explanation of
the Emacs mark ring.

@cindex marking

@table @kbd
@item m<a-z>
Mark the current file and position with the specified letter.
@item m .
Set the Emacs mark (@xref{Emacs Preliminaries}) at point.
@item m <
Set the Emacs mark at beginning of buffer.
@item m >
Set the Emacs mark at end of buffer.
@item m ,
Jump to the Emacs mark.
@item :mark <char>
 Mark position with text marker named <char>. This is an Ex command.
@item :k <char>
 Same as @kbd{:mark}.
@item ``
Exchange point and mark.
@item ''
Exchange point and mark and go to the first CHAR on line.
@item '<a-z>
Go to specified Viper mark.
@item
Go to specified Viper mark and go to the first CHAR on line.
@end table
@kindex @kbd{m<a-z>}
@kindex @kbd{m.}
@kindex @kbd{m>}
@kindex @kbd{m<}
@kindex @kbd{m,}
@findex @kbd{:mark}
@findex @kbd{:k}
@kindex @kbd{''}
@kindex @kbd{``}
@kindex @kbd{`<a-z>}
@kindex @kbd{'<a-z>}

@node  Appending Text, Editing in Insert State, Marking,Text Handling
@subsection Appending Text

@xref{Options} to see how to change tab and shiftwidth size. See the GNU
Emacs manual, or try @kbd{C-ha tabs} (If you have turned Emacs help on).
Check out the variable @code{indent-tabs-mode} to put in just spaces.
Also see options for word-wrap.

@cindex inserting
@cindex appending
@cindex paste
@cindex put

@table @kbd
@item <count>  a
<count> times after the cursor.
@item <count>  A
<count> times at the end of line.
@item <count>  i
<count> times before the cursor (insert).
@item <count>  I
<count> times before the first CHAR of the line
@item <count>  o
On a new line below the current (open).
The count is only useful on a slow terminal.
@item <count>  O
On a new line above the current.
The count is only useful on a slow terminal.
@item <count>  ><move>
Shift the lines described by <count><move> one
shiftwidth to the right (layout!).
@item <count>  >>
Shift <count> lines one shiftwidth to the right.
@item <count>  ["<a-z1-9>]p
Put the contents of the (default undo) buffer
<count> times after the cursor. The register will
be automatically downcased.
@item <count>  ["<a-z1-9>]P
Put the contents of the (default undo) buffer
<count> times before the cursor. The register will
@item [<a-z>
Show contents of textmarker.
@item ]<a-z>
Show contents of register.
@item <count>  .
Repeat previous command <count> times. For destructive
commands as well as undo.
@item f1 1 and f1 2
While @kbd{.} repeats the last destructive command,
these two macros repeat the second-last and the third-last destructive
commands. @xref{Vi Macros}, for more information on Vi macros.
@item C-c M-p and C-c M-n
In Vi state,
these commands help peruse the history of Vi's destructive commands.
Successive typing of @kbd{C-c M-p} causes Viper to search the history in
the direction 
of older commands, while hitting @kbd{C-c M-n} does so in reverse
order. Each command in the history is displayed in the Minibuffer. The
displayed command can 
then be executed by typing `@kbd{.}'.

Since typing the above sequences of keys may be tedious, the
functions doing the perusing can be bound to unused keyboard keys in the
@file{~/.vip} file. @xref{Viper Specials}, for details.
@end table
@kindex @kbd{C-c M-p}
@kindex @kbd{C-c M-n}
@kindex @kbd{.}
@kindex @kbd{]<a-z>}
@kindex @kbd{[<a-z>}
@kindex @kbd{P}
@kindex @kbd{p}
@kindex @kbd{"<a-z1-9>p}
@kindex @kbd{"<a-z1-9>P}
@kindex @kbd{>>}
@kindex @kbd{><move>}
@kindex @kbd{O}
@kindex @kbd{o}
@kindex @kbd{i}
@kindex @kbd{A}
@kindex @kbd{a}

@node Editing in Insert State, Deleting Text, Appending Text,Text Handling
@subsection Editing in Insert State

Minibuffer can be edited similarly to Insert state, and you can switch
between Insert/Replace/Vi states at will.
Some users prefer plain Emacs feel in the Minibuffer. To this end, set
@var{vip-vi-style-in-minibuffer} to @code{nil}.

@cindex Insert state

@table @kbd
@item C-v
Deprive the next char of its special meaning (quoting).
@item C-h
One char back.
@item C-w
One word back.
@item C-u
Back to the begin of the change on the
current line.

@end table
@kindex @kbd{C-u}
@kindex @kbd{C-w}
@kindex @kbd{C-v}

@node Deleting Text, Changing Text, Editing in Insert State, Text Handling
@subsection Deleting Text


There is one difference in text deletion that you should be
aware of. This difference comes from Emacs and was adopted in Viper
because we find it very useful. In Vi, if you delete a line, say, and then
another line, these two deletions are separated and are put back
separately if you use the @samp{p} command. In Emacs (and Viper), successive
series of deletions that are @emph{not interrupted} by other commands are
lumped together, so the deleted text gets accumulated and can be put back
as one chunk. If you want to break a sequence of deletions so that the
newly deleted text could be put back separately from the previously deleted
text, you should perform a non-deleting action, e.g., move the cursor one
character in any direction.

@cindex shifting text

@table @kbd
@item <count>  x
Delete <count> chars under and after the cursor.
@item <count>  X
Delete <count> chars before the cursor.
@item <count>  d<move>
Delete from point to endpoint of <count><move>.
@item <count>  dd
Delete <count> lines.
@item  D
The rest of the line.
@item <count>  <<move>
Shift the lines described by <count><move> one
shiftwidth to the left (layout!).
@item <count>  <<
Shift <count> lines one shiftwidth to the left.
@end table
@kindex @kbd{<<}
@kindex @kbd{<<move>}
@kindex @kbd{D}
@kindex @kbd{dd}
@kindex @kbd{d<move>}
@kindex @kbd{X}
@kindex @kbd{x}

@node Changing Text, Search and Replace, Deleting Text,Text Handling
@subsection Changing Text

@cindex joining lines
@cindex changing case
@cindex quoting regions
@cindex substitution

@table @kbd
@item <count>  r<char>
Replace <count> chars by <char> - no <esc>.
@item <count>  R
Overwrite the rest of the line,
appending change @var{count - 1} times.
@item <count>  s
Substitute <count> chars.
@item <count>  S
Change <count> lines.
@item <count>  c<move>
Change from begin to endpoint of <count><move>.
@item <count>  cc
Change <count> lines.
@item <count>  C
The rest of the line and <count> - 1 next lines.
@item <count>  =<move>
Reindent the region described by move.
@item <count>  ~
Switch lower and upper cases.
@item <count>  J
Join <count> lines (default 2).
@item  :[x,y]s/<p>/<r>/<f>
Substitute (on lines x through y) the pattern
<p> (default the last pattern) with <r>.  Useful
flags <f> are @samp{g} for @samp{global} (i.e. change every
non-overlapping occurrence of <p>) and @samp{c} for
@samp{confirm} (type @samp{y} to confirm a particular
substitution, else @samp{n} ).  Instead of @kbd{/} any
punctuation CHAR unequal to <space> <tab> and <lf> can be used as
delimiter.
@item  :[x,y]copy [z]
 Copy text between @kbd{x} and @kbd{y} to the position after @kbd{z}.
@item  :[x,y]t [z]
 Same as @kbd{:copy}.
@item  :[x,y]move [z]
 Move text between @kbd{x} and @kbd{y} to the position after @kbd{z}.
@item  &
Repeat latest Ex substitute command, e.g.
@kbd{:s/wrong/good}.
@item C-c /
Toggle case-sensitive search. With prefix argument, toggle vanilla/regular
expression search.
@item #c<move>
Change upper case characters in the region to lower case.
@item #C<move>
Change lower case characters in the region to upper case.
@item #q<move> 
Insert specified string at the beginning of each line in the region
@item C-c M-p and C-c M-n
In Insert and Replace states, these keys are bound to commands that peruse
the history of the text 
previously inserted in other insert or replace commands. By repeatedly typing
@kbd{C-c M-p} or @kbd{C-c M-n}, you will cause Viper to
insert these previously used strings one by one.
When a new string is inserted, the previous one is deleted. 

In Vi state, these keys are bound to functions that peruse the history of
destructive Vi commands.
@xref{Viper Specials}, for details.
@end table
@kindex @kbd{C-c M-p}
@kindex @kbd{C-c M-n}
@kindex @kbd{#q<move> }
@kindex @kbd{#C<move>}
@kindex @kbd{#c<move>}
@kindex @kbd{&}
@findex @kbd{:substitute/<p>/<r>/<f>}
@findex @kbd{:s/<p>/<r>/<f>}
@findex @kbd{:copy [z]}
@findex @kbd{:t [z]}
@findex @kbd{:move [z]}
@kindex @kbd{J}
@kindex @kbd{~}
@kindex @kbd{=<move>}
@kindex @kbd{C}
@kindex @kbd{cc}
@kindex @kbd{c<move>}
@kindex @kbd{S}
@kindex @kbd{s}
@kindex @kbd{R}
@kindex @kbd{r<char>}

@node Search and Replace, Yanking, Changing Text,Text Handling
@subsection Search and Replace

@xref{Groundwork}, for Ex address syntax. @xref{Options} to see how to
get literal (non-regular-expression) search and how to stop search from
wrapping around.

@table @kbd
@item <count>  /<string>
To the <count>th occurrence of <string>.
@item <count>  ?<string>
To the <count>th previous occurrence of <string>.
@item <count>  g<move>
Search for the text described by move. (off by default)
@item n
Repeat latest @kbd{/} @kbd{?} (next).
@item N
Idem in opposite direction.
@item %
Find the next bracket and go to its match
@item :[x,y]g/<string>/<cmd>
@cindex text processing
Search globally [from line x to y] for <string>
and execute the Ex <cmd> on each occurrence.
@item :[x,y]v/<string>/<cmd>
Execute <cmd> on the lines that don't match.
@item #g<move>
Execute the last keyboard macro for each line in the region.
@xref{Macros and Registers}, for more info.
@item Q
Query Replace.
@item :ta <name>
Search in the tags file where <name> is defined (file, line), and go to it.
@item  :[x,y]s/<p>/<r>/<f>
Substitute (on lines x through y) the pattern <p> (default the last
pattern) with <r>.  Useful
flags <f> are @samp{g} for @samp{global} (i.e. change every
non-overlapping occurrence of <p>) and @samp{c} for
@samp{confirm} (type @samp{y} to confirm a particular
substitution, else @samp{n}).  Instead of @kbd{/} any
punctuation CHAR unequal to <space> <tab> and <lf> can be used as delimiter.
@item  &
 Repeat latest Ex substitute command, e.g. @kbd{:s/wrong/good}.
@end table
@kindex @kbd{&}
@findex @kbd{:substitute/<p>/<r>/<f>}
@kindex @kbd{Q}
@kindex @kbd{#g<move>}
@findex @kbd{:v/<string>/<cmd>}
@findex @kbd{:g/<string>/<cmd>}
@findex @kbd{:global/<string>/<cmd>}
@findex @kbd{:tag <name>}
@kindex @kbd{%}
@kindex @kbd{N}
@kindex @kbd{n}
@kindex @kbd{g<move>}
@kindex @kbd{?<string>}
@kindex @kbd{/<string>}

@node Yanking,Undoing,Search and Replace,Text Handling
@subsection Yanking

@cindex cut and paste
@cindex paste

@table @kbd
@item <count>  y<move>
Yank from begin to endpoint of <count><move>.
@item <count>  "<a-z>y<move>
Yank from begin to endpoint of <count><move> to register.
@item <count>  "<A-Z>y<move>
Yank from begin to endpoint of <count><move> and append
to register.
@item <count>  yy
<count> lines.
@item <count>  Y
Idem (should be equivalent to @kbd{y$} though).
@item  m<a-z>
Mark the cursor position with a letter.
@item [<a-z>
Show contents of textmarker.
@item ]<a-z>
Show contents of register.
@item <count>  ["<a-z1-9>]p
Put the contents of the (default undo) buffer
<count> times after the cursor. The register will
be automatically downcased.
@item <count>  ["<a-z1-9>]P
Put the contents of the (default undo) buffer
<count> times before the cursor. The register will
@end table
@kindex @kbd{P}
@kindex @kbd{p}
@kindex @kbd{"<a-z1-9>p}
@kindex @kbd{"<a-z1-9>P}
@kindex @kbd{]<a-z>}
@kindex @kbd{[<a-z>}
@kindex @kbd{m<a-z>}
@kindex @kbd{Y}
@kindex @kbd{yy}
@kindex @kbd{"<A-Z>y<move>}
@kindex @kbd{"<a-z>y<move>}
@kindex @kbd{y<move>}
@kindex @kbd{yank}
@findex @kbd{:yank}

@node Undoing,, Yanking,Text Handling
@subsection Undoing

@cindex undo
@cindex backup files

@table @kbd
@item  u U
Undo the latest change.
@item  .
Repeat undo.
@item :q!
Quit Vi without writing.
@item :e!
Re-edit a messed-up file.
@item :rec
Recover file from autosave. Viper also creates backup files
that have a @samp{~} appended to them.
@end table
@findex @kbd{:rec}
@findex @kbd{:e!}
@findex @kbd{:q!}
@kindex @kbd{.}
@kindex @kbd{U}
@kindex @kbd{u}

@node Display, File and Buffer Handling, Text Handling, Commands
@section Display

@cindex scrolling

@table @kbd
@item C-g
At user level 1,
give file name, status, current line number
and relative position. @*
At user levels 2 and higher, abort the current command.
@item C-c g
Give file name, status, current line number and relative position -- all
user levels.
@item C-l
Refresh the screen. 
@item <count> C-e
Expose <count> more lines at bottom, cursor stays put (if possible).
@item <count> C-y
Expose <count> more lines at top, cursor stays put (if possible).
@item <count> C-d
Scroll <count> lines downward (default the number of the previous scroll;
initialization: half a page).
@item <count> C-u
Scroll <count> lines upward (default the number of the previous scroll;
initialization: half a page). 
@item <count> C-f
<count> pages forward.
@item <count> C-b
<count> pages backward (in older versions @kbd{C-b} only works without count).
@item <count> z<cr>
@item zH
Put line <count> at the top of the window (default the current line).
@item <count> z-
@item zL
Put line <count> at the bottom of the window
(default the current line).
@item <count> z.
@item zM
Put line <count> in the center of the window
(default the current line).
@end table
@kindex @kbd{zM}
@kindex @kbd{zL}
@kindex @kbd{zH}
@kindex @kbd{z<cr>}
@kindex @kbd{z.}
@kindex @kbd{z-}
@kindex @kbd{z<cr>}
@kindex @kbd{C-b}
@kindex @kbd{C-f}
@kindex @kbd{C-u}
@kindex @kbd{C-d}
@kindex @kbd{C-y}
@kindex @kbd{C-e}
@kindex @kbd{C-l}
@kindex @kbd{C-g}


@node File and Buffer Handling, Mapping, Display,Commands
@section File and Buffer Handling

@cindex multiple files

In all file handling commands, space should be typed before entering the file
name. If you need  to type a modifier, such as @kbd{>>} or @kbd{!}, don't
put any space between the command and the modifier.

@table @kbd
@item :q
Quit buffer except if modified.
@item :q!
Quit buffer without checking. In Viper, these two commands
are identical. Confirmation is required if exiting modified buffers that
visit files.
@item :susp
@item :stop
Suspend Viper
@item :[x,y] w
Write the file. Viper nakes sure that a final newline is always added to
any file where this newline is missing. This is done by setting Emacs
variable @code{require-final-newline} to @code{t}. If you don't like this
feature, use @code{setq-default} to set @code{require-final-newline} to
@code{nil}. This must be done either in @file{.vip} file or in
@code{.emacs} after Viper is loaded.
@item :[x,y] w <name>
Write to the file <name>.
@item :[x,y] w>> <name>
Append the buffer to the file <name>.  There should be no space between
@kbd{w} and @kbd{>>}. Type space after the @kbd{>>} and see what happens.
@item :w! <name>
Overwrite the file <name>. In Viper, @kbd{:w} and @kbd{:w!} are identical.
Confirmation is required for writing to an existing file (if this is not
the file the buffer is visiting) or to a read-only file.
@item :x,y w <name>
Write lines x through y to the file <name>.
@item :wq
Write the file and kill buffer.
@item :r <file> [<file> ...]
Read file into a buffer, inserting its contents after the current line.
@item :xit
Same as @kbd{:wq}.
@item :W
Save unsaved buffers, asking for confirmation.
@item :WW
Like @kbd{W}, but without asking for confirmation. 
@item ZZ
Save current buffer and kill it. If user level is 1, then save all files
and kill Emacs. Killing Emacs is the wrong way to use it, so you should
switch to  higher user levels as soon as possible.
@item :x [<file>]
Save and kill buffer.
@item :x! [<file>]
@kbd{:w![<file>]} and @kbd{:q}.
@item :pre
Preserve the file -- autosave buffers.
@item :rec
Recover file from autosave.
@item :f
Print file name and lines.
@item :cd [<dir>]
Set the working directory to <dir> (default home directory).
@item :pwd
Print present working directory.
@item :e [+<cmd>] <files>
Edit files. If no filename is given, edit the file visited by the current
buffer. If buffer was modified or the file changed on disk, ask for
confirmation. Unlike Vi, Viper allows @kbd{:e} to take multiple arguments.
The first file is edited the same way as in Vi. The rest are visited
in the usual Emacs way.
@item :e! [+<cmd>] <files>
Re-edit file. If no filename, reedit current file.
In Viper, unlike Vi, @kbd{e!} is identical to @kbd{:e}. In both cases, the
user is asked to confirm if there is a danger of discarding changes to a
buffer.
@item :q!
Quit Vi without writing.
@item C-^
Edit the alternate (normally the previous) file.
@item :rew
Obsolete
@item :args
List files not shown anywhere with counts for next
@item :n [count]  [+<cmd>] [<files>]
Edit <count> file, or edit files. The count comes from :args. 
@item :N [count] [+<cmd>] [<files>] 
Like @kbd{:n}, but the meaning of the variable
@var{ex-cycle-other-window} is reversed.
@item :b    
Switch to another buffer. If @var{ex-cycle-other-window} is @code{t},
switch in another window. Buffer completion is supported.
@item :B    
Like @kbd{:b}, but the meaning of @var{ex-cycle-other-window} is reversed.
@item :<address>r <name>
Read the file <name> into the buffer after the line <address>.
@item v, V, C-v
Edit a file in current or another window, or in another frame. File name
is typed in Minibuffer. File completion and history are supported.
@end table
@kindex @kbd{v}
@kindex @kbd{V}
@findex @kbd{:args}
@findex @kbd{:rew}
@kindex @kbd{C-^}
@findex @kbd{:e! [<files>]}
@findex @kbd{:e [<files>]}
@findex @kbd{:edit [<files>]}
@findex @kbd{:edit! [<files>]}
@findex @kbd{:q!}
@findex @kbd{:q}
@findex @kbd{:quit}
@findex @kbd{:quit!}
@findex @kbd{:f}
@findex @kbd{:rec}
@findex @kbd{:r}
@findex @kbd{:read}
@findex @kbd{:pre}
@kindex @kbd{ZZ}
@findex @kbd{:wq}
@findex @kbd{:w <file>}
@findex @kbd{:w! <file>}
@findex @kbd{:w >> <file>}
@findex @kbd{:write <file>}
@findex @kbd{:write! <file>}
@findex @kbd{:write >> <file>}
@findex @kbd{:W}
@findex @kbd{:WW}
@findex @kbd{:Write}
@findex @kbd{:WWrite}
@findex @kbd{:WWrite}
@findex @kbd{:x}
@findex @kbd{:x!}
@findex @kbd{:susp}
@findex @kbd{:stop}
@findex @kbd{:n [<count> | <file>]}
@findex @kbd{:cd [<dir>]}
@findex @kbd{:pwd}

@node Mapping, Shell Commands, File and Buffer Handling, Commands
@section Mapping

@cindex keybindings
@cindex keymapping

@table @kbd
@item :map <string>
 Start defining a Vi-style keyboard macro.
 For instance, typing
 @kbd{:map www} followed by @kbd{:!wc %} and then typing @kbd{C-x )}
 will cause @kbd{www} to run wc on
 current file (Vi replaces @samp{%} with the current file name).
@item C-x )
 Finish defining a keyboard macro.
 In Viper, this command completes the process of defining all keyboard
macros, whether they are Emacs-style or Vi-style.
This is a departure from Vi, needed to allow WYSIWYG mapping of
keyboard macros and to permit the use of function keys and arbitrary Emacs
functions in the macros.
@item :unmap <string>
 Deprive <string> of its mappings in Vi state.
@item :map! <string>
 Map a macro for Insert state.
@item :unmap! <string>
 Deprive <string> of its mapping in Insert state (see @kbd{:unmap}).
@item @@<a-z>
 In Vi state,
 execute the contents of register as a command.
@item @@@@
 In Vi state,
 repeat last register command. 
@item @@#
In Vi state,
 begin keyboard macro. End with @@<a-z>. This will
 put the macro in the proper register. Register will
 be automatically downcased.
 @xref{Macros and Registers}, for more info.
@item @@!<a-z>
 In Vi state,
 yank anonymous macro to register
@item *
 In Vi state,
 execute anonymous macro (defined by C-x( and C-x )).
@item C-x e
 Like @kbd{*}, but works in all Viper states.
@item #g<move>
 Execute the last keyboard macro for each line in the region.
 @xref{Macros and Registers}, for more info.
@item [<a-z>
 Show contents of textmarker.
@item ]<a-z>
 Show contents of register.
@end table
@kindex @kbd{]<a-z>}
@kindex @kbd{[<a-z>}
@kindex @kbd{#g<move>}
@kindex @kbd{*}
@kindex @kbd{@@!<a-z>}
@kindex @kbd{@@#}
@kindex @kbd{@@@@}
@kindex @kbd{@@<a-z>}
@findex @kbd{:unmap <char>}
@findex @kbd{:map <char> <seq>}
@findex @kbd{:unmap! <char>}
@findex @kbd{:map! <char> <seq>}

@node Shell Commands, Options, Mapping, Commands
@section Shell Commands

@cindex % (Current file)

Note that % is used in Ex commands to mean current file. If you want a %
in your command, it must be escaped as @samp{\%}. 
@cindex % (Ex address)
However if % is the
first character, it stands as the address for the whole file.
@cindex # (Previous file)
Similarly, @samp{#} expands to the previous file. The previous file is
the first file in @kbd{:args} listing. This defaults
to the previous file in the VI sense if you have one window.@refill

@cindex shell commands

@table @kbd
@item :sh
Execute a subshell in another window
@item :[x,y]!<cmd>
Execute a shell <cmd> [on lines x through y;
% is replace by current file, \% is changed to %
@item :[x,y]!! [<args>]
Repeat last shell command [and append <args>].
@item :!<cmd>
Just execute command and display result in a buffer.
@item :!! <args>
Repeat last shell command and append <args>
@item <count> !<move><cmd>
The shell executes <cmd>, with standard
input the lines described by <count><move>,
next the standard output replaces those lines
(think of @samp{cb}, @samp{sort}, @samp{nroff}, etc.).
@item <count> !!<cmd>
Give <count> lines as standard input to the
shell <cmd>, next let the standard output
replace those lines.
@item :[x,y] w !<cmd>
Let lines x to y be standard input for <cmd>
(notice the <sp> between @kbd{w} and @kbd{!}).
@item :<address>r !<cmd>
Put the output of <cmd> after the line <address> (default current).
@item :<address>r <name>
Read the file <name> into the buffer after the line <address> (default
current).
@end table
@findex @kbd{:<address>r <name>}
@findex @kbd{:<address>r !<cmd>}
@findex @kbd{!<cmd>}
@findex @kbd{!!<cmd>}
@findex @kbd{!<move><cmd>}
@findex @kbd{:w !<cmd>}
@findex @kbd{:x,y w !<cmd>}
@findex @kbd{:!! <args>}
@findex @kbd{:!<cmd>}
@findex @kbd{:sh}

@node Options,Emacs Related Commands,Shell Commands,Commands
@section Options

@cindex Vi options

@table @kbd
@item ai
@cindex autoindent
autoindent -- In append mode after a <cr> the
cursor will move directly below the first
CHAR on the previous line.  
@item ic
@cindex case and searching
ignorecase -- No distinction between upper and
lower cases when searching.
@item magic
@cindex literal searching
Regular expressions used in searches; nomagic means no regexps.
@item ro
@cindex readonly files
readonly -- The file is not to be changed.
If the user attempts to write to this file, confirmation will be requested.
@item sh=<string>
@cindex shell
shell -- The program to be used for shell escapes
(default @samp{$SHELL} (default @file{/bin/sh})).
@item sw=<count>
@cindex layout
@cindex shifting text
shiftwidth -- Gives the shiftwidth (default 8 positions).
@item sm
@cindex paren matching
@cindex matching parens
showmatch -- Whenever you append a @kbd{)}, Vi shows
its match if it's on the same page; also with
@kbd{@{} and @kbd{@}}.  If there's no match, Vi will beep.
@item ts=<count>
@cindex changing tab width
@cindex tabbing
tabstop -- The length of a <ht>; warning: this is
only IN the editor, outside of it <ht>s have
their normal length (default 8 positions).
@item wm=<count>
@cindex auto fill
@cindex word wrap
wrapmargin -- In append mode Vi automatically
puts a <lf> whenever there is a <sp> or <ht>
within <wm> columns from the right margin.
@item ws
@cindex searching
wrapscan -- When searching, the end is
considered @samp{stuck} to the begin of the file.
@item :set <option>
Turn <option> on.
@item :set no<option>
Turn <option> off.
@item :set <option>=<value>
Set <option> to <value>.
@end table
@findex @kbd{:set <option>=<value>}
@findex @kbd{:set no<option>}
@findex @kbd{:set <option>}
@findex @kbd{:set ws}
@findex @kbd{:set wrapscan}
@findex @kbd{:set wm=<count>}
@findex @kbd{:set wrapmargin=<count>}
@findex @kbd{:set ts=<count>}
@findex @kbd{:set tabstop=<count>}
@findex @kbd{:set tab-stop-local=<count>}
@findex @kbd{:set sm}
@findex @kbd{:set showmatch}
@findex @kbd{:set sw=<count>}
@findex @kbd{:set shiftwidth=<count>}
@findex @kbd{:set sh=<string>}
@findex @kbd{:set shell=<string>}
@findex @kbd{:set ro}
@findex @kbd{:set readonly}
@findex @kbd{:set magic}
@findex @kbd{:set ic}
@findex @kbd{:set ignorecase}
@findex @kbd{:set ai}
@findex @kbd{:set autoindent}

@node Emacs Related Commands,,Options,Commands
@section Emacs Related Commands

@table @kbd
@item _
Begin Meta command in Vi state. Most often used as _x (M-x).
@item C-z
Begin Meta command in Insert state.
@item C-z
Switch between Emacs and Vi states.
@item C-x0
Close Window
@item C-x1
Close Other Windows
@item C-x2
Split Window
@item C-xo
Move among windows
@item C-xC-f
Emacs find-file, useful in Insert state
@item C-y 
Put back the last killed text. Similar to Vi's @kbd{p}, but also works in
Insert and Replace state. This command doesn't work in Vi command state,
since this binding is taken for something else.
@item M-y
Undoes the last @kbd{C-y} and puts another kill from the kill ring.
Using this command, you can try may different kills until you find the one
you need.
@end table
@kindex @kbd{M-y}
@kindex @kbd{C-y}
@kindex @kbd{C-xC-f}
@kindex @kbd{C-xo}
@kindex @kbd{C-x2}
@kindex @kbd{C-x1}
@kindex @kbd{C-x0}
@kindex @kbd{C-z}
@kindex @kbd{C-z}
@kindex @kbd{_}

@node Mouse-bound Commands,,,Commands
@section Mouse-bound Commands

The following two mouse actions are normally bound to to special search and
insert commands in of Viper:

@table @kbd
@item S-mouse-1 (Emacs)
@item meta button1up (XEmacs)
Holding Shift (or Meta, if XEmacs) and clicking mouse button 1 will
initiate search for 
a region under the mouse pointer.
This command can take a prefix argument. Note: Viper sets this
binding only if this mouse action is not 
already bound to something else.
@xref{Viper Specials}, for more information.@refill

@item S-mouse-2 (Emacs)
@item meta button2up (XEmacs)
Holding Shift (or Meta, if XEmacs) and clicking button 2 of the mouse will
insert a region surrounding the mouse pointer.
This command can also take a prefix argument.
Note: Viper sets this binding only if this mouse action is not
already bound to something else.
@xref{Viper Specials}, for more details.@refill
@end table        
@kindex @kbd{S-mouse-1}
@kindex @kbd{S-mouse-2}
@kindex @kbd{meta button1up}
@kindex @kbd{meta button2up}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.