Greetings folks, recent $'er for this great editor. Longtime vi user, but always wishing for a highly configurable editor that was more os x-integrated.
Couple questions/suggestions:
Any way to make a Command which can work with the $TM_FILEPATH variable -- except with a .pdf extension? This is good really only for opening the .pdf file in e.g. TeXniscope for the first time. …or another method?
Also -- after running a little pdflatex Command on a file, I'm finding that there's no really optimal output method. I'm often working on a 12", so a full window devoted to the results (which I generally only need to see if there's an error) is a little bulky, especially as the focus moves to the said new window. The tooltip output looks promising (it disappears at the touch of a key), but it seems to appear with the top left corner at the cursor -- which often leaves the bulk of the window off the screen.
Thanks, thanks, thanks for TextMate! David
On Dec 2, 2004, at 21:18, David Wooten wrote:
Any way to make a Command which can work with the $TM_FILEPATH variable -- except with a .pdf extension? This is good really only for opening the .pdf file in e.g. TeXniscope for the first time. …or another method?
If you know the extension of the existing file, e.g. .tex, you can use bash's ability to substitute strings, e.g.: open "${TM_FILEPATH/%.tex/.pdf}"
This replaces a potential trailing '.tex' string with '.pdf' before inserting the value of the variable.
Otherwise you can do general substitutions with shell command interpolation and e.g. perl: open "`echo $TM_FILEPATH|perl -pe 's/.[^.]+$/.pdf/'`"
[tooltip] seems to appear with the top left corner at the cursor -- which often leaves the bulk of the window off the screen.
I'll try to improve this. Also, I could make it so that the window only opens if there is output, but then there probably need to be some other feedback to when the command completes -- personally I like audio feedback ;) but this can already be made w/o me having to do any work. Another alternative is to allow commands to change the text in the status bar.
On Dec 2, 2004, at 1:53 PM, Allan Odgaard wrote:
On Dec 2, 2004, at 21:18, David Wooten wrote:
Any way to make a Command which can work with the $TM_FILEPATH variable -- except with a .pdf extension? This is good really only for opening the .pdf file in e.g. TeXniscope for the first time. …or another method?
If you know the extension of the existing file, e.g. .tex, you can use bash's ability to substitute strings, e.g.: open "${TM_FILEPATH/%.tex/.pdf}"
This replaces a potential trailing '.tex' string with '.pdf' before inserting the value of the variable.
Otherwise you can do general substitutions with shell command interpolation and e.g. perl: open "`echo $TM_FILEPATH|perl -pe 's/.[^.]+$/.pdf/'`"
Ah, that's excellent. The first one should do the trick exactly.
[tooltip] seems to appear with the top left corner at the cursor -- which often leaves the bulk of the window off the screen.
I'll try to improve this. Also, I could make it so that the window only opens if there is output, but then there probably need to be some other feedback to when the command completes -- personally I like audio feedback ;) but this can already be made w/o me having to do any work. Another alternative is to allow commands to change the text in the status bar.
It's a little tricky in the case of TeX, as there is output regardless of whether there is an error or not. It would be great (and probably not that tough) to simply not focus the result window -- which could be pulled forward in case of errors.
Thanks again, DW
On Dec 2, 2004, at 23:05, David Wooten wrote:
It's a little tricky in the case of TeX, as there is output regardless of whether there is an error or not. It would be great (and probably not that tough) to simply not focus the result window -- which could be pulled forward in case of errors.
Not giving it focus means it cannot be closed from the keyboard or the "errors reported" can't be followed using the keyboard either (at least not without cycling through the windows).
On Dec 3, 2004, at 5:08 PM, Allan Odgaard wrote:
On Dec 2, 2004, at 23:05, David Wooten wrote:
It's a little tricky in the case of TeX, as there is output regardless of whether there is an error or not. It would be great (and probably not that tough) to simply not focus the result window -- which could be pulled forward in case of errors.
Not giving it focus means it cannot be closed from the keyboard or the "errors reported" can't be followed using the keyboard either (at least not without cycling through the windows).
Right, that's the idea ;) …At least in my usage of LaTeX, I quite regularly run it through the paces so as to always have a very current view of the actual document. This is probably not particularly efficient, but it's awfully nice. That being the case, however, I get a new "results window" each time, which I have to get rid of in one of the standard ways, rather than cycling to it only in the odd case that there is an error.
Perhaps one solution would be to simply add one more "Standand output" choice -- a normal window that is not focussed.