diff options
author | 2013-08-26 22:36:10 -0400 | |
---|---|---|
committer | 2013-08-26 22:36:10 -0400 | |
commit | 92a1e1cae3029a3c4dde56c8dcc5d212fdc11e26 (patch) | |
tree | 53d4645ebc30698f4a782bc76232b0b54fe82507 /modules/textadept/menu.lua | |
parent | acda712a50dbebafa295ccd07ce8186d9b82aa10 (diff) | |
download | textadept-92a1e1cae3029a3c4dde56c8dcc5d212fdc11e26.tar.gz textadept-92a1e1cae3029a3c4dde56c8dcc5d212fdc11e26.zip |
Renamed `_M.textadept` to `textadept`; `_M` is for language modules only now.
Diffstat (limited to 'modules/textadept/menu.lua')
-rw-r--r-- | modules/textadept/menu.lua | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/modules/textadept/menu.lua b/modules/textadept/menu.lua index 3997375b..b67f8916 100644 --- a/modules/textadept/menu.lua +++ b/modules/textadept/menu.lua @@ -7,12 +7,12 @@ local M = {} --- -- Defines the menus used by Textadept. -- If applicable, load this module last in your *~/.textadept/init.lua*, after --- `_M.textadept.keys` since it looks up defined key commands to show them in +-- `textadept.keys` since it looks up defined key commands to show them in -- menus. -module('_M.textadept.menu')]] +module('textadept.menu')]] -local _L, _M, buffer, view = _L, _M, buffer, view -local m_editing, utils = _M.textadept.editing, _M.textadept.keys.utils +local _L, buffer, view = _L, buffer, view +local editing, utils = textadept.editing, textadept.keys.utils local SEPARATOR = {''} -- The default main menubar. @@ -28,8 +28,8 @@ local menubar = { {_L['_Close'], buffer.close}, {_L['Close All'], io.close_all}, SEPARATOR, - {_L['Loa_d Session...'], _M.textadept.session.load}, - {_L['Sav_e Session...'], _M.textadept.session.save}, + {_L['Loa_d Session...'], textadept.session.load}, + {_L['Sav_e Session...'], textadept.session.save}, SEPARATOR, {_L['_Quit'], quit}, }, @@ -45,38 +45,38 @@ local menubar = { {_L['D_elete Word'], utils.delete_word}, {_L['Select _All'], buffer.select_all}, SEPARATOR, - {_L['_Match Brace'], m_editing.match_brace}, - {_L['Complete _Word'], m_editing.autocomplete_word}, - {_L['_Highlight Word'], m_editing.highlight_word}, - {_L['Toggle _Block Comment'], m_editing.block_comment}, - {_L['T_ranspose Characters'], m_editing.transpose_chars}, - {_L['_Join Lines'], m_editing.join_lines}, + {_L['_Match Brace'], editing.match_brace}, + {_L['Complete _Word'], editing.autocomplete_word}, + {_L['_Highlight Word'], editing.highlight_word}, + {_L['Toggle _Block Comment'], editing.block_comment}, + {_L['T_ranspose Characters'], editing.transpose_chars}, + {_L['_Join Lines'], editing.join_lines}, {_L['_Filter Through'], {ui.command_entry.enter_mode, 'filter_through'}}, { title = _L['_Select'], - {_L['Select to _Matching Brace'], {m_editing.match_brace, 'select'}}, - {_L['Select between _XML Tags'], {m_editing.select_enclosed, '>', '<'}}, - {_L['Select in XML _Tag'], {m_editing.select_enclosed, '<', '>'}}, - {_L['Select in _Single Quotes'], {m_editing.select_enclosed, "'", "'"}}, - {_L['Select in _Double Quotes'], {m_editing.select_enclosed, '"', '"'}}, - {_L['Select in _Parentheses'], {m_editing.select_enclosed, '(', ')'}}, - {_L['Select in _Brackets'], {m_editing.select_enclosed, '[', ']'}}, - {_L['Select in B_races'], {m_editing.select_enclosed, '{', '}'}}, - {_L['Select _Word'], m_editing.select_word}, - {_L['Select _Line'], m_editing.select_line}, - {_L['Select Para_graph'], m_editing.select_paragraph}, - {_L['Select _Indented Block'], m_editing.select_indented_block}, + {_L['Select to _Matching Brace'], {editing.match_brace, 'select'}}, + {_L['Select between _XML Tags'], {editing.select_enclosed, '>', '<'}}, + {_L['Select in XML _Tag'], {editing.select_enclosed, '<', '>'}}, + {_L['Select in _Single Quotes'], {editing.select_enclosed, "'", "'"}}, + {_L['Select in _Double Quotes'], {editing.select_enclosed, '"', '"'}}, + {_L['Select in _Parentheses'], {editing.select_enclosed, '(', ')'}}, + {_L['Select in _Brackets'], {editing.select_enclosed, '[', ']'}}, + {_L['Select in B_races'], {editing.select_enclosed, '{', '}'}}, + {_L['Select _Word'], editing.select_word}, + {_L['Select _Line'], editing.select_line}, + {_L['Select Para_graph'], editing.select_paragraph}, + {_L['Select _Indented Block'], editing.select_indented_block}, }, { title = _L['Selectio_n'], {_L['_Upper Case Selection'], buffer.upper_case}, {_L['_Lower Case Selection'], buffer.lower_case}, SEPARATOR, {_L['Enclose as _XML Tags'], utils.enclose_as_xml_tags}, - {_L['Enclose as Single XML _Tag'], {m_editing.enclose, '<', ' />'}}, - {_L['Enclose in Single _Quotes'], {m_editing.enclose, "'", "'"}}, - {_L['Enclose in _Double Quotes'], {m_editing.enclose, '"', '"'}}, - {_L['Enclose in _Parentheses'], {m_editing.enclose, '(', ')'}}, - {_L['Enclose in _Brackets'], {m_editing.enclose, '[', ']'}}, - {_L['Enclose in B_races'], {m_editing.enclose, '{', '}'}}, + {_L['Enclose as Single XML _Tag'], {editing.enclose, '<', ' />'}}, + {_L['Enclose in Single _Quotes'], {editing.enclose, "'", "'"}}, + {_L['Enclose in _Double Quotes'], {editing.enclose, '"', '"'}}, + {_L['Enclose in _Parentheses'], {editing.enclose, '(', ')'}}, + {_L['Enclose in _Brackets'], {editing.enclose, '[', ']'}}, + {_L['Enclose in B_races'], {editing.enclose, '{', '}'}}, SEPARATOR, {_L['_Move Selected Lines Up'], buffer.move_selected_lines_up}, {_L['Move Selected Lines Do_wn'], buffer.move_selected_lines_down}, @@ -94,27 +94,27 @@ local menubar = { {_L['Goto Nex_t File Found'], {ui.find.goto_file_found, false, true}}, {_L['Goto Previou_s File Found'], {ui.find.goto_file_found, false, false}}, SEPARATOR, - {_L['_Jump to'], m_editing.goto_line}, + {_L['_Jump to'], editing.goto_line}, }, { title = _L['_Tools'], {_L['Command _Entry'], {ui.command_entry.enter_mode, 'lua_command'}}, {_L['Select Co_mmand'], utils.select_command}, SEPARATOR, - {_L['_Run'], _M.textadept.run.run}, - {_L['_Compile'], _M.textadept.run.compile}, - {_L['_Next Error'], {_M.textadept.run.goto_error, false, true}}, - {_L['_Previous Error'], {_M.textadept.run.goto_error, false, false}}, + {_L['_Run'], textadept.run.run}, + {_L['_Compile'], textadept.run.compile}, + {_L['_Next Error'], {textadept.run.goto_error, false, true}}, + {_L['_Previous Error'], {textadept.run.goto_error, false, false}}, SEPARATOR, { title = _L['_Adeptsense'], - {_L['_Complete Symbol'], _M.textadept.adeptsense.complete}, - {_L['Show _Documentation'], _M.textadept.adeptsense.show_apidoc}, + {_L['_Complete Symbol'], textadept.adeptsense.complete}, + {_L['Show _Documentation'], textadept.adeptsense.show_apidoc}, }, { title = _L['_Bookmark'], - {_L['_Toggle Bookmark'], _M.textadept.bookmarks.toggle}, - {_L['_Clear Bookmarks'], _M.textadept.bookmarks.clear}, - {_L['_Next Bookmark'], {_M.textadept.bookmarks.goto_mark, true}}, - {_L['_Previous Bookmark'], {_M.textadept.bookmarks.goto_mark, false}}, - {_L['_Goto Bookmark...'], _M.textadept.bookmarks.goto_mark}, + {_L['_Toggle Bookmark'], textadept.bookmarks.toggle}, + {_L['_Clear Bookmarks'], textadept.bookmarks.clear}, + {_L['_Next Bookmark'], {textadept.bookmarks.goto_mark, true}}, + {_L['_Previous Bookmark'], {textadept.bookmarks.goto_mark, false}}, + {_L['_Goto Bookmark...'], textadept.bookmarks.goto_mark}, }, { title = _L['Snap_open'], {_L['Snapopen _User Home'], {io.snapopen, _USERHOME}}, @@ -122,10 +122,10 @@ local menubar = { {_L['Snapopen _Current Directory'], utils.snapopen_filedir}, }, { title = _L['_Snippets'], - {_L['_Insert Snippet...'], _M.textadept.snippets._select}, - {_L['_Expand Snippet/Next Placeholder'], _M.textadept.snippets._insert}, - {_L['_Previous Snippet Placeholder'], _M.textadept.snippets._previous}, - {_L['_Cancel Snippet'], _M.textadept.snippets._cancel_current}, + {_L['_Insert Snippet...'], textadept.snippets._select}, + {_L['_Expand Snippet/Next Placeholder'], textadept.snippets._insert}, + {_L['_Previous Snippet Placeholder'], textadept.snippets._previous}, + {_L['_Cancel Snippet'], textadept.snippets._cancel_current}, }, SEPARATOR, {_L['Show St_yle'], utils.show_style}, @@ -142,7 +142,7 @@ local menubar = { {_L['Tab width: _8'], {utils.set_indentation, 8}}, SEPARATOR, {_L['_Toggle Use Tabs'], {utils.toggle_property, 'use_tabs'}}, - {_L['_Convert Indentation'], m_editing.convert_indentation}, + {_L['_Convert Indentation'], editing.convert_indentation}, }, { title = _L['_EOL Mode'], {_L['CRLF'], {utils.set_eol_mode, buffer.SC_EOL_CRLF}}, @@ -157,7 +157,7 @@ local menubar = { {_L['UTF-1_6 Encoding'], {utils.set_encoding, 'UTF-16LE'}}, }, SEPARATOR, - {_L['Select _Lexer...'], _M.textadept.file_types.select_lexer}, + {_L['Select _Lexer...'], textadept.file_types.select_lexer}, {_L['_Refresh Syntax Highlighting'], {buffer.colourise, buffer, 0, -1}}, }, { title = _L['_View'], |