Re: How to implement custom compile/run commands?

From: phayz <russelldicken....at.gmail.com>
Date: Mon, 10 May 2010 15:20:25 -0700 (PDT)

On May 11, 2:36 am, mitchell <mforal.n....at.gmail.com> wrote:
> Hi Russell,
>
> On May 10, 1:30 am, phayz <russelldicken....at.gmail.com> wrote:
>
>
>
> > I have searched and browsed this group and Textadept's documentation
> > but I am still not sure how I implement language-specific compile/run
> > commands.
>
> > I browsed textadept\modules\textadept\run.lua and in that file found
> > the text -
> > "-- Module for running/executing source files.
> > -- Typically, language-specific modules populate the
> > 'compile_command',
> > -- 'run_command', and 'error_detail' tables for a particular
> > language's file
> > -- extension."
>
> > With that information I then browsed and opened the file textadept
> > \modules\cpp\commands.lua and in that file found the text -
> > "-- Commands for the cpp module.
> > module('_m.cpp.commands', package.seeall)"
>
> > The lines immediately following this text configured the 'run' and
> > 'compile' commands for this file type.
>
> > Although I don't fully understand the patterns used, I get the gist of
> > these files.
>
> > If I want to implement, for example, hypertext-specific 'run' and
> > 'compile' commands, would I create a textadept\modules\hypertext
> > \commands.lua file and in it, detail the appropriate commands?
>
> > If my understanding of how file type-specific 'run' and 'compile'
> > commands is incorrect, as usual I am open to constructive criticism.
>
> -- modules/hypertext/commands.lua
>
> local m_run = _m.textadept.run
>
> m_run.compile_command.hypertext = "tidy %(filename)"
> m_run.run_command.hypertext = "firefox file://%(filename)"
>
> Maybe I am misunderstanding your question.
>
> Mitchell
>
>
>
> > Regards,
>
> > Russell Dickenson

Mitchell,

You understand my question perfectly! :) In reply to your answer, I
don't have a modules/hypertext/commands.lua module. Is this part of a
commit made after 2.2 beta 2 was released? I am currently running 2.2
beta 2 under Windows.

Regards,

Russell Dickenson

-- 
You received this message because you are subscribed to the Google Groups "textadept" group.
To post to this group, send email to textadept.at.googlegroups.com.
To unsubscribe from this group, send email to textadept+unsubscribe.at.googlegroups.com.
For more options, visit this group at http://groups.google.com/group/textadept?hl=en.
Received on Mon 10 May 2010 - 18:20:25 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:45:22 EST