In the MacBreak video podcast (#96) for 12/12/2007, Leo features his
fav text editors & overwhelming votes for textmate while giving an
idea of its capabilities as well as history.........
As someone that did his entire PhD (writing - in latex, running R,
Sweave, stata etc..) all within textmate I would be remiss not to
thank all those that are continuously developing textmate & the
supporting bundles - Alan, Charilaos, Hadley, Brett, Kevin, Allan
Schussman, just to mention but a few of many people whose bundles
have been helpful....
I am now getting into experimenting with new experimental bundles
- eg Hans R daemon which seem as if they will be making me even more
productive during 2008..
Thanks to y'all that are behind textmate & all its associated
bundles.... & best during 2008!
danstan
Are there any bundles available to ease writing JSDoc comments for javascript?
Aptana has a really nice feature that looks for /** and completes the
rest of the comment for you, leaving you to just fill in the
descriptions of the function and it's parameters.
> From: Alex Ross <alex.j.ross(a)gmail.com>
> Date: December 19, 2007 8:08:51 PM EST
> To: TextMate users <textmate(a)lists.macromates.com>
> Subject: Re: [TxMt] Python Import
> Reply-To: TextMate users <textmate(a)lists.macromates.com>
>
> Tony,
>
> Have you made any modifications to your PYTHONPATH?
Hey Alex,
Thanks for your quick reply. I have added a couple of folders to the
PYTHONPATH in my `.profile` configuration file in my home directory.
PYTHONPATH=/Users/Tony/python:/Users/Tony/python/nodebox/src
It turns out that if I comment out the nodebox source path from the
above statement, `import objc` works fine. Unfortunately, the reason I
wanted to import the objc module was because nodebox requires it (and
requires the source tree be on the PYTHONPATH). Does any one know why
things would work fine from a Terminal, but not Textmate.
BTW, sys.path gives the same output in Textmate and the Terminal
window, except that Textmate appends the Textmate path and the
Desktop, while Terminal appends the present working directory.
Thanks,
-Tony
I learned a few days ago (see http://xrl.us/bcuzs) that a drag
command with a file type of "vcf" will work on cards dragged out of
the Address Book as well as vcf files dragged from the Finder. (A
temporary vcf file is made as you drag the card.) I thought it would
be nice to have a formatted name and address appear in the TM window
instead of the default vCard-formatted info. I had an AppleScript I'd
written a while ago that I adapted for this purpose and called it
from the drag command using 'osascript'.
The drag command works, but it takes 20-30 seconds to run when
operating on a card dragged from the Address Book. This isn't because
the AppleScript itself is slow--it runs almost instantly when
operating on a vCard file dragged from the Finder.
In the interests of space, here's a simpler AppleScript that exhibits
the same difference in runtime:
on run argv
tell application "Address Book"
set theCard to (person id (item 1 of argv))
set out to name of theCard
end tell
return out
end run
I've called it "abname.scpt" and saved it in my ~/bin directory.
(I've also saved it as an application and as text. The results are
the same.)
Here's the drag command:
if [[ $TM_MODIFIER_FLAGS = "OPTION" ]]; then
uid=`cat "$TM_DROPPED_FILE" |\
awk -F: '/^X\-ABUID/\
{printf "%s:ABPerson", substr($2,1,length($2)-1)}'`
osascript $HOME/bin/abname.scpt "$uid"
else
cat "$TM_DROPPED_FILE"
fi
This is set up so that when I hold the Option key down as I drag, the
name of the card is inserted in the TM window. If I *don't* hold the
Option key down, the usual vCard data is inserted. The behavior on my
main computer--an Intel iMac running OS X 10.4.11 with TM 1.5.7
(1436)--is like this:
Dragging from Option key Time to run
----------------------------------------------------
file in Finder not pressed instant
file in Finder pressed instant
card from AB not pressed instant
card from AB pressed 20+ seconds
I'd like to know why there's such a difference and what I can do, if
anything, to speed things up.
--
Dr. Drang
Hi Haris,
thanks for the quick reply.
> > Doing kpsewhich -show-path=bib returns
> >
> >> /Users/kjhealy/Documents/bibs:.:/Users/kjhealy/Library/texmf/
> >> [etc]
> >
>
> Is this what is also returned if your type in TM: kpsewhich -show-
> path=bib
> followed by pressing ctrl-R?
Yes.
> So what you would want to do is set TM_LATEX_BIB in TextMate's
> preferences as well (TextMate -> Preferences -> Advanced -> Shell
> Variables.
Yes, this is set too, as the full path, /Users/kjhealy/Documents/bibs.
The problem is now a little weirder. I have this issue on two Leopard
machines. One is a G5 desktop and one is a recent Macbook Pro.
I thought the problem might have to do with the symlinks I was using
to point to ~/Documents/bibs. So I deleted the symlinks and moved all
the bib files to ~/Library/texmf/bibtex/bib. So there's no ~/Documents/
bibs anymore, and no symlinks to it. I changed TM_LATEX_BIB in
TextMate to reflect this (and changed BIBINPUTS in bash_profile, too).
Now kpsewhich -show-path=bib inside TM gives
kpsewhich -show-path=bib/Users/kjhealy/Library/texmf/bibtex/bib:.:/
Users/kjhealy/Library/texmf/bibtex/bib//:!!/usr/local/gwTeX/
texmf.local/bibtex/bib//:!!/usr/local/gwTeX/texmf.pkgs/bibtex/bib//:!!/
usr/local/gwTeX/texmf.gwtex/bibtex/bib//:!!/usr/local/gwTeX/
texmf.texlive/bibtex/bib//:!!/usr/local/gwTeX/texmf/bibtex/bib//:/
Users/kjhealy/Library/texmf/bibtex///:!!/usr/local/gwTeX/texmf.local/
bibtex///:!!/usr/local/gwTeX/texmf.pkgs/bibtex///:!!/usr/local/gwTeX/
texmf.gwtex/bibtex///:!!/usr/local/gwTeX/texmf.texlive/bibtex///:!!/
usr/local/gwTeX/texmf/bibtex///
Again, latex/bibtex compile fine. via latexmk. Now when I try to
complete a citation from a word, I get the following error:
/Users/kjhealy/Library/Application Support/TextMate/Bundles/
Latex.tmbundle/Support/lib/LaTeXUtils.rb:114:in `read': Is a directory
- /Users/kjhealy/Library/texmf/bibtex/bib (Errno::EISDIR)
from /Users/kjhealy/Library/Application Support/TextMate/Bundles/
Latex.tmbundle/Support/lib/LaTeXUtils.rb:114:in `parse_bibfile'
from /Users/kjhealy/Library/Application Support/TextMate/Bundles/
Latex.tmbundle/Support/lib/LaTeXUtils.rb:252:in `cite_scan'
from /Users/kjhealy/Library/Application Support/TextMate/ Bundles/
Latex.tmbundle/Support/lib/LaTeXUtils.rb:248:in `each'
from /Users/kjhealy/Library/Application Support/TextMate/Bundles/
Latex.tmbundle/Support/lib/LaTeXUtils.rb:248:in `cite_scan'
from /Users/kjhealy/Library/Application Support/TextMate/Bundles/
Latex.tmbundle/Support/lib/LaTeXUtils.rb:216:in `call'
from /Users/kjhealy/Library/Application Support/TextMate/Bundles/
Latex.tmbundle/Support/lib/LaTeXUtils.rb:216:in `recursive_scan'
from /Users/kjhealy/Library/Application Support/TextMate/Bundles/
Latex.tmbundle/Support/lib/LaTeXUtils.rb:215:in `each'
from /Users/kjhealy/Library/Application Support/TextMate/Bundles/
Latex.tmbundle/Support/lib/LaTeXUtils.rb:215:in `recursive_scan'
... 7 levels...
from /Users/kjhealy/Library/Application Support/TextMate/Bundles/
Latex.tmbundle/Support/lib/LaTeXUtils.rb:204:in `recursive_scan'
from /Users/kjhealy/Library/Application Support/TextMate/Bundles/
Latex.tmbundle/Support/lib/LaTeXUtils.rb:255:in `cite_scan'
from /Users/kjhealy/Library/Application Support/TextMate/Bundles/
Latex.tmbundle/Support/lib/LaTeXUtils.rb:63:in `get_citations'
from /tmp/temp_textmate.fLdPNM:8
I get this error with different documents and different bibfiles. If I
uncheck the TM_LATEX_BIB variable in TM preferences and try to cite
something, the cursor changes to a cross and nothing else happens.
Kieran
I'm not going to call this solved, but I at least have a working
solution -- and analysis (follows). Here's my weak (very weak) unix-fu
understanding of the problem. The Preview function of the MMD bundle
has three simple lines:
> cd "${TM_MULTIMARKDOWN_PATH:-~/Library/Application Support/
MultiMarkdown}"
> cd bin
> ./multimarkdown2XHTML.pl
After upgrading to Leopard, I was getting the following error report:
> /bin/bash: line 2: cd: ~/Library/Application Support/MultiMarkdown:
No such file or directory
> /bin/bash: line 3: cd: bin: No such file or directory
> /bin/bash: line 4: ./multimarkdown2XHTML.pl: No such file or
directory
Because my unix-fu is so very, very (very) weak, it took me the
longest time to realize that the Bash shell wasn't seeing the
directory. I tested it by running
> cd "~/Library/Application Support/MultiMarkdown"
No such file or directory
I tried changing it to the more usual:
cd ~/Library/Application\ Support/MultiMarkdown
Presto! It worked. I changed the first line in the MMD Preview to the
above and Preview now works like it used to.
Now you can all stop chuckling at how slow I am, but my question is:
has anyone else encountered this problem? Surely I'm not the only MMD
adherent who has upgraded to Leopard? (I'm hoping the problem wasn't
me being goofy, but it could be.)
Any corrections to my analysis are welcome and will be regarded as
contributing to my education.
Please, no rulers on the knuckles. It's the holidays and all.
john
Greetings tm users...
In the 2nd obj-c screencast:
<http://macromates.com/screencast/objective_c_part_2.mov>
Shortly into this demo (in the first 20%) ... just after the insertion
of the delegate method "outlineView", Allan begins to introduce a
reformatting command (a bundle command?). After he shows what the
command is based on -- a command in the menu "Text->Reformat
Paragraph" used to reformat comments -- he moves the cursor to the
bottom of the window and presses on a UI element that looks like a
gear. This brings up a long list of bundle commands with their
associated icons (C, S, M, etc). When I press this UI element, I get a
popup menu of only a few items:
Help
Documentation for Selection
---
Language Boiler Plate ->
Accessor Methods For ->
Common Object Calls ->
Object Instantiations ->
Idioms ->
---
and about 6 more items.
Perhaps there was a change in Textmate or I am missing something in the GUI?
How do I see the pop up menu as shown in the screencast?
Thank you!
AZ
On Dec 20, 2007, at 06:00 , textmate-request(a)lists.macromates.com wrote:
>>
>> So I finally upgraded to Leopard, but somehow my Multimarkdown
>> bundle got borked? I went to preview a document in XHTML and got
>> this:
>>
>> /bin/bash: line 2: cd: ~/Library/Application Support/MultiMarkdown: =
>
>> No such file or directory
>> /bin/bash: line 3: cd: bin: No such file or directory
>> /bin/bash: line 4: ./multimarkdown2XHTML.pl: No such file or
>> directory
>>
>> I remembered having some difficulties with this a while ago, but I
>> couldn't remember what I had done to straighten it out. I went to
>> the bundle's help file, thinking it might jog my memory, but it too =
>
>> is coming up with a similar error report. Is this a problem a re-
>> install will solve?
>
> I assume this is Fletcher=92s own MultiMarkdown bundle and not our
> default MultiMarkdown support.
>
> It sounds a little bit like an unquoted shell variable. It might be
> good to fetch his latest bundle and see if that still has the
> problem, =
>
> if it does, paste the source of the command in question.
Hmm. I downloaded the current versions of the TM bundle AND the
separate Multimarkdown folder that gets placed in the Application
Support folder AND I went ahead and created a TM_MULTIMARKDOWN_PATH
shell variable in my preferences that points to
~/Library/Application Support/MultiMarkdown (Can I leave the space in
like that?)
And I'm still seeing the same three lines of reported errors when I do
a Preview and use the Multimarkdown option of export to XHTML.
The preview from within the Markdown bundle works fine, but, of
course, it doesn't support things like external style sheets like
Fletcher's MMD bundle does.
I cannot run Preview using MultiMarkdown under Leopard
I get the following error.
/bin/bash: line 2: cd: ~/Library/Application\ Support/MultiMarkdown:
No such file or directory
/bin/bash: line 3: cd: bin: No such file or directory
/bin/bash: line 5: ./multimarkdown2XHTML.pl: No such file or directory
The command is
# Process the MultiMarkdowndocument and display as a web page
cd "${TM_MULTIMARKDOWN_PATH:-~/Library/Application Support/
MultiMarkdown}"
cd bin
./multimarkdown2XHTML.pl
Alan
Hi,
TextMate's LaTeX bundle can't find my bib files when using the
citation completion commands. It returns the error, "Can't find any
files named 'bibname'", where bibname is the name of my bib file. The
bib files are in a local directory, ~/Documents/bibs. There is a
symbolic link to this directory in ~/Library/texmf/bibtex/bib. Doing
kpsewhich -show-path=bib returns
> /Users/kjhealy/Documents/bibs:.:/Users/kjhealy/Library/texmf/bibtex/
> bib//:!!/usr/local/gwTeX/texmf.local/bibtex/bib//:!!/usr/local/gwTeX/
> texmf.pkgs/bibtex/bib//:!!/usr/local/gwTeX/texmf.gwtex/bibtex/
> bib//:!!/usr/local/gwTeX/texmf.texlive/bibtex/bib//:!!/usr/local/
> gwTeX/texmf/bibtex/bib//:/Users/kjhealy/Library/texmf/bibtex///:!!/
> usr/local/gwTeX/texmf.local/bibtex///:!!/usr/local/gwTeX/texmf.pkgs/
> bibtex///:!!/usr/local/gwTeX/texmf.gwtex/bibtex///:!!/usr/local/
> gwTeX/texmf.texlive/bibtex///:!!/usr/local/gwTeX/texmf/bibtex///
TM_LATEX_BIB is set to /Users/kjhealy/Documents/bibs. Latex documents
will compile happily (using latexmk.pl) within TextMate, including
their bibliographies. It's just the citation completion within
documents that isn't working. My Latex bundle and Support folder are
at revision 8696. I'm running Leopard (10.5.1) and TextMate 1.5.7
(1436).
Any hints on why this isn't working as it should?
Kieran