From 9f18f8ab9acce36399aa34c1f11c966b792f3d2f Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 6 Aug 2007 05:05:07 -0400 Subject: Initial import of the cpp module. --- modules/cpp/commands.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 modules/cpp/commands.lua (limited to 'modules/cpp/commands.lua') 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 mitchellcaladbolg.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 -- cgit v1.2.3