aboutsummaryrefslogtreecommitdiff
path: root/modules/lua/commands.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2011-02-26 12:07:49 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2011-02-26 12:07:49 -0500
commit89f7d7c37c97d316305e380f944f2e77019578ce (patch)
tree9fdf01f8637421fc25f1f36df9efec8d42bdf2f9 /modules/lua/commands.lua
parent04d5d496565d97b2860d318a68c200fb097c30b7 (diff)
downloadtextadept-89f7d7c37c97d316305e380f944f2e77019578ce.tar.gz
textadept-89f7d7c37c97d316305e380f944f2e77019578ce.zip
Use Ctrl+H for showing apidoc in cpp and lua modules.
Diffstat (limited to 'modules/lua/commands.lua')
-rw-r--r--modules/lua/commands.lua17
1 files changed, 4 insertions, 13 deletions
diff --git a/modules/lua/commands.lua b/modules/lua/commands.lua
index fb12461b..06e1944c 100644
--- a/modules/lua/commands.lua
+++ b/modules/lua/commands.lua
@@ -17,8 +17,8 @@ module('_m.lua.commands', package.seeall)
-- 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.
+-- + `Ctrl+H`: Show documentation for the selected symbol or the symbol under
+-- the caret.
local m_editing, m_run = _m.textadept.editing, _m.textadept.run
-- Comment string tables use lexer names.
@@ -118,16 +118,7 @@ if type(keys) == 'table' then
g = { goto_required },
},
['s\n'] = { try_to_autocomplete_end },
- [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(':'))
- end },
- ['\t'] = { function()
- if string.char(buffer.char_at[buffer.current_pos - 1]) ~= '(' then
- return false
- end
- return luasense:show_apidoc()
- end },
+ [not OSX and 'ci' or '~'] = { luasense.complete, luasense },
+ ch = { luasense.show_apidoc, luasense },
}
end