Hi Mats,
I have already got skEdit and really like its implementation of the file chooser thing I was proposing, its pretty much what I was trying to emulate in TM ;). However I have to agree that although it is a very good editor it can't match TM's flexibility, and I thought Texmate could offer the best of both.
I have put together a command that outputs filenames matching the first few letters but need a way of selecting options when there are multiple results. We'll have to wait for commands to output to a contextual menu to fully realise some of the potential of these ideas, but when it is supported I think there will be a lot of great tools available to us.
Max
OK, not wishing to detract, offend or anything else here other than being helpfull. Max, you can find a really nice implementation of this type of functionality is in skEdit when dealing with <img> or <a> tags. skEdit is $20 and beats both DW & BBEdit, but struggles a bit to compare with TM in some areas :)
On Feb 20, 2005, at 20:09, max@machinate.org wrote:
I have put together a command that outputs filenames matching the first few letters but need a way of selecting options when there are multiple results. We'll have to wait for commands to output to a contextual menu to fully realise some of the potential of these ideas, but when it is supported I think there will be a lot of great tools available to us.
Until I provide better support for this, you may want to use the 'choose from list' apple script command.
For example here is a script that finds all files starting with $TM_CURRENT_WORD (in current directory), shows an AS dialog from where you can choose, and inserts the choice (removing the common prefix).
Input: none Output: insert as snippet
FILES=`find . -name "${TM_CURRENT_WORD}*" -type f -maxdepth 1 -exec basename '{}' ;|perl -pe 's/(.*)\n/"$1",/'|perl -pe 's/,$//g'`
osascript -e 'tell app "Finder" to activate' res=`osascript -e "tell app "Finder" to choose from list { $FILES }"` osascript -e 'tell app "TextMate" to activate' &>/dev/null &
echo -n ${res:${#TM_CURRENT_WORD}}