diff options
author | 2009-01-14 09:21:50 -0500 | |
---|---|---|
committer | 2009-01-14 09:21:50 -0500 | |
commit | d51cbf71f7c2982b4e8ef9b3066bbf22c42f3b81 (patch) | |
tree | 94b194bb3cc9133fa90be8712ac011ae62834b51 | |
parent | 25632fd3a4ed2219a7c8350dfc0b9807292445be (diff) | |
download | textadept-d51cbf71f7c2982b4e8ef9b3066bbf22c42f3b81.tar.gz textadept-d51cbf71f7c2982b4e8ef9b3066bbf22c42f3b81.zip |
Added key commands, menu items, and locale strings for running/compiling files.
-rw-r--r-- | core/ext/key_commands.lua | 9 | ||||
-rw-r--r-- | core/ext/key_commands_mac.lua | 8 | ||||
-rw-r--r-- | core/ext/key_commands_std.lua | 8 | ||||
-rw-r--r-- | core/ext/menu.lua | 9 | ||||
-rw-r--r-- | core/locale.lua | 4 |
5 files changed, 32 insertions, 6 deletions
diff --git a/core/ext/key_commands.lua b/core/ext/key_commands.lua index 25c7c239..21c6ec02 100644 --- a/core/ext/key_commands.lua +++ b/core/ext/key_commands.lua @@ -8,9 +8,9 @@ local textadept = _G.textadept module('textadept.key_commands', package.seeall) --[[ - C: G + C: A: A C G J K L O W X Z - CS: C D G J L Q R S T U W + CS: C D J L Q R S T U W SA: A C D E G H I J K L M O Q R S T W X Z CA: A C G H J K L O Q S T V W X Y Z CSA: C D G H J K L O Q R S T U W X Z @@ -185,6 +185,11 @@ local m_macro = _m.textadept.macros keys.cam = { m_macro.toggle_record } keys.csam = { m_macro.play } +-- Run command. +local m_run = _m.textadept.run +keys.cg = { m_run.go } +keys.csg = { m_run.compile } + -- Project manager commands. local function pm_activate(text) t.pm.entry_text = text diff --git a/core/ext/key_commands_mac.lua b/core/ext/key_commands_mac.lua index 2e8e82b2..a3e92f1b 100644 --- a/core/ext/key_commands_mac.lua +++ b/core/ext/key_commands_mac.lua @@ -9,9 +9,9 @@ local textadept = _G.textadept module('textadept.key_commands_mac', package.seeall) --[[ - C: J L R U W X Z + C: J L U W X Z A: B D E H J K L U - CS: C D G H I J K L M O Q R S T U V W X Y Z + CS: C D G H I J K L M O Q S T U V W X Y Z SA: A B C D F H J K L M N O Q R T U V X CA: A C E G J K L M N O Q R S T U V W X Y Z CSA: A C D E G H J K L M N O P Q R S T U V W X Y Z @@ -99,6 +99,10 @@ keys.cg = { m_editing.goto_line } -- Tools keys['f2'] = { t.command_entry.focus } +-- Run +local m_run = _m.textadept.run +keys.cr = { m_run.go } +keys.csr = { m_run.compile } -- Snippets local m_snippets = _m.textadept.lsnippets keys.ai = { m_snippets.insert } diff --git a/core/ext/key_commands_std.lua b/core/ext/key_commands_std.lua index 2d7688d8..9327da18 100644 --- a/core/ext/key_commands_std.lua +++ b/core/ext/key_commands_std.lua @@ -9,9 +9,9 @@ local textadept = _G.textadept module('textadept.key_commands_std', package.seeall) --[[ - C: B D H J K L R U + C: B D H J K L U A: A B C D E F G H J K L M N P R S T U V W X Y Z - CS: A B C D F G H J K L M N O Q R T U V X Y Z + CS: A B C D F G H J K L M N O Q T U V X Y Z SA: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z CA: A B C D E F G H J K L M N O Q R S T U V W X Y Z CSA: A B C D E F G H J K L M N O P Q R S T U V W X Y Z @@ -99,6 +99,10 @@ keys.cg = { m_editing.goto_line } -- Tools keys['f2'] = { t.command_entry.focus } +-- Run +local m_run = _m.textadept.run +keys.cr = { m_run.go } +keys.csr = { m_run.compile } -- Snippets local m_snippets = _m.textadept.lsnippets keys.ci = { m_snippets.insert } diff --git a/core/ext/menu.lua b/core/ext/menu.lua index 3398f47e..54f4a501 100644 --- a/core/ext/menu.lua +++ b/core/ext/menu.lua @@ -81,6 +81,8 @@ local ID = { GOTO_LINE = 307, -- Tools FOCUS_COMMAND_ENTRY = 401, + RUN = 420, + COMPILE = 421, INSERT_SNIPPET = 402, PREVIOUS_SNIPPET_PLACEHOLDER = 403, CANCEL_SNIPPET = 404, @@ -282,6 +284,10 @@ t.menubar = { gtkmenu { title = l.MENU_TOOLS_TITLE, { l.MENU_TOOLS_FOCUS_COMMAND_ENTRY, ID.FOCUS_COMMAND_ENTRY }, + { SEPARATOR, ID.SEPARATOR }, + { l.MENU_TOOLS_RUN, ID.RUN }, + { l.MENU_TOOLS_COMPILE, ID.COMPILE }, + { SEPARATOR, ID.SEPARATOR }, { title = l.MENU_TOOLS_SNIPPETS_TITLE, { l.MENU_TOOLS_SNIPPETS_INSERT, ID.INSERT_SNIPPET }, { l.MENU_TOOLS_SNIPPETS_PREV_PLACE, ID.PREVIOUS_SNIPPET_PLACEHOLDER }, @@ -418,6 +424,7 @@ local m_editing = _m.textadept.editing local m_mlines = _m.textadept.mlines local m_bookmarks = _m.textadept.bookmarks local m_macros = _m.textadept.macros +local m_run = _m.textadept.run local function pm_activate(text) t.pm.entry_text = text @@ -510,6 +517,8 @@ local actions = { [ID.GOTO_LINE] = { m_editing.goto_line }, -- Tools [ID.FOCUS_COMMAND_ENTRY] = { t.command_entry.focus }, + [ID.RUN] = { m_run.go }, + [ID.COMPILE] = { m_run.compile }, -- Tools -> Snippets [ID.INSERT_SNIPPET] = { m_snippets.insert }, [ID.PREVIOUS_SNIPPET_PLACEHOLDER] = { m_snippets.prev }, diff --git a/core/locale.lua b/core/locale.lua index ae89ae18..202ff63c 100644 --- a/core/locale.lua +++ b/core/locale.lua @@ -244,6 +244,10 @@ MENU_SEARCH_GOTO_LINE = 'gtk-jump-to' MENU_TOOLS_TITLE = '_Tools' -- Focus _Command Entry MENU_TOOLS_FOCUS_COMMAND_ENTRY = 'Focus _Command Entry' +-- _Run +MENU_TOOLS_RUN = '_Run' +-- _Compile +MENU_TOOLS_COMPILE = '_Compile' -- _Snippets MENU_TOOLS_SNIPPETS_TITLE = '_Snippets' -- _Insert Snippet |