Skip to content

Commit 204f767

Browse files
committed
Updated key bindings to sync with upcoming Textadept 12.0.
1 parent a3c267c commit 204f767

File tree

2 files changed

+24
-19
lines changed

2 files changed

+24
-19
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ even if one buffer has a change and the other does not (additions or deletions).
3838
Windows and Linux | macOS | Terminal | Command
3939
-|-|-|-
4040
**Tools**| | |
41-
F6 | F6 | F6 | Compare files...
42-
Shift+F6 | ⇧F6 | S-F6 | Compare the buffers in two split views
43-
Alt+Down | ⌥⇣ | M-Down | Goto next difference
44-
Alt+Up | ⌥⇡ | M-Up | Goto previous difference
45-
Alt+Left | ⌥⇠ | M-Left | Merge left
46-
Alt+Right | ⌥⇢ | M-Right | Merge right
41+
F6 | F6 | None | Compare files...
42+
Shift+F6 | ⇧F6 | None | Compare the buffers in two split views
43+
Ctrl+F6 | ⌘F6 | None | Stop comparing
44+
Ctrl+Alt+. | ^⌘. | None | Goto next difference
45+
Ctrl+Alt+, | ^⌘, | None | Goto previous difference
46+
Ctrl+Alt+< | ^⌘< | None | Merge left
47+
Ctrl+Alt+> | ^⌘> | None | Merge right
4748

4849

4950
## Fields defined by `file_diff`

init.lua

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@ local M = {}
4242
-- Windows and Linux | macOS | Terminal | Command
4343
-- -|-|-|-
4444
-- **Tools**| | |
45-
-- F6 | F6 | F6 | Compare files...
46-
-- Shift+F6 | ⇧F6 | S-F6 | Compare the buffers in two split views
47-
-- Alt+Down | ⌥⇣ | M-Down | Goto next difference
48-
-- Alt+Up | ⌥⇡ | M-Up | Goto previous difference
49-
-- Alt+Left | ⌥⇠ | M-Left | Merge left
50-
-- Alt+Right | ⌥⇢ | M-Right | Merge right
45+
-- F6 | F6 | None | Compare files...
46+
-- Shift+F6 | ⇧F6 | None | Compare the buffers in two split views
47+
-- Ctrl+F6 | ⌘F6 | None | Stop comparing
48+
-- Ctrl+Alt+. | ^⌘. | None | Goto next difference
49+
-- Ctrl+Alt+, | ^⌘, | None | Goto previous difference
50+
-- Ctrl+Alt+< | ^⌘< | None | Merge left
51+
-- Ctrl+Alt+> | ^⌘> | None | Merge right
5152
--
5253
-- @field MARK_ADDITION (number)
5354
-- The marker for line additions.
@@ -555,13 +556,16 @@ for i = 1, #m_tools - 1 do
555556
end
556557
end
557558
end
558-
local GUI = not CURSES
559-
keys.f6 = M.start
560-
keys['shift+f6'] = m_tools[_L['Compare Files']][_L['Compare Buffers']][2]
561-
keys[GUI and 'alt+down' or 'meta+down'] = m_tools[_L['Compare Files']][_L['Next Change']][2]
562-
keys[GUI and 'alt+up' or 'meta+up'] = M.goto_change
563-
keys[GUI and 'alt+left' or 'meta+left'] = m_tools[_L['Compare Files']][_L['Merge Left']][2]
564-
keys[GUI and 'alt+right' or 'meta+right'] = M.merge
559+
if not CURSES then
560+
keys.f6 = M.start
561+
keys['shift+f6'] = m_tools[_L['Compare Files']][_L['Compare Buffers']][2]
562+
keys[not OSX and 'ctrl+f6' or 'cmd+f6'] = m_tools[_L['Compare Files']][_L['Stop Comparing']][2]
563+
keys[not OSX and 'ctrl+alt+.' or 'ctrl+cmd+.'] =
564+
m_tools[_L['Compare Files']][_L['Next Change']][2]
565+
keys[not OSX and 'ctrl+alt+,' or 'ctrl+cmd+,'] = M.goto_change
566+
keys[not OSX and 'ctrl+alt+<' or 'ctrl+cmd+<'] = m_tools[_L['Compare Files']][_L['Merge Left']][2]
567+
keys[not OSX and 'ctrl+alt+>' or 'ctrl+cmd+>'] = M.merge
568+
end
565569

566570
return M
567571

0 commit comments

Comments
 (0)