[TxMt] snippet with inline menu for inserting C/Obj-J/Obj-C header files

Hans-Jörg Bibiko bibiko at eva.mpg.de
Fri Sep 26 14:34:48 UTC 2008


Hi. Maybe someone can tell me whether this is interesting.

While preparing the Objective-J bundle I found an useful way to write  
a snippet for inserting 'import "foo.j"' or for Objective-C '#import  
"foo.h"' which looks for all header files in the project or at the  
current path and down and shows up them as a inline menu list with  
relative paths to the current file. The TAB trigger is e.g. impp.

A demo movie can be found here: http://www.bibiko.de/TM_importAsFileList.mov 
  .

The snippet looks like

import "${1:`"$TM_BUNDLE_SUPPORT/bin/import_FileMenu.sh" ".j"`}"
#import "${1:`"$TM_BUNDLE_SUPPORT/bin/import_FileMenu.sh" ".h"`}"


To use it system-widely one could save it in SUPPORT_PATH/lib. Any  
comment??

--Hans



More information about the textmate mailing list