aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/cpp/commands.lua8
-rw-r--r--modules/lua/commands.lua16
2 files changed, 15 insertions, 9 deletions
diff --git a/modules/cpp/commands.lua b/modules/cpp/commands.lua
index fef5255f..4385e001 100644
--- a/modules/cpp/commands.lua
+++ b/modules/cpp/commands.lua
@@ -7,7 +7,11 @@ module('_m.cpp.commands', package.seeall)
-- Markdown:
-- ## Key Commands
--
--- + `Alt+l, m`: Open this module for editing.
+-- + `Alt+L, M`: Open this module for editing.
+-- + `Ctrl+I`: (Windows and Linux) Autocomplete symbol.
+-- + `~`: (Mac OSX) Autocomplete symbol.
+-- + `Tab`: When the caret is to the right of a `(` in a known function call,
+-- show a calltip with documentation for the function.
-- + `Shift+Return`: Add ';' to line end and insert newline.
local m_editing, m_run = _m.textadept.editing, _m.textadept.run
@@ -39,7 +43,7 @@ if type(keys) == 'table' then
buffer:add_text(';')
buffer:new_line()
end },
- [not OSX and 'c\n' or 'esc'] = { cppsense.complete, cppsense },
+ [not OSX and 'ci' or '~'] = { cppsense.complete, cppsense },
['\t'] = { function()
if string.char(buffer.char_at[buffer.current_pos - 1]) ~= '(' then
return false
diff --git a/modules/lua/commands.lua b/modules/lua/commands.lua
index a1eccac6..b2423a51 100644
--- a/modules/lua/commands.lua
+++ b/modules/lua/commands.lua
@@ -7,14 +7,16 @@ module('_m.lua.commands', package.seeall)
-- Markdown:
-- ## Key Commands
--
--- + `Alt+l, m`: Open this module for editing.
--- + `Alt+l, g`: Goto file being 'require'd on the current line.
+-- + `Alt+L, M`: Open this module for editing.
+-- + `Alt+L, G`: Goto file being 'require'd on the current line.
-- + `Shift+Return`: Try to autocomplete an `if`, `for`, etc. statement with
-- `end`.
--- + `.`: When to the right of a known identifier, show an autocompletion list
--- of fields.
--- + `:`: When to the right of a known identifier, show an autocompletion list
--- of functions.
+-- + `.`: When to the right of a known symbol, show an autocompletion list of
+-- fields and functions.
+-- + `:`: When to the right of a known symbol, show an autocompletion list of
+-- functions only.
+-- + `Ctrl+I`: (Windows and Linux) Autocomplete symbol.
+-- + `~`: (Mac OSX) Autocomplete symbol.
-- + `Tab`: When the caret is to the right of a `(` in a known function call,
-- show a calltip with documentation for the function.
@@ -118,7 +120,7 @@ if type(keys) == 'table' then
g = { goto_required },
},
['s\n'] = { try_to_autocomplete_end },
- [not OSX and 'c\n' or 'esc'] = { function()
+ [not OSX and 'ci' or '~'] = { function()
local line, pos = buffer:get_cur_line()
local symbol = line:sub(1, pos):match(luasense.syntax.symbol_chars..'*$')
return luasense:complete(false, symbol:find(':'))