aboutsummaryrefslogtreecommitdiff
path: root/modules/cpp/init.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2012-09-12 11:24:11 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2012-09-12 11:24:11 -0400
commit9dc8ce16a1efc6482db6f1d5456d42958e79a06c (patch)
treee26ff636143fc74f92a6a3359a73e93194da6bc3 /modules/cpp/init.lua
parent4305f32ac153b7a45a1c001da2fcd412af905168 (diff)
downloadtextadept-9dc8ce16a1efc6482db6f1d5456d42958e79a06c.tar.gz
textadept-9dc8ce16a1efc6482db6f1d5456d42958e79a06c.zip
Documentation overhaul.
Rewrote most of the manual and Lua API to complement each other. Key bindings reference moved from Appendix to modules/textadept/keys.lua LuaDoc.
Diffstat (limited to 'modules/cpp/init.lua')
-rw-r--r--modules/cpp/init.lua19
1 files changed, 10 insertions, 9 deletions
diff --git a/modules/cpp/init.lua b/modules/cpp/init.lua
index a63ad0e8..7610e6bf 100644
--- a/modules/cpp/init.lua
+++ b/modules/cpp/init.lua
@@ -6,12 +6,10 @@ local M = {}
---
-- The cpp module.
-- It provides utilities for editing C/C++ code.
--- User tags are loaded from `_USERHOME/modules/cpp/tags` and user apis are
--- loaded from `_USERHOME/modules/cpp/api`.
--
--- ## Key Commands
+-- ## Key Bindings
--
--- + `Ctrl+L, M` (`⌘L, M` on Mac OSX)
+-- + `Ctrl+L, M` (`⌘L, M` on Mac OSX | `M-L, M` in ncurses)
-- Open this module for editing.
-- + `.`
-- When to the right of a known symbol, show an autocompletion list of fields
@@ -19,10 +17,12 @@ local M = {}
-- + `->`
-- When to the right of a known symbol, show an autocompletion list of fields
-- and functions.
--- + `Shift+Return` (`⇧↩`)
--- Add ';' to line end and insert newline.
+-- + `Shift+Enter` (`⇧↩` | `S-Enter`)
+-- Add `;` to the end of the current line and insert a newline.
-- @field sense
-- The C/C++ [Adeptsense](_M.textadept.adeptsense.html).
+-- It loads user tags from `_USERHOME/modules/cpp/tags` and user apidocs from
+-- `_USERHOME/modules/cpp/api`.
module('_M.cpp')]]
local m_editing, m_run = _M.textadept.editing, _M.textadept.run
@@ -50,9 +50,10 @@ end
-- Adeptsense.
M.sense = _M.textadept.adeptsense.new('cpp')
+local as = _M.textadept.adeptsense
M.sense.ctags_kinds = {
- c = 'classes', d = 'functions', e = 'fields', f = 'functions', g = 'classes',
- m = 'fields', s = 'classes', t = 'classes'
+ c = as.CLASS, d = as.FUNCTION, e = as.FIELD, f = as.FUNCTION, g = as.CLASS,
+ m = as.FIELD, s = as.CLASS, t = as.CLASS
}
M.sense:load_ctags(_HOME..'/modules/cpp/tags', true)
M.sense.api_files = { _HOME..'/modules/cpp/api', _HOME..'/modules/cpp/lua_api' }
@@ -73,7 +74,7 @@ end
-- Commands.
---
--- Container for C/C++-specific key commands.
+-- Container for C/C++-specific key bindings.
-- @class table
-- @name _G.keys.cpp
keys.cpp = {