summaryrefslogtreecommitdiff
path: root/elpa/evil-1.15.0/doc/build/texinfo/evil.texi
blob: 3344e5fd689cf5efef1ec47a89e8f7f776dc82b3 (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
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
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
\input texinfo   @c -*-texinfo-*-
@c %**start of header
@setfilename evil.info
@documentencoding UTF-8
@ifinfo
@*Generated by Sphinx 4.3.2.@*
@end ifinfo
@settitle Evil documentation
@defindex ge
@paragraphindent 0
@exampleindent 4
@finalout
@dircategory Emacs
@direntry
* evil: (evil.info). Extensible vi layer for Emacs
@end direntry

@definfoenclose strong,`,'
@definfoenclose emph,`,'
@c %**end of header

@copying
@quotation
Evil 1.15.0, Jan 07, 2022

Eivind Fonn, Frank Fischer, Vegard Øye

Copyright @copyright{} 2011-2019, Eivind Fonn, Frank Fischer, Vegard Øye
@end quotation

@end copying

@titlepage
@title Evil documentation
@insertcopying
@end titlepage
@contents

@c %** start of user preamble

@c %** end of user preamble

@ifnottex
@node Top
@top Evil documentation
@insertcopying
@end ifnottex

@c %**start of body
@anchor{index doc}@anchor{44}
@c Evil documentation master file, created by
@c sphinx-quickstart on Thu Dec 12 10:34:49 2019.
@c You can adapt this file completely to your liking, but it should at least
@c contain the root `toctree` directive.

@menu
* Overview:: 
* Settings:: 
* Keymaps:: 
* Hooks:: 
* Extension:: 
* Frequently Asked Questions:: 
* Internals:: 
* The GNU Free Documentation License:: 
* Emacs lisp functions and variables:: 

@detailmenu
 --- The Detailed Node Listing ---

Overview

* Installation via package.el: Installation via package el. 
* Manual installation:: 
* Modes and states:: 

Settings

* The initial state:: 
* Keybindings and other behaviour:: 
* Search:: 
* Indentation:: 
* Cursor movement:: 
* Cursor display:: 
* Window management:: 
* Parenthesis highlighting:: 
* Miscellaneous:: 

Keymaps

* evil-define-key:: 
* Leader keys:: 

Extension

* Motions:: 
* Operators:: 
* Text objects:: 
* Range types:: 
* States:: 

Frequently Asked Questions

* Problems with the escape key in the terminal:: 
* Underscore is not a word character:: 

Internals

* Command properties:: 

@end detailmenu
@end menu

@node Overview,Settings,Top,Top
@anchor{overview doc}@anchor{45}@anchor{overview evil}@anchor{46}@anchor{overview overview}@anchor{47}
@chapter Overview


Evil is an extensible vi layer for Emacs.  It emulates the main
features of Vim, @footnote{@w{(1)} 
Vim is the most popular version of @emph{vi}, a modal text editor
with many implementations.  Vim also adds some functions of its
own, like visual selection and text objects.  For more information
see @uref{https://vim.org,the official Vim website}.
} turning Emacs into a modal editor.  Like Emacs in
general, Evil is extensible in Emacs Lisp.

@menu
* Installation via package.el: Installation via package el. 
* Manual installation:: 
* Modes and states:: 

@end menu

@node Installation via package el,Manual installation,,Overview
@anchor{overview installation-via-package-el}@anchor{48}
@section Installation via package.el


Evil is available as a package from MELPA stable, MELPA unstable and
NonGNU ELPA. This is the recommended way of installing Evil.

To set up @cite{package.el} to work with one of the MELPA repositories, you
can follow the instructions on melpa.org@footnote{https://melpa.org/#/getting-started}.

Alternatively you can use NonGNU ELPA. It is part of the default
package archives as of Emacs 28. For older Emacs versions you’ll need
to add it yourself:

@example
(add-to-list 'package-archives
             (cons "nongnu" (format "http%s://elpa.nongnu.org/nongnu/"
                                    (if (gnutls-available-p) "s" ""))))
@end example

Once that is done, you can execute the following commands:

@example
M-x package-refresh-contents
M-x package-install RET evil RET
@end example

Finally, add the following lines to your Emacs init file:

@example
(require 'evil)
(evil-mode 1)
@end example

@node Manual installation,Modes and states,Installation via package el,Overview
@anchor{overview manual-installation}@anchor{49}
@section Manual installation


First, install @cite{goto-chg} and @cite{cl-lib}.  If you have an Emacs version
of 24.3 or newer, you should already have @cite{cl-lib}.

Evil lives in a git repository.  To download Evil, do:

@example
git clone --depth 1 https://github.com/emacs-evil/evil.git
@end example

Then add the following lines to your Emacs init file:

@example
(add-to-list 'load-path "path/to/evil")
(require 'evil)
(evil-mode 1)
@end example

Ensure that your replace @code{path/to/evil} with the actual path to
where you cloned Evil.

@node Modes and states,,Manual installation,Overview
@anchor{overview modes-and-states}@anchor{4a}
@section Modes and states


The next time Emacs is started, it will come up in @emph{normal state},
denoted by @code{<N>} in the mode line.  This is where the main vi
bindings are defined.  Note that you can always disable normal state
with @code{C-z}, which switches to an “Emacs state” (denoted by
@code{<E>}) in which vi keys are completely disabled.  Press @code{C-z}
again to switch back to normal state.


@table @asis

@item state

Evil uses the term @emph{state} for what is called a “mode” in regular vi
usage, because @emph{modes} are understood in Emacs terms to mean
something else.
@end table

Evil defines a number of states by default:


@table @asis

@item normal state (@code{<N>})

This is the default “resting state” of Evil, in which the main body
of vi bindings are defined.

@item insert state (@code{<I>})

This is the state for insertion of text, where non-modified keys
will insert the corresponding character in the buffer.

@item visual state (@code{<V>})

A state for selecting text regions.  Motions are available for
modifying the selected region, and operators are available for
acting on it.

@item replace state (@code{<R>})

A special state mostly similar to insert state, except it replaces
text instead of inserting.

@item operator-pending state (@code{<O>})

A special state entered after launching an operator, but before
specifying the corresponding motion or text object.

@item motion state (@code{<M>})

A special state useful for buffers that are read-only, where motions
are available but editing operations are not.

@item Emacs state (@code{<E>})

A state that as closely as possible mimics default Emacs behaviour,
by eliminating all vi bindings, except for @code{C-z}, to re-enter
normal state.
@end table

@node Settings,Keymaps,Overview,Top
@anchor{settings doc}@anchor{4b}@anchor{settings settings}@anchor{4c}
@chapter Settings


Evil’s behaviour can be adjusted by setting some variables.  The list
of all available variables and their current values can be inspected
by doing:

@example
M-x customize-group RET evil RET
@end example

To change the value of a variable, you can use this interface, or add
a @code{setq} form to your Emacs init file, preferably before Evil is
loaded. @footnote{@w{(1)} 
Strictly speaking, the order only matters if the variable
affects the way Evil is loaded.  This is the case with some
variables.
}

@example
(setq evil-shift-width 0)
;; Load Evil
(require 'evil)
@end example

What follows is a non-exhaustive list of the most relevant
customization options.

@menu
* The initial state:: 
* Keybindings and other behaviour:: 
* Search:: 
* Indentation:: 
* Cursor movement:: 
* Cursor display:: 
* Window management:: 
* Parenthesis highlighting:: 
* Miscellaneous:: 

@end menu

@node The initial state,Keybindings and other behaviour,,Settings
@anchor{settings the-initial-state}@anchor{4d}
@section The initial state


The initial state of a buffer is determined by its major mode.  Evil
maintains an association between major modes and their corresponding
states, which is most easily modified using the function
@ref{30,,evil-set-initial-state}.

@anchor{settings elispobj-evil-set-initial-state}@anchor{30}
@deffn {Emacs Lisp Autofunction} (evil@w{-}set@w{-}initial@w{-}state  MODE STATE)

Set the initial state for major mode @emph{MODE} to @emph{STATE}.
This is the state the buffer comes up in.
@end deffn

If no state can be found, Evil uses the default initial state.

@anchor{settings elispobj-evil-default-state}@anchor{d}
@deffn {Emacs Lisp Autovariable} evil@w{-}default@w{-}state

The default Evil state.
This is the state a buffer starts in when it is not otherwise
configured (see @ref{30,,evil-set-initial-state} and
@ref{5,,evil-buffer-regexps}).  The value may be one of @code{normal},
@code{insert}, @code{visual}, @code{replace}, @code{operator}, @code{motion} and @code{emacs}.

Default: @code{normal}
@end deffn

Alternatively, it is possible to select the initial state based on the
buffer @emph{name} rather than its major mode.  This is checked first, so
it takes precedence over the other methods for setting the state.

@anchor{settings elispobj-evil-buffer-regexps}@anchor{5}
@deffn {Emacs Lisp Autovariable} evil@w{-}buffer@w{-}regexps

Regular expressions determining the initial state for a buffer.
Entries have the form @code{(REGEXP . STATE)}, where @emph{REGEXP} is a regular
expression matching the buffer’s name and @emph{STATE} is one of @code{normal},
@code{insert}, @code{visual}, @code{replace}, @code{operator}, @code{motion}, @code{emacs} and
@code{nil}.  If @emph{STATE} is @code{nil}, Evil is disabled in the buffer.

Default: @code{(("^ \\*load\\*"))}
@end deffn

@node Keybindings and other behaviour,Search,The initial state,Settings
@anchor{settings keybindings-and-other-behaviour}@anchor{4e}
@section Keybindings and other behaviour


Evil comes with a rich system for modifying its key bindings
@ref{4f,,Keymaps}.  For the most common tweaks, the following
variables are available.

@anchor{settings elispobj-evil-toggle-key}@anchor{37}
@deffn {Emacs Lisp Autovariable} evil@w{-}toggle@w{-}key

The key used to change to and from Emacs state.
Must be readable by @code{read-kbd-macro}. For example: “C-z”.

Default: @code{"C-z"}
@end deffn

@anchor{settings elispobj-evil-want-C-i-jump}@anchor{3c}
@deffn {Emacs Lisp Autovariable} evil@w{-}want@w{-}C@w{-}i@w{-}jump

Whether @code{C-i} jumps forward in the jump list (like Vim).
Otherwise, @code{C-i} inserts a tab character.

Default: @code{t}
@end deffn

@anchor{settings elispobj-evil-want-C-u-delete}@anchor{3d}
@deffn {Emacs Lisp Autovariable} evil@w{-}want@w{-}C@w{-}u@w{-}delete

Whether @code{C-u} deletes back to indentation in insert state.
Otherwise, @code{C-u} applies a prefix argument.  The binding of
@code{C-u} mirrors Emacs behaviour by default due to the relative
ubiquity of prefix arguments.

Default: @code{nil}
@end deffn

@anchor{settings elispobj-evil-want-C-u-scroll}@anchor{3e}
@deffn {Emacs Lisp Autovariable} evil@w{-}want@w{-}C@w{-}u@w{-}scroll

Whether @code{C-u} scrolls up (like Vim).
Otherwise, @code{C-u} applies a prefix argument.  The binding of
@code{C-u} mirrors Emacs behaviour by default due to the relative
ubiquity of prefix arguments.

Default: @code{nil}
@end deffn

@anchor{settings elispobj-evil-want-C-d-scroll}@anchor{3b}
@deffn {Emacs Lisp Autovariable} evil@w{-}want@w{-}C@w{-}d@w{-}scroll

Whether @code{C-d} scrolls down (like Vim).

Default: @code{t}
@end deffn

@anchor{settings elispobj-evil-want-C-w-delete}@anchor{3f}
@deffn {Emacs Lisp Autovariable} evil@w{-}want@w{-}C@w{-}w@w{-}delete

Whether @code{C-w} deletes a word in Insert state.

Default: @code{t}
@end deffn

@anchor{settings elispobj-evil-want-C-w-in-emacs-state}@anchor{40}
@deffn {Emacs Lisp Autovariable} evil@w{-}want@w{-}C@w{-}w@w{-}in@w{-}emacs@w{-}state

Whether @code{C-w} prefixes windows commands in Emacs state.

Default: @code{nil}
@end deffn

@anchor{settings elispobj-evil-want-Y-yank-to-eol}@anchor{43}
@deffn {Emacs Lisp Autovariable} evil@w{-}want@w{-}Y@w{-}yank@w{-}to@w{-}eol

Whether @code{Y} yanks to the end of the line.
The default behavior is to yank the whole line, like Vim.

Default: @code{nil}
@end deffn

@anchor{settings elispobj-evil-disable-insert-state-bindings}@anchor{15}
@deffn {Emacs Lisp Autovariable} evil@w{-}disable@w{-}insert@w{-}state@w{-}bindings

Whether insert state bindings should be used.
Bindings for escape, delete and @ref{37,,evil-toggle-key} are always
available. If this is non-nil, default Emacs bindings are by and
large accessible in insert state.

Default: @code{nil}
@end deffn

@node Search,Indentation,Keybindings and other behaviour,Settings
@anchor{settings search}@anchor{50}
@section Search


@anchor{settings elispobj-evil-search-module}@anchor{2a}
@deffn {Emacs Lisp Autovariable} evil@w{-}search@w{-}module

The search module to be used.  May be either @code{isearch}, for
Emacs’ isearch module, or @code{evil-search}, for Evil’s own
interactive search module.  N.b. changing this will not affect keybindings.
To swap out relevant keybindings, see @code{evil-select-search-module} function.

Default: @code{isearch}
@end deffn

@anchor{settings elispobj-evil-regexp-search}@anchor{27}
@deffn {Emacs Lisp Autovariable} evil@w{-}regexp@w{-}search

Whether to use regular expressions for searching in @code{/} and @code{?}.

Default: @code{t}
@end deffn

@anchor{settings elispobj-evil-search-wrap}@anchor{2b}
@deffn {Emacs Lisp Autovariable} evil@w{-}search@w{-}wrap

Whether search with @code{/} and @code{?} wraps around the buffer.
If this is non-nil, search stops at the buffer boundaries.

Default: @code{t}
@end deffn

@anchor{settings elispobj-evil-flash-delay}@anchor{19}
@deffn {Emacs Lisp Autovariable} evil@w{-}flash@w{-}delay

Time in seconds to flash search matches after @code{n} and @code{N}.

Default: @code{2}
@end deffn

@anchor{settings elispobj-evil-ex-hl-update-delay}@anchor{18}
@deffn {Emacs Lisp Autovariable} evil@w{-}ex@w{-}hl@w{-}update@w{-}delay

Time in seconds of idle before updating search highlighting.
Setting this to a period shorter than that of keyboard’s repeat
rate allows highlights to update while scrolling.

Default: @code{0.02}
@end deffn

@node Indentation,Cursor movement,Search,Settings
@anchor{settings indentation}@anchor{51}
@section Indentation


@anchor{settings elispobj-evil-auto-indent}@anchor{2}
@deffn {Emacs Lisp Autovariable} evil@w{-}auto@w{-}indent

Whether to auto-indent when opening lines with @code{o} and @code{O}.

Default: @code{t}, buffer-local
@end deffn

@anchor{settings elispobj-evil-shift-width}@anchor{33}
@deffn {Emacs Lisp Autovariable} evil@w{-}shift@w{-}width

The number of columns by which a line is shifted.
This applies to the shifting operators @code{>} and @code{<}.

Default: @code{4}, buffer-local
@end deffn

@anchor{settings elispobj-evil-shift-round}@anchor{32}
@deffn {Emacs Lisp Autovariable} evil@w{-}shift@w{-}round

Whether shifting rounds to the nearest multiple.
If non-nil, @code{>} and @code{<} adjust line
indentation to the nearest multiple of @ref{33,,evil-shift-width}.

Default: @code{t}, buffer-local
@end deffn

@anchor{settings elispobj-evil-indent-convert-tabs}@anchor{1e}
@deffn {Emacs Lisp Autovariable} evil@w{-}indent@w{-}convert@w{-}tabs

If non-nil, the @code{=} operator converts between leading tabs and spaces.
Whether tabs are converted to spaces or vice versa depends on the
value of @code{indent-tabs-mode}.

Default: @code{t}
@end deffn

@node Cursor movement,Cursor display,Indentation,Settings
@anchor{settings cursor-movement}@anchor{52}
@section Cursor movement


In standard Emacs terms, the cursor is generally understood to be
located between two characters.  In Vim, and therefore also Evil, this
is the case in insert state, but in other states the cursor is
understood to be @emph{on} a character, and that this character is not a
newline.

Forcing this behaviour in Emacs is the source of some potentially
surprising results (especially for traditional Emacs users—users
used to Vim may find the default behavior to their satisfaction). Many
of them can be tweaked using the following variables.

@anchor{settings elispobj-evil-repeat-move-cursor}@anchor{28}
@deffn {Emacs Lisp Autovariable} evil@w{-}repeat@w{-}move@w{-}cursor

Whether repeating commands with @code{.} may move the cursor.
If nil, the original cursor position is preserved, even if the command
normally would have moved the cursor.

Default: @code{t}
@end deffn

@anchor{settings elispobj-evil-move-cursor-back}@anchor{26}
@deffn {Emacs Lisp Autovariable} evil@w{-}move@w{-}cursor@w{-}back

Whether the cursor is moved backwards when exiting insert state.
If non-nil, the cursor moves “backwards” when exiting insert state,
so that it ends up on the character to the left.  Otherwise it remains
in place, on the character to the right.

Default: @code{t}
@end deffn

@anchor{settings elispobj-evil-move-beyond-eol}@anchor{25}
@deffn {Emacs Lisp Autovariable} evil@w{-}move@w{-}beyond@w{-}eol

Whether the cursor can move past the end of the line.
If non-nil, the cursor is allowed to move one character past the
end of the line, as in Emacs.

Default: @code{nil}
@end deffn

@anchor{settings elispobj-evil-cross-lines}@anchor{7}
@deffn {Emacs Lisp Autovariable} evil@w{-}cross@w{-}lines

Whether horizontal motions may move to other lines.  If non-nil,
certain motions that conventionally operate in a single line may move
the cursor to other lines.  Otherwise, they are restricted to the
current line.  This applies to @code{h}, @code{SPC}, @code{f}, @code{F}, @code{t}, @code{T}, @code{~}.

Default: @code{nil}
@end deffn

@anchor{settings elispobj-evil-respect-visual-line-mode}@anchor{29}
@deffn {Emacs Lisp Autovariable} evil@w{-}respect@w{-}visual@w{-}line@w{-}mode

Whether movement commands respect @code{visual-line-mode}.
If non-nil, @code{visual-line-mode} is generally respected when it is
on.  In this case, motions such as @code{j} and
@code{k} navigate by visual lines (on the screen) rather
than “physical” lines (defined by newline characters).  If nil,
the setting of @code{visual-line-mode} is ignored.

This variable must be set before Evil is loaded.

Default: @code{nil}
@end deffn

@anchor{settings elispobj-evil-track-eol}@anchor{38}
@deffn {Emacs Lisp Autovariable} evil@w{-}track@w{-}eol

Whether @code{$} “sticks” the cursor to the end of the line.
If non-nil, vertical motions after @code{$} maintain the cursor at the
end of the line, even if the target line is longer.  This is analogous
to @code{track-eol}, but respects Evil’s interpretation of end-of-line.

Default: @code{t}
@end deffn

@anchor{settings elispobj-evil-start-of-line}@anchor{36}
@deffn {Emacs Lisp Autovariable} evil@w{-}start@w{-}of@w{-}line

Analogue of vim’s @code{startofline}.
If nil, preserve column when making relevant movements of the cursor.
Otherwise, move the cursor to the start of the line.

Default: @code{nil}
@end deffn

@node Cursor display,Window management,Cursor movement,Settings
@anchor{settings cursor-display}@anchor{53}
@section Cursor display


A state may change the appearance of the cursor.  Use the variable
@ref{c,,evil-default-cursor} to set the default cursor, and the
variables @code{evil-normal-state-cursor}, @code{evil-insert-state-cursor}
etc. to set the cursors for specific states.  The acceptable values
for all of them are the same.

@anchor{settings elispobj-evil-default-cursor}@anchor{c}
@deffn {Emacs Lisp Autovariable} evil@w{-}default@w{-}cursor

The default cursor.
May be a cursor type as per @code{cursor-type}, a color string as passed
to @code{set-cursor-color}, a zero-argument function for changing the
cursor, or a list of the above.

Default: @code{t}
@end deffn

@node Window management,Parenthesis highlighting,Cursor display,Settings
@anchor{settings window-management}@anchor{54}
@section Window management


@anchor{settings elispobj-evil-auto-balance-windows}@anchor{1}
@deffn {Emacs Lisp Autovariable} evil@w{-}auto@w{-}balance@w{-}windows

If non-nil window creation and deletion trigger rebalancing.

Default: @code{t}
@end deffn

@anchor{settings elispobj-evil-split-window-below}@anchor{35}
@deffn {Emacs Lisp Autovariable} evil@w{-}split@w{-}window@w{-}below

If non-nil split windows are created below.

Default: @code{nil}
@end deffn

@anchor{settings elispobj-evil-vsplit-window-right}@anchor{3a}
@deffn {Emacs Lisp Autovariable} evil@w{-}vsplit@w{-}window@w{-}right

If non-nil vertically split windows with are created to the right.

Default: @code{nil}
@end deffn

@node Parenthesis highlighting,Miscellaneous,Window management,Settings
@anchor{settings parenthesis-highlighting}@anchor{55}
@section Parenthesis highlighting


These settings concern the integration between Evil and
@code{show-paren-mode}.  They take no effect if this mode is not enabled.

@anchor{settings elispobj-evil-show-paren-range}@anchor{34}
@deffn {Emacs Lisp Autovariable} evil@w{-}show@w{-}paren@w{-}range

The minimal distance between point and a parenthesis
which causes the parenthesis to be highlighted.

Default: @code{0}
@end deffn

@anchor{settings elispobj-evil-highlight-closing-paren-at-point-states}@anchor{1d}
@deffn {Emacs Lisp Autovariable} evil@w{-}highlight@w{-}closing@w{-}paren@w{-}at@w{-}point@w{-}states

The states in which the closing parenthesis at point should be highlighted.
All states listed here highlight the closing parenthesis at
point (which is Vim’s default behavior).  All others highlight the
parenthesis before point (which is Emacs default behavior). If
this list contains the symbol @code{not} then its meaning is inverted,
i.e. all states listed here highlight the closing parenthesis
before point.

Default: @code{(not emacs insert replace)}
@end deffn

@node Miscellaneous,,Parenthesis highlighting,Settings
@anchor{settings miscellaneous}@anchor{56}
@section Miscellaneous


@anchor{settings elispobj-evil-want-fine-undo}@anchor{42}
@deffn {Emacs Lisp Autovariable} evil@w{-}want@w{-}fine@w{-}undo

Whether actions are undone in several steps.
There are two possible choices: nil (“no”) means that all
changes made during insert state, including a possible delete
after a change operation, are collected in a single undo step.
Non-nil (“yes”) means that undo steps are determined according
to Emacs heuristics, and no attempt is made to aggregate changes.

For backward compatibility purposes, the value @code{fine} is
interpreted as @code{nil}.  This option was removed because it did not
work consistently.

Default: @code{nil}
@end deffn

@anchor{settings elispobj-evil-undo-system}@anchor{39}
@deffn {Emacs Lisp Autovariable} evil@w{-}undo@w{-}system

Undo system Evil should use.  If equal to @code{undo-tree} or
@code{undo-fu}, those packages must be installed.  If equal to
@code{undo-tree}, @code{undo-tree-mode} must also be activated.  If equal
to @code{undo-redo}, Evil uses commands natively available in Emacs 28.

Default: @code{nil}
@end deffn

@anchor{settings elispobj-evil-backspace-join-lines}@anchor{3}
@deffn {Emacs Lisp Autovariable} evil@w{-}backspace@w{-}join@w{-}lines

Whether backward delete in insert state may join lines.

Default: @code{t}
@end deffn

@anchor{settings elispobj-evil-kbd-macro-suppress-motion-error}@anchor{20}
@deffn {Emacs Lisp Autovariable} evil@w{-}kbd@w{-}macro@w{-}suppress@w{-}motion@w{-}error

Whether left/right motions signal errors in keyboard macros.
This variable only affects beginning-of-line or end-of-line errors
regarding the motions @code{h} and @code{SPC}
respectively.  This may be desired since such errors cause macro
definition or execution to be terminated.  There are four
possibilities:


@itemize -

@item 
@code{record}: errors are suppressed when recording macros, but not when
replaying them.

@item 
@code{replay}: errors are suppressed when replaying macros, but not when
recording them.

@item 
@code{t}: errors are suppressed in both cases.

@item 
@code{nil}: errors are never suppressed.
@end itemize

Default: @code{nil}
@end deffn

@anchor{settings elispobj-evil-mode-line-format}@anchor{23}
@deffn {Emacs Lisp Autovariable} evil@w{-}mode@w{-}line@w{-}format

The position of the state tag in the mode line.
If set to @code{before} or @code{after}, the tag is placed at the beginning
or the end of the mode-line, respectively.  If nil, there is no
tag.  Otherwise it should be a cons cell @code{(WHERE . WHICH)}, where
@emph{WHERE} is either @code{before} or @code{after}, and @emph{WHICH} is a symbol in
@code{mode-line-format}.  The tag is then placed before or after that
symbol, respectively.

Default: @code{before}
@end deffn

@anchor{settings elispobj-evil-mouse-word}@anchor{24}
@deffn {Emacs Lisp Autovariable} evil@w{-}mouse@w{-}word

The @emph{thing-at-point} symbol for double click selection.
The double-click starts visual state in a special word selection
mode. This symbol is used to determine the words to be
selected. Possible values are @code{evil-word} or @code{evil-WORD}.

Default: @code{evil-word}
@end deffn

@anchor{settings elispobj-evil-bigword}@anchor{4}
@deffn {Emacs Lisp Autovariable} evil@w{-}bigword

The set of characters to be interpreted as WORD boundaries.
This is enclosed with square brackets and used as a regular
expression.  By default, whitespace characters are considered
WORD boundaries.

Default: @code{"^ \t\r\n"}, buffer-local
@end deffn

@anchor{settings elispobj-evil-esc-delay}@anchor{17}
@deffn {Emacs Lisp Autovariable} evil@w{-}esc@w{-}delay

The time, in seconds, to wait for another key after escape.
If no further event arrives during this time, the event is
translated to @code{ESC}.  Otherwise, it is translated according to
@code{input-decode-map}.  This does not apply in Emacs state, and may
also be inhibited by setting @code{evil-inhibit-esc}.

Default: @code{0.01}
@end deffn

@anchor{settings elispobj-evil-intercept-esc}@anchor{1f}
@deffn {Emacs Lisp Autovariable} evil@w{-}intercept@w{-}esc

Whether Evil should intercept the escape key.
In the terminal, escape and a meta key sequence both generate the
same event.  In order to distingush these, Evil uses
@code{input-decode-map}.  It is not necessary to do this in a graphical
Emacs session.  However, if you prefer to use @code{C-[} as escape (which
is identical to the terminal escape key code), this interception must
also happen in graphical Emacs sessions.  Set this variable to
@code{always}, t (only in the terminal) or nil (never intercept).

Default: @code{always}
@end deffn

@anchor{settings elispobj-evil-kill-on-visual-paste}@anchor{21}
@deffn {Emacs Lisp Autovariable} evil@w{-}kill@w{-}on@w{-}visual@w{-}paste

Whether pasting in visual state adds the replaced text to the
kill ring, making it the default for the next paste. The default,
replicates the default Vim behavior.

Default: @code{t}
@end deffn

@anchor{settings elispobj-evil-echo-state}@anchor{16}
@deffn {Emacs Lisp Autovariable} evil@w{-}echo@w{-}state

Whether to signal the current state in the echo area.

Default: @code{t}
@end deffn

@anchor{settings elispobj-evil-complete-all-buffers}@anchor{6}
@deffn {Emacs Lisp Autovariable} evil@w{-}complete@w{-}all@w{-}buffers

Whether completion looks for matches in all buffers.
This applies to @code{C-n} and @code{C-p} in insert state.

Default: @code{t}
@end deffn

@anchor{settings elispobj-evil-want-empty-ex-last-command}@anchor{41}
@deffn {Emacs Lisp Autovariable} evil@w{-}want@w{-}empty@w{-}ex@w{-}last@w{-}command

Whether to default to evil-ex-previous-command at empty ex prompt.

Default: @code{t}
@end deffn

@node Keymaps,Hooks,Settings,Top
@anchor{keymaps doc}@anchor{57}@anchor{keymaps chapter-keymaps}@anchor{4f}@anchor{keymaps keymaps}@anchor{58}
@chapter Keymaps


Evil’s key bindings are stored in a number of different keymaps.  Each
state has a @emph{global keymap}, where the default bindings for that state
are stored.  They are named @code{evil-normal-state-map},
@code{evil-insert-state-map}, and so on.  The bindings in these maps are
visible in all buffers currently in the corresponding state.

These keymaps function like ordinary Emacs keymaps and may be modified
using the Emacs function @code{define-key}:

@example
(define-key evil-normal-state-map (kbd "w") 'some-function)
@end example

This binds the key @code{w} to the command @code{some-function} in normal
state.  The use of @code{kbd} is optional for simple key sequences, like
this one, but recommended in general.

Most of Evil’s bindings are defined in the file @code{evil-maps.el}.

To facilitate shared keybindings between states, some states may
activate keybindings from other states as well.  For example, motion
state bindings are visible in normal and visual state, and normal
state bindings are also visible in visual state.

Each state also has a @emph{buffer-local keymap} which is specific to the
current buffer, and which takes precedence over the global keymap.
These maps are most suitably modified by a mode hook.  They are named
@code{evil-normal-state-local-map}, @code{evil-insert-state-local-map}, and
so on.

@example
(add-hook 'some-mode-hook
          (lambda ()
            (define-key evil-normal-state-local-map
                        (kbd "w") 'some-function)))
@end example

For convenience, the functions @ref{1c,,evil-global-set-key} and
@ref{22,,evil-local-set-key} are available for setting global and
local state keys.

@anchor{keymaps elispobj-evil-global-set-key}@anchor{1c}
@deffn {Emacs Lisp Autofunction} (evil@w{-}global@w{-}set@w{-}key  STATE KEY DEF)

Bind @emph{KEY} to @emph{DEF} in @emph{STATE}.
@end deffn

@anchor{keymaps elispobj-evil-local-set-key}@anchor{22}
@deffn {Emacs Lisp Autofunction} (evil@w{-}local@w{-}set@w{-}key  STATE KEY DEF)

Bind @emph{KEY} to @emph{DEF} in @emph{STATE} in the current buffer.
@end deffn

The above examples could therefore have been written as follows:

@example
(evil-global-set-key 'normal (kbd "w") 'some-function)

(add-hook 'some-mode-hook
          (lambda ()
            (evil-local-set-key 'normal (kbd "w") 'some-function)))
@end example

@menu
* evil-define-key:: 
* Leader keys:: 

@end menu

@node evil-define-key,Leader keys,,Keymaps
@anchor{keymaps evil-define-key}@anchor{59}
@section evil-define-key


Evil provides the macro @ref{f,,evil-define-key} for adding state
bindings to ordinary keymaps.  It is quite powerful, and is the
preferred method for fine-tuning bindings to activate in specific
circumstances.

@anchor{keymaps elispobj-evil-define-key}@anchor{f}
@deffn {Emacs Lisp Autofunction} (evil@w{-}define@w{-}key  STATE KEYMAP KEY DEF [BINDINGS...])

Create a @emph{STATE} binding from @emph{KEY} to @emph{DEF} for @emph{KEYMAP}.
@emph{STATE} is one of @code{normal}, @code{insert}, @code{visual}, @code{replace},
@code{operator}, @code{motion}, @code{emacs}, or a list of one or more of
these. Omitting a state by using @code{nil} corresponds to a standard
Emacs binding using @code{define-key}. The remaining arguments are
like those of @code{define-key}. For example:

@example
(evil-define-key 'normal foo-map "a" 'bar)
@end example

This creates a binding from @code{a} to @code{bar} in normal state, which
is active whenever @code{foo-map} is active. Using nil for the state,
the following lead to identical bindings:

@example
(evil-define-key nil foo-map "a" 'bar)
(define-key foo-map "a" 'bar)
@end example

It is possible to specify multiple states and/or bindings at
once:

@example
(evil-define-key '(normal visual) foo-map
  "a" 'bar
  "b" 'foo)
@end example

If @code{foo-map} has not been initialized yet, this macro adds an
entry to @code{after-load-functions}, delaying execution as necessary.

@emph{KEYMAP} may also be a quoted symbol. If the symbol is @code{global}, the
global evil keymap corresponding to the state(s) is used, meaning
the following lead to identical bindings:

@example
(evil-define-key 'normal 'global "a" 'bar)
(evil-global-set-key 'normal "a" 'bar)
@end example

The symbol @code{local} may also be used, which corresponds to using
@ref{22,,evil-local-set-key}. If a quoted symbol is used that is not
@code{global} or @code{local}, it is assumed to be the name of a minor
mode, in which case @code{evil-define-minor-mode-key} is used.
@end deffn

There follows a brief overview of the main functions of this macro.


@itemize -

@item 
Define a binding in a given state

@example
(evil-define-key 'state 'global (kbd "key") 'target)
@end example

@item 
Define a binding in a given state in the current buffer

@example
(evil-define-key 'state 'local (kbd "key") 'target)
@end example

@item 
Define a binding in a given state under the @emph{foo-mode} major mode.

@example
(evil-define-key 'state foo-mode-map (kbd "key") 'target)
@end example

Note that @code{foo-mode-map} is unquoted, and that this form is safe
before @code{foo-mode-map} is loaded.

@item 
Define a binding in a given state under the @emph{bar-mode} minor mode.

@example
(evil-define-key 'state 'bar-mode (kbd "key") 'target)
@end example

Note that @code{bar-mode} is quoted, and that this form is safe before
@code{bar-mode} is loaded.
@end itemize

The macro @ref{f,,evil-define-key} can be used to augment existing
modes with state bindings, as well as creating packages with custom
bindings.  For example, the following will create a minor mode
@code{foo-mode} with normal state bindings for the keys @code{w} and
@code{e}:

@example
(define-minor-mode foo-mode
  "Foo mode."
  :keymap (make-sparse-keymap))

(evil-define-key 'normal 'foo-mode "w" 'bar)
(evil-define-key 'normal 'foo-mode "e" 'baz)
@end example

This minor mode can then be enabled in any buffers where the custom
bindings are desired:

@example
(add-hook 'text-mode-hook 'foo-mode)  ; enable alongside text-mode
@end example

@node Leader keys,,evil-define-key,Keymaps
@anchor{keymaps leader-keys}@anchor{5a}
@section Leader keys


Evil supports a simple implementation of Vim’s @emph{leader} keys.  To bind
a function to a leader key you can use the expression @code{<leader>} in
a key mapping, e.g.

@example
(evil-define-key 'normal 'global (kbd "<leader>fs") 'save-buffer)
@end example

Likewise, you can use the expression @code{<localleader>} to mimic Vim’s
local leader, which is designed for mode-specific key bindings.

You can use the function @ref{31,,evil-set-leader} to designate
which key acts as the leader and the local leader.

@anchor{keymaps elispobj-evil-set-leader}@anchor{31}
@deffn {Emacs Lisp Autofunction} (evil@w{-}set@w{-}leader  STATE KEY [LOCALLEADER])

Set @emph{KEY} to trigger leader bindings in @emph{STATE}.
@emph{KEY} should be in the form produced by @code{kbd}. @emph{STATE} is one of
@code{normal}, @code{insert}, @code{visual}, @code{replace}, @code{operator}, @code{motion},
@code{emacs}, a list of one or more of these, or @code{nil}, which means
all of the above. If @emph{LOCALLEADER} is non-nil, set the local leader
instead.
@end deffn

@node Hooks,Extension,Keymaps,Top
@anchor{hooks doc}@anchor{5b}@anchor{hooks hooks}@anchor{5c}
@chapter Hooks


A @emph{hook} is a list of functions that are executed when certain events
happen.  Hooks are modified with the Emacs function @code{add-hook}.
Evil provides entry and exit hooks for all its states.  For example,
when switching from normal state to insert state, all functions in
@code{evil-normal-state-exit-hook} and @code{evil-insert-state-entry-hook}
are executed.

It is guaranteed that the exit hook will be executed before the entry
hook on all state switches.

During the hook execution, the variables @code{evil-next-state} and
@code{evil-previous-state} contain information about the states being
switched to and from, respectively.

@node Extension,Frequently Asked Questions,Hooks,Top
@anchor{extension doc}@anchor{5d}@anchor{extension extension}@anchor{5e}
@chapter Extension


The main functionality of Evil is implemented in terms of reusable
macros.  Package writers can use these to define new commands.

@menu
* Motions:: 
* Operators:: 
* Text objects:: 
* Range types:: 
* States:: 

@end menu

@node Motions,Operators,,Extension
@anchor{extension motions}@anchor{5f}
@section Motions


A @emph{motion} is a command which moves the cursor, such as @code{w} or
@code{e}.  Motions are defined with the macro
@ref{10,,evil-define-motion}.  Motions not defined in this way
should be declared with @ref{9,,evil-declare-motion}.

@anchor{extension elispobj-evil-declare-motion}@anchor{9}
@deffn {Emacs Lisp Autofunction} (evil@w{-}declare@w{-}motion  COMMAND)

Declare @emph{COMMAND} to be a movement function.
This ensures that it behaves correctly in visual state.
@end deffn

@anchor{extension elispobj-evil-define-motion}@anchor{10}
@deffn {Emacs Lisp Autofunction} (evil@w{-}define@w{-}motion MOTION (COUNT ARGS...) DOC [[KEY VALUE]...] BODY...)

Define a motion command @emph{MOTION}.
@emph{ARGS} is a list of arguments.  Motions can have any number of
arguments, but the first (if any) has the predefined meaning of
count.  @emph{BODY} must execute the motion by moving point.

Optional keyword arguments are:


@itemize -

@item 
@code{:type} - determines how the motion works after an operator (one of
@code{inclusive}, @code{line}, @code{block} and @code{exclusive}, or a self-defined
motion type)

@item 
@code{:jump} - if non-nil, the previous position is stored in the jump
list, so that it can be restored with @code{C-o}
@end itemize
@end deffn

For example, this is a motion that moves the cursor forward by a
number of characters:

@example
(evil-define-motion foo-forward (count)
  "Move to the right by COUNT characters."
  :type inclusive
  (forward-char (or count 1)))
@end example

The @emph{type} of a motion determines how it works when used together with
an operator.  Inclusive motions include the endpoint in the range
being operated on, while exclusive motions do not.  Line motions
extend the whole range to linewise positions, effectively behaving as
if the endpoint were really at the end of the line.  Blockwise ranges
behave as a “rectangle” on screen rather than a contiguous range of
characters.

@node Operators,Text objects,Motions,Extension
@anchor{extension operators}@anchor{60}
@section Operators


An operator is a command that acts on the text moved over by a motion,
such as @code{c} (change), @code{d} (delete) or @code{y} (yank or
copy, not to be confused with “yank” in Emacs terminology which means
@emph{paste}).

@anchor{extension elispobj-evil-define-operator}@anchor{11}
@deffn {Emacs Lisp Autofunction} (evil@w{-}define@w{-}operator OPERATOR (BEG END ARGS...) DOC [[KEY VALUE]...] BODY...)

Define an operator command @emph{OPERATOR}.
The operator acts on the range of characters @emph{BEG} through
@emph{END}. @emph{BODY} must execute the operator by potentially manipulating
the buffer contents, or otherwise causing side effects to happen.

Optional keyword arguments are:


@itemize -

@item 
@code{:type} - force the input range to be of a given type (@code{inclusive},
@code{line}, @code{block}, and @code{exclusive}, or a self-defined motion type).

@item 
@code{:motion} - use a predetermined motion instead of waiting for one
from the keyboard.  This does not affect the behavior in visual
state, where selection boundaries are always used.

@item 
@code{:repeat} - if non-nil (default), then   @code{.} will repeat the
operator.

@item 
@code{:move-point} - if non-nil (default), the cursor will be moved to
the beginning of the range before the body executes

@item 
@code{:keep-visual} - if non-nil, the selection is not disabled when the
operator is executed in visual state.  By default, visual state is
exited automatically.
@end itemize
@end deffn

For example, this is an operator that performs ROT13 encryption on the
text under consideration:

@example
(evil-define-operator evil-rot13 (beg end)
  "ROT13 encrypt text."
  (rot13-region beg end))
@end example

Binding this to @code{g?} (where it is by default) will cause a key
sequence such as @code{g?w} to encrypt from the current cursor to the
end of the word.

@node Text objects,Range types,Operators,Extension
@anchor{extension text-objects}@anchor{61}
@section Text objects


Text objects are like motions in that they define a range over which
an operator may act.  Unlike motions, text objects can set both a
beginning and an endpoint.  In visual state, text objects alter both
ends of the selection.

Text objects are not directly usable in normal state.  Instead, they
are bound in the two keymaps @code{evil-inner-text-ojects-map} and
@code{evil-outer-text-objects-map}, which are available in visual and
operator-pending state under the keys @code{i} and @code{a}
respectively.

@anchor{extension elispobj-evil-define-text-object}@anchor{13}
@deffn {Emacs Lisp Autofunction} (evil@w{-}define@w{-}text@w{-}object OBJECT (COUNT) DOC [[KEY VALUE]...] BODY...)

Define a text object command @emph{OBJECT}.
@emph{BODY} should return a range @code{(BEG END)} to the right of point
if @emph{COUNT} is positive, and to the left of it if negative.

Optional keyword arguments:


@itemize -

@item 
@code{:type} - determines how the range applies after an operator
(@code{inclusive}, @code{line}, @code{block}, and @code{exclusive}, or a self-defined
motion type).

@item 
@code{:extend-selection} - if non-nil (default), the text object always
enlarges the current selection.  Otherwise, it replaces the current
selection.
@end itemize
@end deffn

For eample, this is a text object which selects the next three
characters after the current location:

@example
(evil-define-text-object foo (count)
  "Select three characters."
  (list (point) (+ 3 (point))))
@end example

For convenience, Evil provides several functions returning a list of
positions which can be used for defining text objects.  All of them
follow the convention that a positive @emph{count} selects text after the
current location, while negative @emph{count} selects text before it.

@cartouche
@quotation Note 
The @emph{thingatpt} library is used quite extensively in Evil to define
text objects, and this dependency leaks through in the following
functions.  A @emph{thing} in this context is any symbol for which there
is a function called @code{forward-THING} @footnote{@w{(1)} 
There are many more ways that a @emph{thing} can be defined,
but the definition of @code{forward-THING} is perhaps the most
straightforward way to go about it.
} which moves past a
number of @emph{things}.
@end quotation
@end cartouche

@anchor{extension elispobj-evil-select-inner-object}@anchor{2d}
@deffn {Emacs Lisp Autofunction} (evil@w{-}select@w{-}inner@w{-}object  THING BEG END TYPE [COUNT LINE])

Return an inner text object range of @emph{COUNT} objects.
If @emph{COUNT} is positive, return objects following point; if @emph{COUNT} is
negative, return objects preceding point.  If one is unspecified,
the other is used with a negative argument.  @emph{THING} is a symbol
understood by @emph{thing-at-point}.  @emph{BEG}, @emph{END} and @emph{TYPE} specify the
current selection.  If @emph{LINE} is non-nil, the text object should be
linewise, otherwise it is character wise.
@end deffn

@anchor{extension elispobj-evil-select-an-object}@anchor{2c}
@deffn {Emacs Lisp Autofunction} (evil@w{-}select@w{-}an@w{-}object  THING BEG END TYPE COUNT [LINE])

Return an outer text object range of @emph{COUNT} objects.
If @emph{COUNT} is positive, return objects following point; if @emph{COUNT} is
negative, return objects preceding point.  If one is unspecified,
the other is used with a negative argument.  @emph{THING} is a symbol
understood by @emph{thing-at-point}.  @emph{BEG}, @emph{END} and @emph{TYPE} specify the
current selection.  If @emph{LINE} is non-nil, the text object should be
linewise, otherwise it is character wise.
@end deffn

@anchor{extension elispobj-evil-select-paren}@anchor{2e}
@deffn {Emacs Lisp Autofunction} (evil@w{-}select@w{-}paren  OPEN CLOSE BEG END TYPE COUNT [INCLUSIVE])

Return a range @code{(BEG END)} of @emph{COUNT} delimited text objects.
@emph{OPEN} and @emph{CLOSE} specify the opening and closing delimiter,
respectively. @emph{BEG} @emph{END} @emph{TYPE} are the currently selected (visual)
range.  If @emph{INCLUSIVE} is non-nil, @emph{OPEN} and @emph{CLOSE} are included in
the range; otherwise they are excluded.

The types of @emph{OPEN} and @emph{CLOSE} specify which kind of THING is used
for parsing with @code{evil-select-block}. If @emph{OPEN} and @emph{CLOSE} are
characters @code{evil-up-paren} is used. Otherwise @emph{OPEN} and @emph{CLOSE}
must be regular expressions and @code{evil-up-block} is used.

If the selection is exclusive, whitespace at the end or at the
beginning of the selection until the end-of-line or beginning-of-line
is ignored.
@end deffn

@node Range types,States,Text objects,Extension
@anchor{extension range-types}@anchor{62}
@section Range types


A @emph{type} is a transformation acting on a pair of buffer positions.
Evil defines the types @code{inclusive}, @code{line}, @code{block} and
@code{exclusive}, which are used for motion ranges and visual selection.
New types may be defined with the macro @emph{evil-define-type}.

@anchor{extension elispobj-evil-define-type}@anchor{14}
@deffn {Emacs Lisp Autofunction} (evil@w{-}define@w{-}type TYPE DOC [[KEY FUNC]...])

Define type @emph{TYPE}.
@emph{DOC} is a general description and shows up in all docstrings.

Optional keyword arguments:


@itemize -

@item 
@code{:expand} - expansion function.  This function should accept two
positions in the current buffer, BEG and END,and return a pair of
expanded buffer positions.

@item 
@code{:contract} - the opposite of @code{:expand}.  Optional.

@item 
@code{:one-to-one} - non-nil if expansion is one-to-one.  This means that
@code{:expand} followed by @code{:contract} always return the original range.

@item 
@code{:normalize} - normalization function.  This function should accept
two unexpanded positions and adjust them before expansion.  May be
used to deal with buffer boundaries.

@item 
@code{:string} - description function.  Takes two buffer positions and
returns a human-readable string.  For example “2 lines”
@end itemize

If further keywords and functions are specified, they are assumed to
be transformations on buffer positions, like @code{:expand} and @code{:contract}.
@end deffn

@node States,,Range types,Extension
@anchor{extension states}@anchor{63}
@section States


States are defined with the macro @ref{12,,evil-define-state},
which takes care to define the necessary hooks, keymaps and variables,
as well as a toggle function @code{evil-NAME-state} and a predicate
function @code{evil-NAME-state-p} for checking whether the state is
active.

@anchor{extension elispobj-evil-define-state}@anchor{12}
@deffn {Emacs Lisp Autofunction} (evil@w{-}define@w{-}state STATE DOC [[KEY VAL]...] BODY...)

Define an Evil state @emph{STATE}.
@emph{DOC} is a general description and shows up in all docstrings;
the first line of the string should be the full name of the state.

@emph{BODY} is executed each time the state is enabled or disabled.

Optional keyword arguments:


@itemize -

@item 
@code{:tag} - the mode line indicator, e.g. “<T>”.

@item 
@code{:message} - string shown in the echo area when the state is
activated.

@item 
@code{:cursor} - default cursor specification.

@item 
@code{:enable} - list of other state keymaps to enable when in this
state.

@item 
@code{:entry-hook} - list of functions to run when entering this state.

@item 
@code{:exit-hook} - list of functions to run when exiting this state.

@item 
@code{:suppress-keymap} - if non-nil, effectively disables bindings to
@code{self-insert-command} by making @code{evil-suppress-map} the parent of
the global state keymap.
@end itemize

The global keymap of this state will be @code{evil-test-state-map},
the local keymap will be @code{evil-test-state-local-map}, and so on.
@end deffn

For example:

@example
(evil-define-state test
  "Test state."
  :tag " <T> "
  (message (if (evil-test-state-p)
               "Enabling test state."
             "Disabling test state.")))
@end example

@node Frequently Asked Questions,Internals,Extension,Top
@anchor{faq doc}@anchor{64}@anchor{faq frequently-asked-questions}@anchor{65}
@chapter Frequently Asked Questions


@menu
* Problems with the escape key in the terminal:: 
* Underscore is not a word character:: 

@end menu

@node Problems with the escape key in the terminal,Underscore is not a word character,,Frequently Asked Questions
@anchor{faq problems-with-the-escape-key-in-the-terminal}@anchor{66}
@section Problems with the escape key in the terminal


A common problem when using Evil in terminal mode is a certain delay
after pressing the escape key. Even more, when pressing the escape key
followed quickly by another key the command is recognized as
@code{M-<key>} instead of two separate keys: @code{ESC} followed by
@code{<key>}. In fact, it is perfectly valid to simulate
@code{M-<key>} by pressing @code{ESC <key>} quickly (but see below).

The reason for this is that in terminal mode a key sequence involving
the meta key (or alt key) always generates a so called “escape
sequence”, i.e. a sequence of two events sent to Emacs, the first
being @code{ESC} and the second the key pressed simultaneously. The
problem is that pressing the escape key itself also generates the
@code{ESC} event. Thus, if Emacs (and therefore Evil) receives an
@code{ESC} event there is no way to tell whether the escape key has
been pressed (and no further event will arrive) or a @code{M-<key>}
combination has been pressed (and the @code{<key>} event will arrive
soon). In order to distinguish both situations Evil does the
following. After receiving an @code{ESC} event Evil waits for a short
time period (specified by the variable @ref{17,,evil-esc-delay}
which defaults to 0.01 seconds) for another event. If no other event
arrives Evil assumes that the plain escape key has been pressed,
otherwise it assumes a @code{M-<key>} combination has been pressed and
combines the @code{ESC} event with the second one. Because a
@code{M-<key>} sequence usually generates both events in very quick
succession, 0.01 seconds are usually enough and the delay is hardly
noticeable by the user.

If you use a terminal multiplexer like @emph{tmux} or @emph{screen} the
situation may be worse. These multiplexers have exactly the same
problem recognizing @code{M-<key>} sequences and often introduce their
own delay for the @code{ESC} key. There is no way for Evil to
influence this delay. In order to reduce it you must reconfigure your
terminal multiplexer.

Note that this problem should not arise when using Evil in graphical
mode. The reason is that in this case the escape key itself generates
a different command, namely @code{escape} (a symbol) and hence Evil can
distinguish whether the escape key or a @code{M-<key>} combination has
been pressed. But this also implies that pressing @code{ESC} followed
by <key> cannot be used to simulate @code{M-<key>} in graphical mode!

@node Underscore is not a word character,,Problems with the escape key in the terminal,Frequently Asked Questions
@anchor{faq underscore-is-not-a-word-character}@anchor{67}
@section Underscore is not a word character


An underscore @code{_} is a word character in Vim. This means that word
motions like @code{w} skip over underlines in a sequence of letters as
if it was a letter itself.  In contrast, in Evil the underscore is
often a non-word character like operators, e.g. @code{+}.

The reason is that Evil uses Emacs’ definition of a word and this
definition does often not include the underscore. In Emacs word
characters are determined by the syntax-class of the buffer. The
syntax-class usually depends on the major-mode of this buffer. This
has the advantage that the definition of a “word” may be adapted to
the particular type of document being edited. Evil uses Emacs’
definition and does not simply use Vim’s definition in order to be
consistent with other Emacs functions. For example, word characters
are exactly those characters that are matched by the regular
expression character class @code{[:word:]}.

If you would be satisfied by having the @code{*} and @code{#} searches
use symbols instead of words, this can be achieved by setting the
@code{evil-symbol-word-search} variable to @code{t}.

If you want the underscore to be recognised as word character for other
motions, you can modify its entry in the syntax-table:

@example
(modify-syntax-entry ?_ "w")
@end example

This gives the underscore the ‘word’ syntax class. You can use a
mode-hook to modify the syntax-table in all buffers of some mode,
e.g.:

@example
(add-hook 'c-mode-common-hook
          (lambda () (modify-syntax-entry ?_ "w")))
@end example

This gives the underscore the word syntax-class in all C-like buffers.

Similarly to Emacs’ definition of a word, the definition of a “symbol” is also
dependent on the syntax-class of the buffer, which often includes the
underscore. The default text objects keymap associates kbd::@cite{o} with the symbol
object, making kbd::@cite{cio} a good alternative to Vim’s kbd::@cite{ciw}, for example.
The following will swap between the word and symbol objects in the keymap:

@example
(define-key evil-outer-text-objects-map "w" 'evil-a-symbol)
(define-key evil-inner-text-objects-map "w" 'evil-inner-symbol)
(define-key evil-outer-text-objects-map "o" 'evil-a-word)
(define-key evil-inner-text-objects-map "o" 'evil-inner-word)
@end example

This will not change the motion keys, however. One way to make word motions
operate as symbol motions is to alias the @code{evil-word} @emph{thing} @footnote{@w{(1)} 
Many of Evil’s text objects and motions are defined in
terms of the @emph{thingatpt} library, which in this case are defined
entirely in terms of @code{forward-THING} functions.  Thus aliasing
one to another should make all motions and text objects implemented
in terms of that @emph{thing} behave the same.
} to
the @code{evil-symbol} thing:

@example
(defalias 'forward-evil-word 'forward-evil-symbol)
@end example

@node Internals,The GNU Free Documentation License,Frequently Asked Questions,Top
@anchor{internals doc}@anchor{68}@anchor{internals internals}@anchor{69}
@chapter Internals


@menu
* Command properties:: 

@end menu

@node Command properties,,,Internals
@anchor{internals command-properties}@anchor{6a}
@section Command properties


Evil defines @emph{command properties} to store information about commands
@footnote{@w{(1)} 
In this context, a @emph{command} may mean any Evil motion,
text object, operator or indeed other Emacs commands, which have
not been defined through the Evil machinery.
}, such as whether they should be repeated.  A command
property is a @code{:keyword} with an associated value, e.g.
@code{:repeat nil}.

@anchor{internals elispobj-evil-add-command-properties}@anchor{0}
@deffn {Emacs Lisp Autofunction} (evil@w{-}add@w{-}command@w{-}properties  COMMAND [PROPERTIES...])

Add @emph{PROPERTIES} to @emph{COMMAND}.
@emph{PROPERTIES} should be a property list.
To replace all properties at once, use @ref{2f,,evil-set-command-properties}.
@end deffn

@anchor{internals elispobj-evil-set-command-properties}@anchor{2f}
@deffn {Emacs Lisp Autofunction} (evil@w{-}set@w{-}command@w{-}properties  COMMAND [PROPERTIES...])

Replace all of @emph{COMMAND}’s properties with @emph{PROPERTIES}.
@emph{PROPERTIES} should be a property list.
This erases all previous properties; to only add properties,
use @code{evil-set-command-property}.
@end deffn

@anchor{internals elispobj-evil-get-command-properties}@anchor{1a}
@deffn {Emacs Lisp Autofunction} (evil@w{-}get@w{-}command@w{-}properties  COMMAND)

Return all Evil properties of @emph{COMMAND}.
See also @ref{1b,,evil-get-command-property}.
@end deffn

@anchor{internals elispobj-evil-get-command-property}@anchor{1b}
@deffn {Emacs Lisp Autofunction} (evil@w{-}get@w{-}command@w{-}property  COMMAND PROPERTY [DEFAULT])

Return the value of Evil @emph{PROPERTY} of @emph{COMMAND}.
If the command does not have the property, return @emph{DEFAULT}.
See also @ref{1a,,evil-get-command-properties}.
@end deffn

@anchor{internals elispobj-evil-define-command}@anchor{e}
@deffn {Emacs Lisp Autofunction} (evil@w{-}define@w{-}command COMMAND (ARGS...) DOC [[KEY VALUE]...] BODY...)

Define a command @emph{COMMAND}.
@end deffn

For setting repeat properties, use the following functions:

@anchor{internals elispobj-evil-declare-repeat}@anchor{b}
@deffn {Emacs Lisp Autofunction} (evil@w{-}declare@w{-}repeat  COMMAND)

Declare @emph{COMMAND} to be repeatable.
@end deffn

@anchor{internals elispobj-evil-declare-not-repeat}@anchor{a}
@deffn {Emacs Lisp Autofunction} (evil@w{-}declare@w{-}not@w{-}repeat  COMMAND)

Declare @emph{COMMAND} to be nonrepeatable.
@end deffn

@anchor{internals elispobj-evil-declare-change-repeat}@anchor{8}
@deffn {Emacs Lisp Autofunction} (evil@w{-}declare@w{-}change@w{-}repeat  COMMAND)

Declare @emph{COMMAND} to be repeatable by buffer changes rather than
keystrokes.
@end deffn

@node The GNU Free Documentation License,Emacs lisp functions and variables,Internals,Top
@anchor{license doc}@anchor{6b}@anchor{license the-gnu-free-documentation-license}@anchor{6c}
@chapter The GNU Free Documentation License


Version 1.3, 3 November 2008

@quotation

Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software
Foundation, Inc. @indicateurl{http://fsf.org/}

Everyone is permitted to copy and distribute verbatim copies of
this license document, but changing it is not allowed.
@end quotation


@enumerate 0

@item 
PREAMBLE

The purpose of this License is to make a manual, textbook, or other
functional and useful document @emph{free} in the sense of freedom: to
assure everyone the effective freedom to copy and redistribute it,
with or without modifying it, either commercially or
noncommercially.  Secondarily, this License preserves for the
author and publisher a way to get credit for their work, while not
being considered responsible for modifications made by others.

This License is a kind of “copyleft”, which means that derivative
works of the document must themselves be free in the same sense.
It complements the GNU General Public License, which is a copyleft
license designed for free software.

We have designed this License in order to use it for manuals for
free software, because free software needs free documentation: a
free program should come with manuals providing the same freedoms
that the software does.  But this License is not limited to
software manuals; it can be used for any textual work, regardless
of subject matter or whether it is published as a printed book.  We
recommend this License principally for works whose purpose is
instruction or reference.

@item 
APPLICABILITY AND DEFINITIONS

This License applies to any manual or other work, in any medium,
that contains a notice placed by the copyright holder saying it can
be distributed under the terms of this License.  Such a notice
grants a world-wide, royalty-free license, unlimited in duration,
to use that work under the conditions stated herein.  The
“Document”, below, refers to any such manual or work.  Any member
of the public is a licensee, and is addressed as “you”.  You accept
the license if you copy, modify or distribute the work in a way
requiring permission under copyright law.

A “Modified Version” of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.

A “Secondary Section” is a named appendix or a front-matter section
of the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document’s overall
subject (or to related matters) and contains nothing that could
fall directly within that overall subject.  (Thus, if the Document
is in part a textbook of mathematics, a Secondary Section may not
explain any mathematics.)  The relationship could be a matter of
historical connection with the subject or with related matters, or
of legal, commercial, philosophical, ethical or political position
regarding them.

The “Invariant Sections” are certain Secondary Sections whose
titles are designated, as being those of Invariant Sections, in the
notice that says that the Document is released under this License.
If a section does not fit the above definition of Secondary then it
is not allowed to be designated as Invariant.  The Document may
contain zero Invariant Sections.  If the Document does not identify
any Invariant Sections then there are none.

The “Cover Texts” are certain short passages of text that are
listed, as Front-Cover Texts or Back-Cover Texts, in the notice
that says that the Document is released under this License.  A
Front-Cover Text may be at most 5 words, and a Back-Cover Text may
be at most 25 words.

A “Transparent” copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images composed
of pixels) generic paint programs or (for drawings) some widely
available drawing editor, and that is suitable for input to text
formatters or for automatic translation to a variety of formats
suitable for input to text formatters.  A copy made in an otherwise
Transparent file format whose markup, or absence of markup, has
been arranged to thwart or discourage subsequent modification by
readers is not Transparent.  An image format is not Transparent if
used for any substantial amount of text.  A copy that is not
“Transparent” is called “Opaque”.

Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format,
SGML or XML using a publicly available DTD, and standard-conforming
simple HTML, PostScript or PDF designed for human modification.
Examples of transparent image formats include PNG, XCF and JPG.
Opaque formats include proprietary formats that can be read and
edited only by proprietary word processors, SGML or XML for which
the DTD and/or processing tools are not generally available, and
the machine-generated HTML, PostScript or PDF produced by some word
processors for output purposes only.

The “Title Page” means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the
material this License requires to appear in the title page.  For
works in formats which do not have any title page as such, “Title
Page” means the text near the most prominent appearance of the
work’s title, preceding the beginning of the body of the text.

The “publisher” means any person or entity that distributes copies
of the Document to the public.

A section “Entitled XYZ” means a named subunit of the Document
whose title either is precisely XYZ or contains XYZ in parentheses
following text that translates XYZ in another language.  (Here XYZ
stands for a specific section name mentioned below, such as
“Acknowledgements”, “Dedications”, “Endorsements”, or “History”.)
To “Preserve the Title” of such a section when you modify the
Document means that it remains a section “Entitled XYZ” according
to this definition.

The Document may include Warranty Disclaimers next to the notice
which states that this License applies to the Document.  These
Warranty Disclaimers are considered to be included by reference in
this License, but only as regards disclaiming warranties: any other
implication that these Warranty Disclaimers may have is void and
has no effect on the meaning of this License.

@item 
VERBATIM COPYING

You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License
applies to the Document are reproduced in all copies, and that you
add no other conditions whatsoever to those of this License.  You
may not use technical measures to obstruct or control the reading
or further copying of the copies you make or distribute.  However,
you may accept compensation in exchange for copies.  If you
distribute a large enough number of copies you must also follow the
conditions in section 3.

You may also lend copies, under the same conditions stated above,
and you may publicly display copies.

@item 
COPYING IN QUANTITY

If you publish printed copies (or copies in media that commonly
have printed covers) of the Document, numbering more than 100, and
the Document’s license notice requires Cover Texts, you must
enclose the copies in covers that carry, clearly and legibly, all
these Cover Texts: Front-Cover Texts on the front cover, and
Back-Cover Texts on the back cover.  Both covers must also clearly
and legibly identify you as the publisher of these copies.  The
front cover must present the full title with all words of the title
equally prominent and visible.  You may add other material on the
covers in addition.  Copying with changes limited to the covers, as
long as they preserve the title of the Document and satisfy these
conditions, can be treated as verbatim copying in other respects.

If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto
adjacent pages.

If you publish or distribute Opaque copies of the Document
numbering more than 100, you must either include a machine-readable
Transparent copy along with each Opaque copy, or state in or with
each Opaque copy a computer-network location from which the general
network-using public has access to download using public-standard
network protocols a complete Transparent copy of the Document, free
of added material.  If you use the latter option, you must take
reasonably prudent steps, when you begin distribution of Opaque
copies in quantity, to ensure that this Transparent copy will
remain thus accessible at the stated location until at least one
year after the last time you distribute an Opaque copy (directly or
through your agents or retailers) of that edition to the public.

It is requested, but not required, that you contact the authors of
the Document well before redistributing any large number of copies,
to give them a chance to provide you with an updated version of the
Document.

@item 
MODIFICATIONS

You may copy and distribute a Modified Version of the Document
under the conditions of sections 2 and 3 above, provided that you
release the Modified Version under precisely this License, with the
Modified Version filling the role of the Document, thus licensing
distribution and modification of the Modified Version to whoever
possesses a copy of it.  In addition, you must do these things in
the Modified Version:


@enumerate A

@item 
Use in the Title Page (and on the covers, if any) a title
distinct from that of the Document, and from those of previous
versions (which should, if there were any, be listed in the
History section of the Document).  You may use the same title as
a previous version if the original publisher of that version
gives permission.

@item 
List on the Title Page, as authors, one or more persons or
entities responsible for authorship of the modifications in the
Modified Version, together with at least five of the principal
authors of the Document (all of its principal authors, if it has
fewer than five), unless they release you from this requirement.

@item 
State on the Title page the name of the publisher of the
Modified Version, as the publisher.

@item 
Preserve all the copyright notices of the Document.

@item 
Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.

@item 
Include, immediately after the copyright notices, a license
notice giving the public permission to use the Modified Version
under the terms of this License, in the form shown in the
Addendum below.

@item 
Preserve in that license notice the full lists of Invariant
Sections and required Cover Texts given in the Document’s
license notice.

@item 
Include an unaltered copy of this License.

@item 
Preserve the section Entitled “History”, Preserve its Title, and
add to it an item stating at least the title, year, new authors,
and publisher of the Modified Version as given on the Title
Page.  If there is no section Entitled “History” in the
Document, create one stating the title, year, authors, and
publisher of the Document as given on its Title Page, then add
an item describing the Modified Version as stated in the
previous sentence.

@item 
Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and
likewise the network locations given in the Document for
previous versions it was based on.  These may be placed in the
“History” section.  You may omit a network location for a work
that was published at least four years before the Document
itself, or if the original publisher of the version it refers to
gives permission.

@item 
For any section Entitled “Acknowledgements” or “Dedications”,
Preserve the Title of the section, and preserve in the section
all the substance and tone of each of the contributor
acknowledgements and/or dedications given therein.

@item 
Preserve all the Invariant Sections of the Document, unaltered
in their text and in their titles.  Section numbers or the
equivalent are not considered part of the section titles.

@item 
Delete any section Entitled “Endorsements”.  Such a section may
not be included in the Modified Version.

@item 
Do not retitle any existing section to be Entitled
“Endorsements” or to conflict in title with any Invariant
Section.

@item 
Preserve any Warranty Disclaimers.
@end enumerate

If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no
material copied from the Document, you may at your option designate
some or all of these sections as invariant.  To do this, add their
titles to the list of Invariant Sections in the Modified Version’s
license notice.  These titles must be distinct from any other
section titles.

You may add a section Entitled “Endorsements”, provided it contains
nothing but endorsements of your Modified Version by various
parties—for example, statements of peer review or that the text
has been approved by an organization as the authoritative
definition of a standard.

You may add a passage of up to five words as a Front-Cover Text,
and a passage of up to 25 words as a Back-Cover Text, to the end of
the list of Cover Texts in the Modified Version.  Only one passage
of Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity.  If the Document
already includes a cover text for the same cover, previously added
by you or by arrangement made by the same entity you are acting on
behalf of, you may not add another; but you may replace the old
one, on explicit permission from the previous publisher that added
the old one.

The author(s) and publisher(s) of the Document do not by this
License give permission to use their names for publicity for or to
assert or imply endorsement of any Modified Version.

@item 
COMBINING DOCUMENTS

You may combine the Document with other documents released under
this License, under the terms defined in section 4 above for
modified versions, provided that you include in the combination all
of the Invariant Sections of all of the original documents,
unmodified, and list them all as Invariant Sections of your
combined work in its license notice, and that you preserve all
their Warranty Disclaimers.

The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy.  If there are multiple Invariant Sections with the same name
but different contents, make the title of each such section unique
by adding at the end of it, in parentheses, the name of the
original author or publisher of that section if known, or else a
unique number.  Make the same adjustment to the section titles in
the list of Invariant Sections in the license notice of the
combined work.

In the combination, you must combine any sections Entitled
“History” in the various original documents, forming one section
Entitled “History”; likewise combine any sections Entitled
“Acknowledgements”, and any sections Entitled “Dedications”.  You
must delete all sections Entitled “Endorsements.”

@item 
COLLECTIONS OF DOCUMENTS

You may make a collection consisting of the Document and other
documents released under this License, and replace the individual
copies of this License in the various documents with a single copy
that is included in the collection, provided that you follow the
rules of this License for verbatim copying of each of the documents
in all other respects.

You may extract a single document from such a collection, and
distribute it individually under this License, provided you insert
a copy of this License into the extracted document, and follow this
License in all other respects regarding verbatim copying of that
document.

@item 
AGGREGATION WITH INDEPENDENT WORKS

A compilation of the Document or its derivatives with other
separate and independent documents or works, in or on a volume of a
storage or distribution medium, is called an “aggregate” if the
copyright resulting from the compilation is not used to limit the
legal rights of the compilation’s users beyond what the individual
works permit.  When the Document is included in an aggregate, this
License does not apply to the other works in the aggregate which
are not themselves derivative works of the Document.

If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one half
of the entire aggregate, the Document’s Cover Texts may be placed
on covers that bracket the Document within the aggregate, or the
electronic equivalent of covers if the Document is in electronic
form.  Otherwise they must appear on printed covers that bracket
the whole aggregate.

@item 
TRANSLATION

Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of
section 4.  Replacing Invariant Sections with translations requires
special permission from their copyright holders, but you may
include translations of some or all Invariant Sections in addition
to the original versions of these Invariant Sections.  You may
include a translation of this License, and all the license notices
in the Document, and any Warranty Disclaimers, provided that you
also include the original English version of this License and the
original versions of those notices and disclaimers.  In case of a
disagreement between the translation and the original version of
this License or a notice or disclaimer, the original version will
prevail.

If a section in the Document is Entitled “Acknowledgements”,
“Dedications”, or “History”, the requirement (section 4) to
Preserve its Title (section 1) will typically require changing the
actual title.

@item 
TERMINATION

You may not copy, modify, sublicense, or distribute the Document
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense, or distribute it is void,
and will automatically terminate your rights under this License.

However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the
copyright holder fails to notify you of the violation by some
reasonable means prior to 60 days after the cessation.

Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from
that copyright holder, and you cure the violation prior to 30 days
after your receipt of the notice.

Termination of your rights under this section does not terminate
the licenses of parties who have received copies or rights from you
under this License.  If your rights have been terminated and not
permanently reinstated, receipt of a copy of some or all of the
same material does not give you any rights to use it.

@item 
FUTURE REVISIONS OF THIS LICENSE
@end enumerate

@quotation

The Free Software Foundation may publish new, revised versions of
the GNU Free Documentation License from time to time.  Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.  See
@indicateurl{http://www.gnu.org/copyleft}.

Each version of the License is given a distinguishing version
number.  If the Document specifies that a particular numbered
version of this License “or any later version” applies to it, you
have the option of following the terms and conditions either of
that specified version or of any later version that has been
published (not as a draft) by the Free Software Foundation.  If the
Document does not specify a version number of this License, you may
choose any version ever published (not as a draft) by the Free
Software Foundation.  If the Document specifies that a proxy can
decide which future versions of this License can be used, that
proxy’s public statement of acceptance of a version permanently
authorizes you to choose that version for the Document.
@end quotation


@enumerate 11

@item 
RELICENSING
@end enumerate

@quotation

“Massive Multiauthor Collaboration Site” (or “MMC Site”) means any
World Wide Web server that publishes copyrightable works and also
provides prominent facilities for anybody to edit those works.  A
public wiki that anybody can edit is an example of such a server.
A “Massive Multiauthor Collaboration” (or “MMC”) contained in the
site means any set of copyrightable works thus published on the MMC
site.

“CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0
license published by Creative Commons Corporation, a not-for-profit
corporation with a principal place of business in San Francisco,
California, as well as future copyleft versions of that license
published by that same organization.

“Incorporate” means to publish or republish a Document, in whole or
in part, as part of another Document.

An MMC is “eligible for relicensing” if it is licensed under this
License, and if all works that were first published under this
License somewhere other than this MMC, and subsequently
incorporated in whole or in part into the MMC, (1) had no cover
texts or invariant sections, and (2) were thus incorporated prior
to November 1, 2008.

The operator of an MMC Site may republish an MMC contained in the
site under CC-BY-SA on the same site at any time before August 1,
2009, provided the MMC is eligible for relicensing.
@end quotation


@node Emacs lisp functions and variables,,The GNU Free Documentation License,Top
@unnumbered Emacs lisp functions and variables


@menu
* evil-add-command-properties: 0. 
* evil-auto-balance-windows: 1. 
* evil-auto-indent: 2. 
* evil-backspace-join-lines: 3. 
* evil-bigword: 4. 
* evil-buffer-regexps: 5. 
* evil-complete-all-buffers: 6. 
* evil-cross-lines: 7. 
* evil-declare-change-repeat: 8. 
* evil-declare-motion: 9. 
* evil-declare-not-repeat: a. 
* evil-declare-repeat: b. 
* evil-default-cursor: c. 
* evil-default-state: d. 
* evil-define-command: e. 
* evil-define-key: f. 
* evil-define-motion: 10. 
* evil-define-operator: 11. 
* evil-define-state: 12. 
* evil-define-text-object: 13. 
* evil-define-type: 14. 
* evil-disable-insert-state-bindings: 15. 
* evil-echo-state: 16. 
* evil-esc-delay: 17. 
* evil-ex-hl-update-delay: 18. 
* evil-flash-delay: 19. 
* evil-get-command-properties: 1a. 
* evil-get-command-property: 1b. 
* evil-global-set-key: 1c. 
* evil-highlight-closing-paren-at-point-states: 1d. 
* evil-indent-convert-tabs: 1e. 
* evil-intercept-esc: 1f. 
* evil-kbd-macro-suppress-motion-error: 20. 
* evil-kill-on-visual-paste: 21. 
* evil-local-set-key: 22. 
* evil-mode-line-format: 23. 
* evil-mouse-word: 24. 
* evil-move-beyond-eol: 25. 
* evil-move-cursor-back: 26. 
* evil-regexp-search: 27. 
* evil-repeat-move-cursor: 28. 
* evil-respect-visual-line-mode: 29. 
* evil-search-module: 2a. 
* evil-search-wrap: 2b. 
* evil-select-an-object: 2c. 
* evil-select-inner-object: 2d. 
* evil-select-paren: 2e. 
* evil-set-command-properties: 2f. 
* evil-set-initial-state: 30. 
* evil-set-leader: 31. 
* evil-shift-round: 32. 
* evil-shift-width: 33. 
* evil-show-paren-range: 34. 
* evil-split-window-below: 35. 
* evil-start-of-line: 36. 
* evil-toggle-key: 37. 
* evil-track-eol: 38. 
* evil-undo-system: 39. 
* evil-vsplit-window-right: 3a. 
* evil-want-C-d-scroll: 3b. 
* evil-want-C-i-jump: 3c. 
* evil-want-C-u-delete: 3d. 
* evil-want-C-u-scroll: 3e. 
* evil-want-C-w-delete: 3f. 
* evil-want-C-w-in-emacs-state: 40. 
* evil-want-empty-ex-last-command: 41. 
* evil-want-fine-undo: 42. 
* evil-want-Y-yank-to-eol: 43. 
@end menu


@c %**end of body
@bye