[TxMt] Context menu: Help me get my mind around this...

Allan Odgaard throw-away-1 at macromates.com
Mon Oct 1 11:19:01 UTC 2007


On 28/09/2007, at 20:18, pixpop wrote:

> [...]
> Task 1:  I work on a code base of about 50,000 lines of ordinary C  
> code,
> spread over about 30 files. Most of what I do is cut, paste, search,  
> make. I
> want to add some functions to the context menu. First, I want a  
> function
> that would take me to the definition [...]

Perhaps the CTags bundle will be of use to you: http://macromates.com/svn/Bundles/trunk/Bundles/CTags.tmbundle/

For install instructions see http://macromates.com/textmate/manual/bundles#getting_more_bundles

> Task 2: I want to add an item to the context menu that will do the
> following: save any dirty files, then run the makefile of the  
> project. If
> there are any errors, take me to the place in the source file that  
> contains
> the first error.

There is a Makefile bundle, it does this, but it is *very* rudimentary  
(I wrote the build command, but I rarely ever work with Makefiles, so  
I didn’t spend much time prettying up the output).

See above for how to get it.

> This would be something like the Command-B, but as a context menu  
> item.

You can’t add stuff to the context menu, but it is on ⌘B, though  
only for Makefiles. If you go to the build command you can change the  
scope selector to be more broad (i.e. be all your C files by  
specifying source.c).




More information about the textmate mailing list