aboutsummaryrefslogtreecommitdiff
path: root/modules/cpp/commands.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2007-08-06 05:05:07 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2007-08-06 05:05:07 -0400
commit9f18f8ab9acce36399aa34c1f11c966b792f3d2f (patch)
tree634db329c4d1dac1549c516557a22b6c2002e133 /modules/cpp/commands.lua
parent1bf5960dfe20d6750c5d45f738f85aba323762cd (diff)
downloadtextadept-9f18f8ab9acce36399aa34c1f11c966b792f3d2f.tar.gz
textadept-9f18f8ab9acce36399aa34c1f11c966b792f3d2f.zip
Initial import of the cpp module.
Diffstat (limited to 'modules/cpp/commands.lua')
-rw-r--r--modules/cpp/commands.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/modules/cpp/commands.lua b/modules/cpp/commands.lua
new file mode 100644
index 00000000..25fa3584
--- /dev/null
+++ b/modules/cpp/commands.lua
@@ -0,0 +1,28 @@
+-- Copyright 2007 Mitchell mitchell<att>caladbolg.net. See LICENSE.
+
+---
+-- Commands for the cpp module.
+module('modules.cpp.commands', package.seeall)
+
+-- C++-specific key commands.
+local keys = _G.keys
+if type(keys) == 'table' then
+ local m_editing = modules.textadept.editing
+ local m_handlers = textadept.handlers
+ keys.cpp = {
+ al = { textadept.io.open, _HOME..'/modules/cpp/init.lua' },
+ ['s\n'] = { function()
+ buffer:line_end()
+ buffer:add_text(';')
+ buffer:new_line()
+ end },
+ cq = { m_editing.block_comment, '//~' },
+ ['('] = { function()
+--~ buffer.word_chars =
+--~ '_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+ m_editing.show_call_tip(modules.cpp.api, true)
+--~ buffer:set_chars_default()
+ return false
+ end },
+ }
+end