From f5c492e1f1de148af95accb85e958c3ccdffca5c Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Fri, 9 Apr 2010 18:48:30 -0400 Subject: Moved _m.textadept.run module commands to language-specific modules. --- modules/cpp/commands.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'modules/cpp') diff --git a/modules/cpp/commands.lua b/modules/cpp/commands.lua index 07ce0cac..f01561c4 100644 --- a/modules/cpp/commands.lua +++ b/modules/cpp/commands.lua @@ -6,6 +6,18 @@ local textadept = _G.textadept -- Commands for the cpp module. module('_m.cpp.commands', package.seeall) +local run = _m.textadept.run +if run then + run.compile_command.c = 'gcc -pedantic -Os -o "%(filename_noext)" %(filename)' + run.compile_command.cpp = 'g++ -pedantic -Os -o "%(filename_noext)" %(filename)' + run.run_command.c = '%(filedir)%(filename_noext)' + run.run_command.cpp = '%(filedir)%(filename_noext)' + run.error_detail.c = { + pattern = '^(.-):(%d+): (.+)$', + filename = 1, line = 2, message = 3 + } +end + -- C++-specific key commands. local keys = _G.keys if type(keys) == 'table' then -- cgit v1.2.3