-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlugins.Colorer.lua
More file actions
183 lines (130 loc) · 3.74 KB
/
Copy pathPlugins.Colorer.lua
File metadata and controls
183 lines (130 loc) · 3.74 KB
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
--[[ Style macros with plugins ]]--
----------------------------------------
--[[ description:
-- Macros for text styling with plugins.
-- Макросы для стилизации текста с плагинами.
--]]
----------------------------------------
--[[ uses:
nil.
-- group: Macros/Plugins.
--]]
--------------------------------------------------------------------------------
----------------------------------------
--local far = far
--local F = far.Flags
----------------------------------------
--[[
local debugs = require "context.utils.useDebugs"
local logShow = debugs.Show
--]]
--------------------------------------------------------------------------------
--local unit = {}
----------------------------------------
local guids = {}
--unit.guids = guids
local Macro = Macro or function () end
--local Async = function () return mmode(3, 1) end
local Plugin = Plugin or {}
local PluginExist = Plugin.Exist
local PluginMenu = Plugin.Menu
--local PluginMenu, CallPlugin = Plugin.Menu, Plugin.Call
---------------------------------------- 'C' -- Colorer
-- [[
guids.Colorer = "D2F36B62-A470-418D-83A3-ED7A3710E5B5"
local Exist = function () return PluginExist(guids.Colorer) end
Macro {
area = "Editor",
key = "LCtrlLAltShiftC",
flags = "",
description = "Colorer: Reload HRC",
condition = Exist,
action = function ()
--return CallPlugin(guids.Colorer, 12)
if PluginMenu(guids.Colorer) then return Keys"R" end
end, ---
} ---
Macro {
area = "Editor",
key = "LCtrlShiftL",
flags = "",
description = "Colorer: Section List",
condition = Exist,
action = function ()
--return CallPlugin(guids.Colorer, 5)
if PluginMenu(guids.Colorer) then return Keys"5" end
end, ---
} ---
Macro {
area = "Editor",
key = "LCtrlShiftNum9",
flags = "",
description = "Colorer: Prev Section",
condition = Exist,
action = function ()
--Keys"F11 C 5 Up Enter"
if PluginMenu(guids.Colorer) then return Keys"5 Up Enter" end
end, ---
} ---
Macro {
area = "Editor",
key = "LCtrlShiftNum3",
flags = "",
description = "Colorer: Next Section",
condition = Exist,
action = function ()
--Keys"F11 C 5 Down Enter"
if PluginMenu(guids.Colorer) then return Keys"5 Down Enter" end
end, ---
} ---
Macro {
area = "Editor",
key = "LCtrlLAltL",
flags = "",
description = "Colorer: Attention List",
condition = Exist,
action = function ()
--return CallPlugin(guids.Colorer.Colorer, 6)
if PluginMenu(guids.Colorer) then return Keys"6" end
end, ---
} ---
--]]
---------------------------------------- --- -- Colorer Outliner
-- [[
-- Workaround for Numpad keys in Colorer Outliner.
guids.ColorerOutliner = "A8A298BA-AD5A-4094-8E24-F65BF38E6C1F"
local IsOutliner = function ()
return PluginExist(guids.Colorer) and Menu.Id == guids.ColorerOutliner
end
local OutlinerNumpadKeys = {
Num0 = "Ins",
Num1 = "End",
Num2 = "Down",
Num3 = "PgDn",
Num4 = "Left",
Num5 = "Clear",
Num6 = "Right",
Num7 = "Home",
Num8 = "Up",
Num9 = "PgUp",
} --- OutlinerNumpadKeys
for k, v in pairs(OutlinerNumpadKeys) do
Macro {
area = "Menu",
key = k,
flags = "",
description = "Colorer: Outliner "..v,
condition = IsOutliner,
action = function () return Keys(v) end, ---
} ---
Macro {
area = "Menu",
key = "Ctrl"..k,
flags = "",
description = "Colorer: Outliner Ctrl"..v,
condition = IsOutliner,
action = function () return Keys("Ctrl"..v) end, ---
} ---
end -- for
--]]
--------------------------------------------------------------------------------