/
evilspeak-commands.el
828 lines (685 loc) · 24.4 KB
/
evilspeak-commands.el
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
;; (require 'emacspeak)
(require 'evil)
(defun evilspeak-speak-line-forward ()
(emacspeak-speak-line 1))
(defun evilspeak-speak-line-backward ()
(emacspeak-speak-line -1))
(defun evilspeak-speak-line ()
(emacspeak-speak-line))
(defun evilspeak-speak-char ()
(emacspeak-speak-char t))
(defun evilspeak-speak-word ()
(emacspeak-speak-word))
(defun evilspeak-speak-paragraph ()
(emacspeak-speak-paragraph))
(defun evilspeak-speak-long-jump ()
(emacspeak-speak-line))
(defun evilspeak-speak-jump ()
(emacspeak-speak-line))
(defun evilspeak-speak-region (arg)
(emacspeak-speak-region arg))
(evil-define-motion evilspeak-next-line (count)
"Move the cursor COUNT lines down."
:type line
(evil-next-line count)
(evilspeak-speak-line))
(evil-define-motion evilspeak-previous-line (count)
"Move the cursor COUNT lines up."
:type line
(evil-previous-line count)
(evilspeak-speak-line))
;;; Code:
(evil-define-motion evilspeak-forward-char (count &optional crosslines noerror)
"Move cursor to the right by COUNT characters.
Movement is restricted to the current line unless CROSSLINES is non-nil.
If NOERROR is non-nil, don't signal an error upon reaching the end
of the line or the buffer; just return nil."
:type exclusive
(interactive "<c>" (list evil-cross-lines
(evil-kbd-macro-suppress-motion-error)))
(evil-forward-char count crosslines noerror)
(evilspeak-speak-char))
(evil-define-motion evilspeak-backward-char (count &optional crosslines noerror)
"Move cursor to the left by COUNT characters.
Movement is restricted to the current line unless CROSSLINES is non-nil.
If NOERROR is non-nil, don't signal an error upon reaching the beginning
of the line or the buffer; just return nil."
:type exclusive
(interactive "<c>" (list evil-cross-lines
(evil-kbd-macro-suppress-motion-error)))
(evil-backward-char count crosslines noerror)
(evilspeak-speak-char))
(evil-define-motion evilspeak-next-visual-line (count)
"Move the cursor COUNT screen lines down."
:type exclusive
(evil-next-visual-line count)
(evilspeak-speak-line))
(evil-define-motion evilspeak-previous-visual-line (count)
"Move the cursor COUNT screen lines down."
:type exclusive
(evil-previous-visual-line count)
(evilspeak-speak-line))
;; used for repeated commands like "dd"
(evil-define-motion evilspeak-line (count)
"Move COUNT - 1 lines down."
:type line
(evil-line count)
(evilspeak-speak-line))
(evil-define-motion evilspeak-beginning-of-line ()
"Move the cursor to the beginning of the current line."
:type exclusive
(evil-beginning-of-line)
(evilspeak-speak-line))
(evil-define-motion evilspeak-end-of-line (count)
"Move the cursor to the end of the current line.
If COUNT is given, move COUNT - 1 lines downward first."
:type inclusive
(evil-end-of-line)
(evilspeak-speak-line))
(evil-define-motion evilspeak-beginning-of-visual-line ()
"Move the cursor to the first character of the current screen line."
:type exclusive
(evil-beginning-of-visual-line)
(evilspeak-speak-line))
(evil-define-motion evilspeak-end-of-visual-line (count)
"Move the cursor to the last character of the current screen line.
If COUNT is given, move COUNT - 1 screen lines downward first."
:type inclusive
(evil-end-of-visual-line count)
(evilspeak-speak-line))
(evil-define-motion evilspeak-middle-of-visual-line ()
"Move the cursor to the middle of the current visual line."
:type exclusive
(evil-middle-of-visual-line)
(evilspeak-speak-line))
(evil-define-motion evilspeak-beginning-of-line-or-digit-argument ()
"Move the cursor to the beginning of the current line.
This function passes its command to `digit-argument' (usually a 0)
if it is not the first event."
:type exclusive
(evil-beginning-of-line-or-digit-argument)
(evilspeak-speak-line))
(evil-define-motion evilspeak-first-non-blank ()
"Move the cursor to the first non-blank character of the current line."
:type exclusive
(evil-first-non-blank)
(evilspeak-speak-line))
(evil-define-motion evilspeak-last-non-blank (count)
"Move the cursor to the last non-blank character of the current line.
If COUNT is given, move COUNT - 1 lines downward first."
:type inclusive
(evil-last-non-blank count)
(evilspeak-speak-line))
(evil-define-motion evilspeak-first-non-blank-of-visual-line ()
"Move the cursor to the first non blank character
of the current screen line."
:type exclusive
(evil-first-non-blank-of-visual-line)
(evilspeak-speak-line))
(evil-define-motion evilspeak-next-line-first-non-blank (count)
"Move the cursor COUNT lines down on the first non-blank character."
:type line
(evil-next-line-first-non-blank count)
(evilspeak-speak-line))
(evil-define-motion evilspeak-next-line-1-first-non-blank (count)
"Move the cursor COUNT-1 lines down on the first non-blank character."
:type line
(evil-next-line-1-first-non-blank count)
(evilspeak-speak-line))
(evil-define-motion evilspeak-previous-line-first-non-blank (count)
"Move the cursor COUNT lines up on the first non-blank character."
:type line
(evil-previous-line-first-non-blank count)
(evilspeak-speak-line))
(evil-define-motion evilspeak-goto-line (count)
"Go to the first non-blank character of line COUNT.
By default the last line."
:jump t
:type line
(evil-goto-line count)
(evilspeak-speak-line))
(evil-define-motion evilspeak-goto-first-line (count)
"Go to the first non-blank character of line COUNT.
By default the first line."
:jump t
:type line
(evil-goto-first-line count)
(evilspeak-speak-line))
(evil-define-motion evilspeak-forward-word-begin (count &optional bigword)
:type exclusive
(evil-forward-word-begin count bigword)
(evilspeak-speak-word))
(evil-define-motion evilspeak-forward-word-end (count &optional bigword)
"Move the cursor to the end of the COUNT-th next word.
If BIGWORD is non-nil, move by WORDS."
:type inclusive
(evil-forward-word-end count bigword)
(evilspeak-speak-word))
(evil-define-motion evilspeak-backward-word-begin (count &optional bigword)
"Move the cursor to the beginning of the COUNT-th previous word.
If BIGWORD is non-nil, move by WORDS."
:type exclusive
(evil-backward-word-begin count bigword)
(evilspeak-speak-word))
(evil-define-motion evilspeak-backward-word-end (count &optional bigword)
"Move the cursor to the end of the COUNT-th previous word.
If BIGWORD is non-nil, move by WORDS."
:type inclusive
(evil-backward-word-end count bigword)
(evilspeak-speak-word))
(evil-define-motion evilspeak-forward-WORD-begin (count)
"Move the cursor to the beginning of the COUNT-th next WORD."
:type exclusive
(evil-forward-WORD-begin count)
(evilspeak-speak-word))
(evil-define-motion evilspeak-forward-WORD-end (count)
"Move the cursor to the end of the COUNT-th next WORD."
:type inclusive
(evil-forward-WORD-end count)
(evilspeak-speak-word))
(evil-define-motion evilspeak-backward-WORD-begin (count)
"Move the cursor to the beginning of the COUNT-th previous WORD."
:type exclusive
(evil-backward-WORD-begin count)
(evilspeak-speak-word))
(evil-define-motion evilspeak-backward-WORD-end (count)
"Move the cursor to the end of the COUNT-th previous WORD."
:type inclusive
(evil-backward-WORD-end count)
(evilspeak-speak-word))
;; section movement
(evil-define-motion evilspeak-forward-section-begin (count)
"Move the cursor to the beginning of the COUNT-th next section."
:jump t
:type exclusive
(evil-forward-section-begin count)
(evilspeak-speak-line))
(evil-define-motion evilspeak-forward-section-end (count)
"Move the cursor to the end of the COUNT-th next section."
:jump t
:type inclusive
(evil-forward-section-end count)
(evilspeak-speak-line))
(evil-define-motion evilspeak-backward-section-begin (count)
"Move the cursor to the beginning of the COUNT-th previous section."
:jump t
:type exclusive
(evil-backward-section-begin count)
(evilspeak-speak-line))
(evil-define-motion evilspeak-backward-section-end (count)
"Move the cursor to the end of the COUNT-th previous section."
:jump t
:type inclusive
(evil-backward-section-end count)
(evilspeak-speak-line))
(evil-define-motion evilspeak-forward-sentence-begin (count)
"Move to the next COUNT-th beginning of a sentence or end of a paragraph."
:jump t
:type exclusive
(evil-forward-section-begin count)
(evilspeak-speak-line))
(evil-define-motion evilspeak-backward-sentence-begin (count)
"Move to the previous COUNT-th beginning of a sentence or paragraph."
:jump t
:type exclusive
(evil-backward-sentence-begin count)
(evilspeak-speak-line))
(evil-define-motion evilspeak-forward-paragraph (count)
"Move to the end of the COUNT-th next paragraph."
:jump t
:type exclusive
(evil-forward-paragraph count)
(evilspeak-speak-paragraph))
(evil-define-motion evilspeak-backward-paragraph (count)
"Move to the beginning of the COUNT-th previous paragraph."
:jump t
:type exclusive
(evil-backward-paragraph count)
(evilspeak-speak-paragraph))
(evil-define-motion evilspeak-jump-item (count)
"Find the next item in this line after or under the cursor
and jump to the corresponding one."
:jump t
:type inclusive
(evil-jump-item count)
(evilspeak-speak-word))
(evil-define-motion evilspeak-previous-open-paren (count)
"Go to [count] previous unmatched '('."
:type exclusive
(evil-previous-open-paren count)
(evilspeak-speak-char))
(evil-define-motion evilspeak-next-close-paren (count)
"Go to [count] next unmatched ')'."
:type exclusive
(evil-next-close-paren count)
(evilspeak-speak-char))
(evil-define-motion evilspeak-previous-open-brace (count)
"Go to [count] previous unmatched '{'."
:type exclusive
(evil-previous-open-brace count)
(evilspeak-speak-char))
(evil-define-motion evilspeak-next-close-brace (count)
"Go to [count] next unmatched '}'."
:type exclusive
(evil-next-close-brace count)
(evilspeak-speak-char))
(evil-define-motion evilspeak-find-char (count char)
"Move to the next COUNT'th occurrence of CHAR."
:type inclusive
(interactive "<c><C>")
(evil-find-char count char)
(evilspeak-speak-word))
(evil-define-motion evilspeak-find-char-backward (count char)
"Move to the previous COUNT'th occurrence of CHAR."
:type exclusive
(interactive "<c><C>")
(evil-find-char-backward count char)
(evilspeak-speak-word))
(evil-define-motion evilspeak-find-char-to (count char)
"Move before the next COUNT'th occurrence of CHAR."
:type inclusive
(interactive "<c><C>")
(evil-find-char-to count char)
(evilspeak-speak-word))
(evil-define-motion evilspeak-find-char-to-backward (count char)
"Move before the previous COUNT'th occurrence of CHAR."
:type exclusive
(interactive "<c><C>")
(evil-find-char-to-backward count char)
(evilspeak-speak-word))
(evil-define-motion evilspeak-repeat-find-char (count)
"Repeat the last find COUNT times."
:type inclusive
(evil-repeat-find-char count)
(evilspeak-speak-word))
(evil-define-motion evilspeak-repeat-find-char-reverse (count)
"Repeat the last find COUNT times in the opposite direction."
:type inclusive
(evil-repeat-find-char-reverse count)
(evilspeak-speak-word))
(evil-define-motion evilspeak-goto-column (count)
"Go to column COUNT on the current line.
Columns are counted from zero."
:type exclusive
(evil-goto-column count)
(evilspeak-speak-line-forward))
(evil-define-command evilspeak-goto-mark (char &optional noerror)
"Go to the marker specified by CHAR."
:keep-visual t
:repeat nil
:type exclusive
(interactive (list (read-char)))
(evil-goto-mark char noerror)
(evilspeak-speak-line-forward))
(evil-define-command evilspeak-goto-mark-line (char &optional noerror)
"Go to the line of the marker specified by CHAR."
:keep-visual t
:repeat nil
:type line
(interactive (list (read-char)))
(evil-goto-mark-line char noerror)
(evilspeak-speak-line-forward))
(evil-define-motion evilspeak-jump-backward (count)
"Go to older position in jump list."
(evil-jump-backward count)
(evilspeak-speak-long-jump))
(evil-define-motion evilspeak-jump-forward (count)
"Go to newer position in jump list.
To go the other way, press \
\\<evil-motion-state-map>\\[evil-jump-backward]."
(evil-jump-forward count)
(evilspeak-speak-long-jump))
(evil-define-motion evilspeak-jump-backward-swap (count)
"Go to the previous position in jump list.
The current position is placed in the jump list."
(evil-jump-backward-swap count)
(evilspeak-speak-long-jump))
(evil-define-motion evilspeak-jump-to-tag (arg)
"Jump to tag under point.
If called with a prefix argument, provide a prompt
for specifying the tag."
:jump t
(interactive "P")
(evil-jump-to-tag arg)
(evilspeak-speak-long-jump))
(evil-define-motion evilspeak-lookup ()
"Look up the keyword at point.
Calls `evil-lookup-func'."
(evil-lookup)
(evilspeak-speak-long-jump))
(evil-define-motion evilspeak-ret (count)
"Move the cursor COUNT lines down.
If point is on a widget or a button, click on it.
In Insert state, insert a newline."
:type line
(evil-ret count)
(evilspeak-speak-line))
(evil-define-motion evilspeak-ret-and-indent (count)
"Move the cursor COUNT lines down.
If point is on a widget or a button, click on it.
In Insert state, insert a newline and indent."
:type line
(evil-ret-and-indent count)
(evilspeak-speak-line))
(evil-define-motion evilspeak-window-top (count)
"Move the cursor to line COUNT from the top of the window
on the first non-blank character."
:jump t
:type line
(evil-window-top count)
(evilspeak-speak-line))
(evil-define-motion evilspeak-window-middle ()
"Move the cursor to the middle line in the window
on the first non-blank character."
:jump t
:type line
(evil-window-middle)
(evilspeak-speak-line))
(evil-define-motion evilspeak-window-bottom (count)
"Move the cursor to line COUNT from the bottom of the window
on the first non-blank character."
:jump t
:type line
(evil-window-bottom count)
(evilspeak-speak-line))
(evil-define-command evilspeak-scroll-line-down (count) ;
:repeat nil
(interactive "<c>")
;; (evil-scroll-line-down count)
(emacspeak-read-next-line count))
(evil-define-command evilspeak-scroll-line-up (count) ;
:repeat nil
(interactive "<c>")
;; (evil-scroll-line-up count)
(emacspeak-read-previous-line count))
(evil-define-command evilspeak-scroll-up (count) ;
:repeat nil
:keep-visual t
(interactive "<c>")
(evil-scroll-up count)
(evilspeak-speak-line))
(evil-define-command evilspeak-scroll-down (count) ;
:repeat nil
:keep-visual t
(interactive "<c>")
(evil-scroll-down count)
(evilspeak-speak-line))
(evil-define-command evilspeak-scroll-page-up (count)
"Scrolls the window COUNT pages upwards."
:repeat nil
:keep-visual t
(interactive "p")
(evil-scroll-page-up count)
(evilspeak-speak-line))
(evil-define-command evilspeak-scroll-page-down (count)
"Scrolls the window COUNT pages upwards."
:repeat nil
:keep-visual t
(interactive "p")
(evil-scroll-page-down count)
(evilspeak-speak-line))
;; skip other scroll functions
;; text-object skipped
;; ;;; Operator commands
;; TODO speak registry
(evil-define-operator evilspeak-delete (beg end type register yank-handler)
"Delete text from BEG to END with TYPE.
Save in REGISTER or in the kill-ring with YANK-HANDLER."
(evil-delete beg end type register yank-handler)
(evilspeak-speak-line-forward))
(evil-define-operator evilspeak-delete-line
(beg end type register yank-handler)
"Delete to end of line."
:motion nil
:keep-visual t
(evil-delete-line beg end type register yank-handler)
(evilspeak-speak-line-forward))
(evil-define-operator evilspeak-delete-whole-line
(beg end type register yank-handler)
"Delete whole line."
:motion evil-line
(evil-delete-whole-line beg end type register yank-handler)
(evilspeak-speak-line-forward))
(evil-define-operator evilspeak-delete-char (beg end type register)
"Delete next character."
:motion evil-forward-char
(evil-delete-char beg end type register)
(evilspeak-speak-char))
(evil-define-operator evilspeak-delete-backward-char (beg end type register)
"Delete previous character."
:motion evil-backward-char
(evil-delete-backward-char beg end type register)
(evilspeak-speak-char))
(evil-define-command evilspeak-delete-backward-char-and-join (count)
"Delete previous character and join lines.
If point is at the beginning of a line then the current line will
be joined with the previous line if and only if
`evil-backspace-join-lines'."
(evil-delete-backward-char-and-join count)
(evilspeak-speak-word t))
(evil-define-command evilspeak-delete-backward-word ()
(evil-delete-backward-word)
(evilspeak-speak-word))
(evil-define-command evilspeak-move (beg end address)
"Move lines in BEG END below line given by ADDRESS."
:motion evil-line
(evil-move beg end address)
(evilspeak-speak-line))
(evil-define-operator evilspeak-upcase (beg end type)
"Convert text to upper case."
(evil-upcase beg end type)
(evilspeak-speak-region))
(evil-define-operator evilspeak-downcase (beg end type)
"Convert text to lower case."
(evil-downcase beg end type)
(evilspeak-speak-region))
(evil-define-operator evilspeak-join (beg end)
"Join the selected lines."
:motion evil-line
(evil-join beg end)
(evilspeak-speak-line))
(evil-define-operator evilspeak-join-whitespace (beg end)
"Join the selected lines without changing whitespace.
\\<evil-normal-state-map>Like \\[evil-join], \
but doesn't insert or remove any spaces."
:motion evil-line
(evil-join-whitespace beg end)
(evilspeak-speak-line))
(evil-define-operator evilspeak-fill (beg end)
"Fill text."
:move-point nil
:type line
(evil-fill beg end)
(evilspeak-speak-region))
(evil-define-operator evilspeak-fill-and-move (beg end)
"Fill text and move point to the end of the filled region."
:move-point nil
:type line
(evil-fill-and-move beg end)
(evilspeak-speak-region))
(evil-define-operator evilspeak-indent (beg end)
"Indent text."
:move-point nil
:type line
(evil-indent beg end)
(evilspeak-speak-region))
(evil-define-operator evilspeak-indent-line (beg end)
"Indent the line."
:motion evil-line
(evil-indent beg end)
(evilspeak-speak-line))
(evil-define-command evilspeak-paste-before
(count &optional register yank-handler)
"Pastes the latest yanked text before the cursor position.
The return value is the yanked text."
:suppress-operator t
(evil-paste-before count register yank-handler)
(evilspeak-speak-line))
(evil-define-command evilspeak-paste-after
(count &optional register yank-handler)
"Pastes the latest yanked text behind point.
The return value is the yanked text."
:suppress-operator t
(evil-paste-after count register yank-handler)
(evilspeak-speak-line-forward))
;; ;;; Visual commands
;; ;;; Search
(evil-define-motion evilspeak-search-forward ()
(format "Search forward for user-entered text.
Searches for regular expression if `evil-regexp-search' is t.%s"
(if (and (fboundp 'isearch-forward)
(documentation 'isearch-forward))
(format "\n\nBelow is the documentation string \
for `isearch-forward',\nwhich lists available keys:\n\n%s"
(documentation 'isearch-forward)) ""))
:jump t
:type exclusive
:repeat evilspeak-repeat-search
(evil-search-incrementally t evil-regexp-search)
(evilspeak-speak-jump))
(evil-define-motion evilspeak-search-backward ()
(format "Search backward for user-entered text.
Searches for regular expression if `evil-regexp-search' is t.%s"
(if (and (fboundp 'isearch-forward)
(documentation 'isearch-forward))
(format "\n\nBelow is the documentation string \
for `isearch-forward',\nwhich lists available keys:\n\n%s"
(documentation 'isearch-forward)) ""))
:jump t
:type exclusive
:repeat evil-repeat-search
(evil-search-backward)
(evilspeak-speak-jump))
(evil-define-motion evilspeak-search-next (count)
"Repeat the last search."
:jump t
:type exclusive
(evil-search-next count)
(evilspeak-speak-jump))
(evil-define-motion evilspeak-search-previous (count)
"Repeat the last search in the opposite direction."
:jump t
:type exclusive
(evil-search-previous count)
(evilspeak-speak-jump))
(evil-define-motion evilspeak-search-word-backward (count &optional symbol)
"Search backward for symbol under point."
:jump t
:type exclusive
(evil-search-word-backward count symbol)
(evilspeak-speak-jump))
(evil-define-motion evilspeak-search-word-forward (count &optional symbol)
"Search forward for symbol under point."
:jump t
:type exclusive
(evil-search-word-forward count symbol)
(evilspeak-speak-jump))
(evil-define-motion evilspeak-search-unbounded-word-backward (count &optional symbol)
"Search backward for symbol under point.
The search is unbounded, i.e., the pattern is not wrapped in
\\<...\\>."
:jump t
:type exclusive
(evil-search-unbounded-word-backward count symbol)
(evilspeak-speak-jump))
(evil-define-motion evilspeak-search-unbounded-word-forward (count &optional symbol)
"Search forward for symbol under point.
The search is unbounded, i.e., the pattern is not wrapped in
\\<...\\>."
:jump t
:type exclusive
(evil-search-unbounded-word-forward count symbol)
(evilspeak-speak-jump))
;; gotos
(evil-define-motion evilspeak-goto-definition ()
"Go to definition or first occurrence of symbol under point."
:jump t
:type exclusive
(evil-goto-definition)
(evilspeak-speak-long-jump))
(evil-define-command evilspeak-goto-error (count)
"Go to error number COUNT.
If no COUNT supplied, move to the current error.
Acts like `first-error' other than when given no counts, goes
to the current error instead of the first, like in Vim's :cc
command."
:repeat nil
(evil-goto-error count)
(evilspeak-speak-long-jump))
(evil-define-command evilspeak-buffer (buffer)
"Switches to another buffer."
:repeat nil
(interactive "<b>")
(evil-buffer buffer)
(evilspeak-speak-long-jump))
(evil-define-command evilspeak-next-buffer (&optional count)
"Goes to the `count'-th next buffer in the buffer list."
:repeat nil
(evil-next-buffer count)
(evilspeak-speak-long-jump))
(evil-define-command evilspeak-prev-buffer (&optional count)
"Goes to the `count'-th prev buffer in the buffer list."
:repeat nil
(evil-prev-buffer count)
(evilspeak-speak-long-jump))
(evil-define-motion evilspeak-ex-search-next (count)
"Goes to the next occurrence."
:jump t
:type exclusive
(evil-ex-search-next count)
(evilspeak-speak-jump))
(evil-define-motion evilspeak-ex-search-previous (count)
"Goes the the previous occurrence."
:jump t
:type exclusive
(evil-ex-search-previous count)
(evilspeak-speak-jump))
(evil-define-motion evilspeak-ex-search-forward (count)
"Starts a forward search."
:jump t
:type exclusive
:repeat evil-repeat-ex-search
(evil-ex-search-forward count)
(evilspeak-speak-jump))
(evil-define-motion evilspeak-ex-search-backward (count)
"Starts a forward search."
:jump t
:repeat evil-repeat-ex-search
(evil-ex-search-backward count)
(evilspeak-speak-jump))
(evil-define-motion evilspeak-ex-search-word-forward (count &optional symbol)
"Search for the next occurrence of word under the cursor."
:jump t
:type exclusive
(evil-ex-search-word-forward count symbol)
(evilspeak-speak-jump))
(evil-define-motion evilspeak-ex-search-word-backward (count &optional symbol)
"Search for the next occurrence of word under the cursor."
:jump t
:type exclusive
(evil-ex-search-word-backward count symbol)
(evilspeak-speak-jump))
(evil-define-motion evilspeak-ex-search-unbounded-word-forward (count &optional symbol)
"Search for the next occurrence of word under the cursor."
:jump t
:type exclusive
(evil-ex-search-unbounded-word-forward count symbol)
(evilspeak-speak-jump))
(evil-define-motion evilspeak-ex-search-unbounded-word-backward (count &optional symbol)
"Search for the next occurrence of word under the cursor."
:jump t
:type exclusive
(evil-ex-search-unbounded-word-backward count symbol)
(evilspeak-speak-jump))
(evil-define-command evilspeak-goto-char (position)
"Go to POSITION in the buffer.
Default position is the beginning of the buffer."
(evil-goto-char position)
(evilspeak-speak-line-forward))
(evil-define-command evilspeak-force-normal-state ()
"Switch to normal state without recording current command."
:repeat abort
:suppress-operator t
(evil-normal-state)
(message "-- NORMAL --"))
(provide 'evilspeak-commands)