Skip to content

Commit fb88a82

Browse files
committed
Use new keys.assign_platform_bindings().
Requires latest Textadept.
1 parent 1696613 commit fb88a82

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ There will be an "Edit > Reformat" menu.
1616
Windows and Linux | macOS | Terminal | Command
1717
-|-|-|-
1818
**Edit**| | |
19-
Ctrl+Shift+J | ⌘⇧J | ^J | Reformat paragraph
19+
Ctrl+Shift+J | ⌘⇧J | M-S-J | Reformat paragraph
2020

2121
<a id="format.code"></a>
2222
## `format.code`()

init.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
-- Windows and Linux | macOS | Terminal | Command
1616
-- -|-|-|-
1717
-- **Edit**| | |
18-
-- Ctrl+Shift+J | ⌘⇧J | ^J | Reformat paragraph
18+
-- Ctrl+Shift+J | ⌘⇧J | M-S-J | Reformat paragraph
1919
-- @module format
2020
local M = {}
2121

@@ -167,6 +167,7 @@ table.insert(m_edit, #m_edit - 1, {
167167
{_L['Code'], M.code}, --
168168
{_L['Paragraph'], M.paragraph}
169169
})
170-
keys[not OSX and 'ctrl+J' or 'cmd+J'] = M.paragraph
170+
171+
keys.assign_platform_bindings{[M.paragraph] = {'ctrl+J', 'cmd+J', 'meta+J'}}
171172

172173
return M

0 commit comments

Comments
 (0)