I've extended css code-folding to include groups (ala cssedit) by tweaking
the css language file
foldingStartMarker =
'/\*\*(?!\*)|\{\s*($|/\*(?!.*?\*/.*\S))|\/\*\s*(a)group\s*.*\s*\*\/';
foldingStopMarker = '(?<!\*)\*\*/|^\s*\}|\/*\s*@end\s*\*\/';
(I didn't write these regex, but I found them here
http://css-tricks.com/forums/viewtopic.php?f=8&t=2783 )
Works brilliantly, but my question is how to extend the css code folding
from within other types of files (like HTML, PHP etc.) Doing a bunch of
one-off pages and it would help greatly.
TIA
saul
Thanks all for the help and comments about the Latex bundle. Sorry if it has gone off topic, but as you can see, I have no way to figure out what is the responsibility of TextMate, of the LaTeX bundle and what has to be handled by something else again e.g. MacTex or TexLive Utility.
I have downloaded and installed MacTex and now when I run the command latex I get "This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009)". Says to me that MacTex is also known as pdfTeX and also known as TeX Live 2009. Three different names gets pretty confusing. I also downloaded and installed TexLive Utility which gave me some encouraging feedback and then failed miserably
"2010-03-23 18:11:18 +0000 Notice -[TLMAppController checkVersionConsistency][51322] Looks like you're using TeX Live 2009…good!
2010-03-23 18:11:18 +0000 Notice -[TLMAppController checkVersionConsistency][51322] *** WARNING *** Potential version mismatch between tlmgr and mirror URL http://mirror.ctan.org/systems/texlive/tlnet/2008
2010-03-23 18:11:21 +0000 Notice -[TLMOperation main][51322] termination status of task /usr/texbin/tlmgr was 2
2010-03-23 18:11:21 +0000 Notice -[TLMOperation main][51322] Standard error from `/usr/texbin/tlmgr --machine-readable --location http://mirror.ctan.org/systems/texlive/tlnet/2008 update --list`
tlmgr: package repository ftp://ftp.tex.ac.uk/tex-archive/systems/texlive/tlnet/2008
unusable location ftp://ftp.tex.ac.uk/tex-archive/systems/texlive/tlnet/2008/tlpkg/texlive.tlpdb, could not load any packages
Cannot load TeX Live database from ftp://ftp.tex.ac.uk/tex-archive/systems/texlive/tlnet/2008 at /usr/texbin/tlmgr line 3919."
So I am part of the way there and now lost in another quagmire I have no idea how to fix. I appreciate this is off topic and I have to go find a list that specialises in TeX to sort this and hope they are gentle with me and don't keep pointing me to the command line :D
Lucy
I've been using the LaTeX bundle successfully with TextMate. But I have come unstuck when I want to install a new font, for example Garamond.
From http://www.ctan.org/tex-archive/fonts/mathdesign/ I see I must;
(1) Install a package called mathdesign
(2) unzip the file mdugm.zip into the root directory of my texmf tree
My questions to the list are
(1) How do I download and install a package with TextMate / the bundle / using the terminal ?
(2) where do I find the textmf directory in SnowLeopard ?
Thanks
Lucy .
I wrote a program in C++ which does some long calculations. For information
purpose it has a "cout" function which tels me about a progress of
evaluation.
I'm used to compile my program via TM with my own boundle-command script
which looks like that:
------------------------------------------------------------
echo "<html><body><pre>"
make | pre
find_name="grep 'NAME=' ./makefile | cut -c 6- "
cmd= `eval $find_name | awk '{print "./"$0}'`
$cmd
echo "</pre></body></html>"
------------------------------------------------------------
My problem is that the standard output (text that "cout" presents) is shown
at once after program is finished (but non during program is running) so I
don't see progress of calculation.
Is there a way for presenting standard output in these case (in real-time)?
--
View this message in context: http://old.nabble.com/Problem-with-real-time-presenting-standard-output-%28…
Sent from the textmate users mailing list archive at Nabble.com.
Hi,
I'm referring to the reflow comment command in this screencast:
http://blog.macromates.com/2006/customization-screencast/
I have TextMate set to wrap at 72 characters, and currently the command
is not reflowing this text correctly:
/*
* This constructor takes a pointer to a void function that should
* define a set a of transformations to move this cube to its starting
* point in the 3D coordinate system. Transformations include
* translations, scaling and rotation. (Scaling can be performed
* uniformly by using the Cube(float sideLength) constructor.)
*
* Parameters:
* - a function pointer that to a void function with no parameters
*
* Outputs: N/A
*/
When I run the command, bound to ^Q, I get this result:
/*
* This constructor takes a pointer to a void function that should
* define a set a of transformations to move this cube to its starting
* point in the 3D coordinate system. Transformations include
translations,
* scaling and rotation. (Scaling can be performed uniformly by using
* the Cube(float sideLength) constructor.)
*
* Parameters: - a function pointer that to a void function with no
* parameters
*
* Outputs: N/A
*/
(I have hard-wrapped the line in question to indicate that TM is
soft-wrapping here, as the line is longer than 72 characters.)
Here is the command I'm using (copied from the comments on the linked
article):
#!/usr/bin/env ruby
txt = STDIN.read.gsub(%r{\A/|\*/\z}, '')
txt = txt.gsub(/^[ \t]*\*[ \t]*/, '')
txt = %x{ fmt <<< '#{txt.gsub(/'/, "'\\\\''")}' }.chomp
txt = txt.gsub(/[$`\\]/, '\\\\\0')
txt = txt.sub(/(\n(?=\n))?(\n*)\z/, '\1$0\2')
print "/* " + txt.to_a.join(' * ') + " */"
How can I modify this command to reflow correctly at 72 columns?
Thanks in advance,
--
Adam Sharp
www.adam-sharp.net
I'm working on a magento bundle. It is currently on github and getbundles can install it.
so of my work has over lapped with the php completion bundle but some has not.
The php completion bundle won't be able to auto complete for Mage::getSingleton('catalog/product');
Since in magento you use the factory pattern a lot I build my own bundle. What I'm looking for is how many users use magento and what features of a bundle would they like?
The current bundle does the following:
1. Auto complete for classes used in factory methods aka Mage::getSingleton({the classes here});
2. Takes you to a definition of a class
3. Tab trigger for <?php echo $this->__('$1'); ?>$0
The next version will do:
1. Show parent inheritance (80% done)
2. Auto complete for the Mage class (100% done)
3. Take the user to the Magento online class documentation.
Timothy
Hey all,
I'm running the newest versions of both TextMate and WordPress and am
looking to use the blogging plugin to edit/create content on my blog. I have
read the post here:
http://blog.macromates.com/2006/blogging-from-textmate/
And I have posted comments to it with minimal response. I'm wondering if
anyone has got the two to work together and if so, how you did it. Any help
would be greatly appreciated!
Cheers,
Dana W.
Hi TextMate folks.
I've written a little applescript to do what I regularly need to do - open a folder in TextMate if and only if it's not already open, from the command-line. (I have command-line scripts to set up my workspaces for each project for me.) Is there another way to do it? Not that I could see, although it's tricky to keywords-search that one. I kind of feel it should be a command-line option to the "mate" command.
Script is up here:
http://gist.github.com/322512
Comments and criticism appreciated. Please feel free fork it and make your own modifications and improvements if it is useful to you.
Caveats:
I'm no Applescript ninja - in fact this is my first, learn-by-doing foray.It should be clear that I have been working out variable scoping by trial and error. Tidying could happen.
The entire section to bring the window that contains your folder of choice to the front is broken - there seems to be no way to get between window objects and document objects despite what the Applesscript dictionary says, as noted by Alan Watson http://lists.macromates.com/textmate/2009-March/028352.html
If you run it using a path such as "." or ".." instead of an absolute path, textmate will hang. Not quite sure why.
I've assumed you are trying to open a folder rather than a file, and that opening a parent of said folder counts as that folder being already open
Have fun,
Dan
Hey guys,
I was using a bundle(I think) that adds the option "Open link in browser"
(or something like this) to the context menu in a "Plain Text" file, but
last week I was doing some cleanup and accidentally removed it :( Someone
know the name of this bundle?
Thanks in advance :)
--
http://plentz.orghttp://twitter.com/plentz