diff options
Diffstat (limited to 'modules/cpp/commands.lua')
-rw-r--r-- | modules/cpp/commands.lua | 28 |
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 |