-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcc-edit-text-menu.el
103 lines (74 loc) · 3.48 KB
/
cc-edit-text-menu.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
;;; cc-edit-text-menu.el --- Edit Text Menus -*- lexical-binding: t; -*-
;; Copyright (C) 2023-2024 Charles Choi
;; Author: Charles Choi <[email protected]>
;; Keywords: tools
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;;
(easy-menu-define cc/transpose-menu nil
"Keymap for Transpose submenu"
'("Transpose"
:visible (not buffer-read-only)
["Characters" transpose-chars
:help "Interchange characters around point, moving forward one character."]
["Words" transpose-words
:help "Interchange words around point, leaving point at end of them."]
["Lines" transpose-lines
:help "Exchange current line and previous line, leaving point after both."]
["Sentences" transpose-sentences
:help "Interchange the current sentence with the next one."]
["Paragraphs" transpose-paragraphs
:help "Interchange the current paragraph with the next one."]
["Regions" transpose-regions
:help "region STARTR1 to ENDR1 with STARTR2 to ENDR2."]
["Balanced Expressions (sexps)" transpose-sexps
:help "Like C-t (‘transpose-chars’), but applies to balanced \
expressions (sexps)."]))
(easy-menu-define cc/move-text-menu nil
"Keymap for Move Text submenu"
'("Move Text"
:visible (not buffer-read-only)
["Word Forward" cc/move-word-forward
:help "Move word to the right of point forward one word."]
["Word Backward" cc/move-word-backward
:help "Move word to the right of point backward one word."]
["Sentence Forward" cc/move-sentence-forward
:help "Move sentence to the right of point forward one sentence."]
["Sentence Backward" cc/move-sentence-backward
:help "Move sentence to the right of point backward one sentence."]
["Balanced Expression (sexp) Forward" cc/move-sexp-forward
:help "Move balanced expression (sexp) to the right of point forward \
one sexp."]
["Balanced Expression (sexp) Backward" cc/move-sexp-backward
:help "Move balanced expression (sexp) to the right of point backward \
one sexp."]))
(easy-menu-define cc/delete-space-menu nil
"Keymap for Deleting Space submenu"
'("Delete Space"
:visible (not buffer-read-only)
["Join Line" join-line
:help "Join this line to previous and fix up \
whitespace at join"]
["Just One Space" just-one-space
:help "Delete all spaces and tabs around point, leaving \
one space."]
["Delete Horizontal Space" delete-horizontal-space
:help "Delete all spaces and tabs around point."]
["Delete Blank Lines" delete-blank-lines
:help "On blank line, delete all surrounding blank lines, \
leaving just one."]
["Whitespace Cleanup" whitespace-cleanup
:help "Cleanup some blank problems in all buffer or at region."]
["Delete Trailing Whitespace" delete-trailing-whitespace
:help "Delete trailing whitespace between START and END."]))
(provide 'cc-edit-text-menu)
;;; cc-edit-text-menu.el ends here