aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/keys.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2012-01-05 05:20:39 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2012-01-05 05:20:39 -0500
commit2ab6deaecb4576c932dd63186927e9481bf5dedc (patch)
tree2574adf1f9c7a789456c1e467c0d98a17a4609b6 /modules/textadept/keys.lua
parent6143b96a6d71a0d8d04ed7d4ddc3696a141112c7 (diff)
downloadtextadept-2ab6deaecb4576c932dd63186927e9481bf5dedc.tar.gz
textadept-2ab6deaecb4576c932dd63186927e9481bf5dedc.zip
Rename '_m' to '_M'.
Diffstat (limited to 'modules/textadept/keys.lua')
-rw-r--r--modules/textadept/keys.lua110
1 files changed, 55 insertions, 55 deletions
diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua
index 1c2f8aaf..40954110 100644
--- a/modules/textadept/keys.lua
+++ b/modules/textadept/keys.lua
@@ -6,13 +6,13 @@ local M = {}
---
-- Defines key commands for Textadept.
-- This set of key commands is pretty standard among other text editors.
--- This module, should be 'require'ed last, but before _m.textadept.menu.
-module('_m.textadept.keys')]]
+-- This module, should be 'require'ed last, but before _M.textadept.menu.
+module('_M.textadept.keys')]]
-- Utility functions.
M.utils = {
enclose_as_xml_tags = function()
- _m.textadept.editing.enclose('<', '>')
+ _M.textadept.editing.enclose('<', '>')
local buffer = buffer
local pos = buffer.current_pos
while buffer.char_at[pos - 1] ~= 60 do pos = pos - 1 end -- '<'
@@ -22,10 +22,10 @@ M.utils = {
gui.find.in_files = true
gui.find.focus()
end,
- select_command = function() _m.textadept.menu.select_command() end,
+ select_command = function() _M.textadept.menu.select_command() end,
snapopen_filedir = function()
if buffer.filename then
- _m.textadept.snapopen.open(buffer.filename:match('^(.+)[/\\]'))
+ _M.textadept.snapopen.open(buffer.filename:match('^(.+)[/\\]'))
end
end,
show_style = function()
@@ -97,8 +97,8 @@ if not RESETTING then constantize_menu_buffer_functions() end
local keys = keys
local io, gui, gui_find, buffer, view = io, gui, gui.find, buffer, view
-local m_textadept, m_editing = _m.textadept, _m.textadept.editing
-local m_bookmarks, m_snippets = m_textadept.bookmarks, m_textadept.snippets
+local Mtextadept, Mediting = _M.textadept, _M.textadept.editing
+local Mbookmarks, Msnippets = Mtextadept.bookmarks, Mtextadept.snippets
local OSX, c = OSX, _SCINTILLA.constants
local utils = M.utils
@@ -143,8 +143,8 @@ keys[not OSX and 'cs' or 'ms'] = buffer.save
keys[not OSX and 'cS' or 'mS'] = buffer.save_as
keys[not OSX and 'cw' or 'mw'] = buffer.close
keys[not OSX and 'cW' or 'mW'] = io.close_all
--- TODO: m_textadept.sessions.prompt_load
--- TODO: m_textadept.sessions.prompt_save
+-- TODO: Mtextadept.sessions.prompt_load
+-- TODO: Mtextadept.sessions.prompt_save
keys[not OSX and 'aq' or 'mq'] = quit
-- Edit.
@@ -157,38 +157,38 @@ keys[not OSX and 'cv' or 'mv'] = buffer.paste
keys[not OSX and 'cd' or 'md'] = buffer.line_duplicate
keys.del = buffer.clear
keys[not OSX and 'ca' or 'ma'] = buffer.select_all
-keys.cm = m_editing.match_brace
-keys[not OSX and 'c\n' or 'cesc'] = { m_editing.autocomplete_word, '%w_' }
-keys[not OSX and 'adel' or 'cdel'] = { m_editing.current_word, 'delete' }
-keys[not OSX and 'caH' or 'mH'] = m_editing.highlight_word
-keys[not OSX and 'c/' or 'm/'] = m_editing.block_comment
-keys.ct = m_editing.transpose_chars
-keys[not OSX and 'cJ' or 'cj'] = m_editing.join_lines
+keys.cm = Mediting.match_brace
+keys[not OSX and 'c\n' or 'cesc'] = { Mediting.autocomplete_word, '%w_' }
+keys[not OSX and 'adel' or 'cdel'] = { Mediting.current_word, 'delete' }
+keys[not OSX and 'caH' or 'mH'] = Mediting.highlight_word
+keys[not OSX and 'c/' or 'm/'] = Mediting.block_comment
+keys.ct = Mediting.transpose_chars
+keys[not OSX and 'cJ' or 'cj'] = Mediting.join_lines
-- Select.
-keys.cM = { m_editing.match_brace, 'select' }
-keys[not OSX and 'c<' or 'm<'] = { m_editing.select_enclosed, '>', '<' }
-keys[not OSX and 'c>' or 'm>'] = { m_editing.select_enclosed, '<', '>' }
-keys[not OSX and "c'" or "m'"] = { m_editing.select_enclosed, "'", "'" }
-keys[not OSX and 'c"' or 'm"'] = { m_editing.select_enclosed, '"', '"' }
-keys[not OSX and 'c(' or 'm('] = { m_editing.select_enclosed, '(', ')' }
-keys[not OSX and 'c[' or 'm['] = { m_editing.select_enclosed, '[', ']' }
-keys[not OSX and 'c{' or 'm{'] = { m_editing.select_enclosed, '{', '}' }
-keys[not OSX and 'cD' or 'mD'] = { m_editing.current_word, 'select' }
-keys[not OSX and 'cN' or 'mN'] = m_editing.select_line
-keys[not OSX and 'cP' or 'mP'] = m_editing.select_paragraph
-keys[not OSX and 'cI' or 'mI'] = m_editing.select_indented_block
+keys.cM = { Mediting.match_brace, 'select' }
+keys[not OSX and 'c<' or 'm<'] = { Mediting.select_enclosed, '>', '<' }
+keys[not OSX and 'c>' or 'm>'] = { Mediting.select_enclosed, '<', '>' }
+keys[not OSX and "c'" or "m'"] = { Mediting.select_enclosed, "'", "'" }
+keys[not OSX and 'c"' or 'm"'] = { Mediting.select_enclosed, '"', '"' }
+keys[not OSX and 'c(' or 'm('] = { Mediting.select_enclosed, '(', ')' }
+keys[not OSX and 'c[' or 'm['] = { Mediting.select_enclosed, '[', ']' }
+keys[not OSX and 'c{' or 'm{'] = { Mediting.select_enclosed, '{', '}' }
+keys[not OSX and 'cD' or 'mD'] = { Mediting.current_word, 'select' }
+keys[not OSX and 'cN' or 'mN'] = Mediting.select_line
+keys[not OSX and 'cP' or 'mP'] = Mediting.select_paragraph
+keys[not OSX and 'cI' or 'mI'] = Mediting.select_indented_block
-- Selection.
keys[not OSX and 'cau' or 'cu'] = buffer.upper_case
keys[not OSX and 'caU' or 'cU'] = buffer.lower_case
keys[not OSX and 'a<' or 'c<'] = utils.enclose_as_xml_tags
-keys[not OSX and 'a>' or 'c>'] = { m_editing.enclose, '<', ' />' }
-keys[not OSX and "a'" or "c'"] = { m_editing.enclose, "'", "'" }
-keys[not OSX and 'a"' or 'c"'] = { m_editing.enclose, '"', '"' }
-keys[not OSX and 'a(' or 'c('] = { m_editing.enclose, '(', ')' }
-keys[not OSX and 'a[' or 'c['] = { m_editing.enclose, '[', ']' }
-keys[not OSX and 'a{' or 'c{'] = { m_editing.enclose, '{', '}' }
-keys[not OSX and 'c+' or 'm+'] = { m_editing.grow_selection, 1 }
-keys[not OSX and 'c_' or 'm_'] = { m_editing.grow_selection, -1 }
+keys[not OSX and 'a>' or 'c>'] = { Mediting.enclose, '<', ' />' }
+keys[not OSX and "a'" or "c'"] = { Mediting.enclose, "'", "'" }
+keys[not OSX and 'a"' or 'c"'] = { Mediting.enclose, '"', '"' }
+keys[not OSX and 'a(' or 'c('] = { Mediting.enclose, '(', ')' }
+keys[not OSX and 'a[' or 'c['] = { Mediting.enclose, '[', ']' }
+keys[not OSX and 'a{' or 'c{'] = { Mediting.enclose, '{', '}' }
+keys[not OSX and 'c+' or 'm+'] = { Mediting.grow_selection, 1 }
+keys[not OSX and 'c_' or 'm_'] = { Mediting.grow_selection, -1 }
keys.csup = buffer.move_selected_lines_up
keys.csdown = buffer.move_selected_lines_down
@@ -209,31 +209,31 @@ keys[not OSX and 'cF' or 'mF'] = utils.find_in_files
-- Find in Files is ai when find pane is focused.
keys[not OSX and 'cag' or 'cmg'] = { gui_find.goto_file_in_list, true }
keys[not OSX and 'caG' or 'cmG'] = { gui_find.goto_file_in_list, false }
-keys[not OSX and 'cj' or 'mj'] = m_editing.goto_line
+keys[not OSX and 'cj' or 'mj'] = Mediting.goto_line
-- Tools.
keys[not OSX and 'ce' or 'me'] = gui.command_entry.focus
keys[not OSX and 'cE' or 'mE'] = utils.select_command
-keys[not OSX and 'cr' or 'mr'] = m_textadept.run.run
-keys[not OSX and 'cR' or 'mR'] = m_textadept.run.compile
-keys[not OSX and 'c|' or 'm|'] = m_textadept.filter_through.filter_through
+keys[not OSX and 'cr' or 'mr'] = Mtextadept.run.run
+keys[not OSX and 'cR' or 'mR'] = Mtextadept.run.compile
+keys[not OSX and 'c|' or 'm|'] = Mtextadept.filter_through.filter_through
-- Adeptsense.
-keys[not OSX and 'c ' or 'aesc'] = m_textadept.adeptsense.complete_symbol
-keys.ch = m_textadept.adeptsense.show_documentation
+keys[not OSX and 'c ' or 'aesc'] = Mtextadept.adeptsense.complete_symbol
+keys.ch = Mtextadept.adeptsense.show_documentation
-- Snippets.
-keys[not OSX and 'ck' or 'a\t'] = m_snippets._select
-keys['\t'] = m_snippets._insert
-keys['s\t'] = m_snippets._previous
-keys[not OSX and 'cK' or 'as\t'] = m_snippets._cancel_current
+keys[not OSX and 'ck' or 'a\t'] = Msnippets._select
+keys['\t'] = Msnippets._insert
+keys['s\t'] = Msnippets._previous
+keys[not OSX and 'cK' or 'as\t'] = Msnippets._cancel_current
-- Bookmark.
-keys[not OSX and 'cf2' or 'mf2'] = m_bookmarks.toggle
-keys[not OSX and 'csf2' or 'msf2'] = m_bookmarks.clear
-keys.f2 = m_bookmarks.goto_next
-keys.sf2 = m_bookmarks.goto_prev
-keys.af2 = m_bookmarks.goto_bookmark
+keys[not OSX and 'cf2' or 'mf2'] = Mbookmarks.toggle
+keys[not OSX and 'csf2' or 'msf2'] = Mbookmarks.clear
+keys.f2 = Mbookmarks.goto_next
+keys.sf2 = Mbookmarks.goto_prev
+keys.af2 = Mbookmarks.goto_bookmark
-- Snapopen.
-keys[not OSX and 'cu' or 'mu'] = { m_textadept.snapopen.open, _USERHOME }
--- TODO: { m_textadept.snapopen.open, _HOME }
+keys[not OSX and 'cu' or 'mu'] = { Mtextadept.snapopen.open, _USERHOME }
+-- TODO: { Mtextadept.snapopen.open, _HOME }
keys[not OSX and 'caO' or 'cmO'] = utils.snapopen_filedir
keys[not OSX and 'ci' or 'mi'] = utils.show_style
@@ -247,7 +247,7 @@ keys[not OSX and 'cb' or 'mb'] = gui.switch_buffer
-- TODO: { utils.set_indentation, 4 }
-- TODO: { utils.set_indentation, 8 }
keys[not OSX and 'caT' or 'cT'] = { utils.toggle_property, 'use_tabs' }
-keys[not OSX and 'cai' or 'ci'] = m_editing.convert_indentation
+keys[not OSX and 'cai' or 'ci'] = Mediting.convert_indentation
-- EOL Mode.
-- TODO: { utils.set_eol_mode, c.SC_EOL_CRLF }
-- TODO: { utils.set_eol_mode, c.SC_EOL_CR }
@@ -258,7 +258,7 @@ keys[not OSX and 'cai' or 'ci'] = m_editing.convert_indentation
-- TODO: { utils.set_encoding, 'ISO-8859-1' }
-- TODO: { utils.set_encoding, 'MacRoman' }
-- TODO: { utils.set_encoding, 'UTF-16LE' }
-keys[not OSX and 'cL' or 'mL'] = m_textadept.mime_types.select_lexer
+keys[not OSX and 'cL' or 'mL'] = Mtextadept.mime_types.select_lexer
keys.f5 = { buffer.colourise, buffer, 0, -1 }
-- View.