Just a quick note to mention that I have updated the HTML bundle on the SVN repos, so anyone using HTML might want to check it out, and comment on what's missing, wrong etc. It's still work in progress.
Known issues, missing or under work items: HTML: -- Better Syntax highlighting (along the lines of the stuff in the PHP bundle) is 'ready' and waiting for b6 to check that everything is working OK. -- <!-- Toggle Comments --> Command is being refined to work in almost any scenario. -- more snippets -- No ReadMe doc finished yet (in progress)
CSS: -- Syntax file as HTML above -- /* Toggle Comments */ Command as HTML above -- Loads of useful snippets is still to be done. PLEASE HELP if you have any ready
JavaScript: -- Syntax file as HTML above (vastly improved if I may say so myself ;-) ) -- // Toggle Comments Command -- Loads of useful snippets is still to be done. PLEASE HELP if you have any ready
If you are working with web development please help me make TM the kick-ass app for web work flow. I am looking for help with basic generic HTML/CSS/JS snippets, commands, macros etc, but I'm also hoping to create a better XHTML bundle with Web Standards as the key aim and ready snippets with chunks of code in them and so on. All of this takes time, so I sure could do with the help ;-)
Now onto something that made me smile & LOL.
On 5 Apr 2005, at 09:23, Jeroen van der Ham wrote:
On 05-04-2005 09:22, Steve Lianoglou wrote:
On Apr 4, 2005, at 11:56 PM, Jeroen van der Ham wrote:
Why would you want to setup a snippet for <br /> ? If you're using too many br-tags in your HTML document, you're not doing it right...
Thanks for the lesson in semantic web development, Jeroen .. but it was just meant to be a trivial example to get the question across.
Sorry, just couldn't resist and there are still so many people out there doing it wrong...
Steve, just in case you need it there's a <br /> snippet in the HTML bundle that triggers on Cmd + Return, which I think is quite handy. There's even a [Non-breaking-space] snippet that triggers on Cmd + Space. Just in case you need to go back to the good old days of bad HTML ;-)
<img src="/images/clear.gif" width="${1:width}" height="{2:height}" alt="Make some Room" />$3
Aaargh! Use XHTML and CSS !
<div class="makeSpace"/> css: .makeSpace { width=x; height=y; }
;-)
Classy, absolutely classy, Jeroen !! No offence intended Steve, yours was good too, but a bit too subtle (You did it as a joke, right ?)
Kind regards,
Mats
---- "TextMate, coding with an incredible sense of joy and ease" - www.macromates.com -
Hi Mats, Seeing as how you seem to be sorting out all the html stuff, I have a query about the css syntax file. I'm not sure if this is a bug in its syntax highlighting, or if I am writing invalid code, but when there is no space between selector and the opening '{', all the enclosed content is not coloured, eg:
selector{ not coloured } selector { coloured } This problem only applies to css (php), but thought I'd query it.
anyway, keep up the good work, Max
On 5 Apr 2005, at 14:16, max@machinate.org wrote:
Seeing as how you seem to be sorting out all the html stuff, I have a query about the css syntax file. I'm not sure if this is a bug in its syntax highlighting, or if I am writing invalid code, but when there is no space between selector and the opening '{', all the enclosed content is not coloured, eg:
selector{ not coloured } selector { coloured } This problem only applies to css (php), but thought I'd query it.
Yes, Max, that's a known issue. I'm in two minds regarding this: 1. Yes, the regex can/should/need to be improved to better handle that kind of thing; 2. Is it not better to have the syntax cut off when your code is slightly wrong ?? Your code is still valid and working, but I - possibly anal-retentive as I am - prefer to have a space between key items, in this case the selector and the opening brace {.
However, and this is an important point. I am no regex expert, and I did the syntax files as an exercise in learning regex while doing something good for others. So I'm hoping that others would do the same in return. If you know how to improve it, please do so, or tell me how.
anyway, keep up the good work,
Thanks, but I'm starting to get tired, and sure could need a few helping hands. I'll be happy enough with code blocks in a single document that I then can convert into Commands/snippets etc. if you can't do the TM conversion bits.
Kind regards,
Mats
---- "TextMate, coding with an incredible sense of joy and ease" - www.macromates.com -
On 5 Apr 2005, at 14:39, Mats Persson wrote:
- Is it not better to have the syntax cut off when your code is
slightly wrong ?? Your code is still valid and working, but I - possibly anal-retentive as I am - prefer to have a space between key items, in this case the selector and the opening brace {.
I understand your reasoning, and have even started changing the way I write css thanks to this 'bug' ; ). Maybe it is a bit harsh to stop syntax highlighting on a code block because of personal preference though. As for suggesting a fix, I'm pretty awful with regexes, otherwise I might have suggested something.
Your html bundle is excellent, and its hard to think of any new things you could add. ol and ul aren't in there, but this is presumably because there are good ones in the outliner bundle. Maybe these could be added to html to make it easy for people to find. Will try and help with the others if I have some time. Thanks again, Max
On 5 Apr 2005, at 15:17, max@machinate.org wrote:
Maybe it is a bit harsh to stop syntax highlighting on a code block because of personal preference though.
Slight misunderstanding. I did not stop the highlighting because of a personal preference. It ended up that way, and I tried to fix it but ended up with other problems down the tree. Since it wasn't a show stopper I kept it and worked around it like you.
Your html bundle is excellent, and its hard to think of any new things you could add. ol and ul aren't in there, but this is presumably because there are good ones in the outliner bundle. Maybe these could be added to html to make it easy for people to find.
Yeah, <ol> <ul> are/were missing and the reason was simply that they somehow did not get uploaded. Odd issue I have to resolve.
Will try and help with the others if I have some time.
Yes, please. I've had some spare time lately, but that's coming to an end soon.
Kind regards,
Mats
---- "TextMate, coding with an incredible sense of joy and ease" - www.macromates.com -
On 05-04-2005 15:39, Mats Persson wrote:
However, and this is an important point. I am no regex expert, and I did the syntax files as an exercise in learning regex while doing something good for others. So I'm hoping that others would do the same in return. If you know how to improve it, please do so, or tell me how.
The reason this happens is that all the list of keywords in the syntax file are surrounded by "word seperator" matches ("\<" and "\>"). If you remove them, or perhaps just the one matching end of word, then it would match "keyword{" properly.
But IMO I think the space should be there...Code should be readable :)
Jeroen.
On Apr 5, 2005, at 16:32, Jeroen van der Ham wrote:
The reason this happens is that all the list of keywords in the syntax file are surrounded by "word seperator" matches ("\<" and "\>"). If you remove them, or perhaps just the one matching end of word, then it would match "keyword{" properly.
No, since “{” is a non-word character, this shouldn't be the problem. I'll take a look at the syntax file later today when I also change the SQL stuff.
Oh, and Mats, really nice work you're doing with the HTML stuff! I don't do much HTML myself, so it's nice with these “best practices” snippets that include the arguments that really should be there :)
On 5 Apr 2005, at 15:54, Allan Odgaard wrote:
On Apr 5, 2005, at 16:32, Jeroen van der Ham wrote:
The reason this happens is that all the list of keywords in the syntax file are surrounded by "word seperator" matches ("\<" and "\>"). If you remove them, or perhaps just the one matching end of word, then it would match "keyword{" properly.
No, since “{” is a non-word character, this shouldn't be the problem. I'll take a look at the syntax file later today when I also change the SQL stuff.
Yes, Allan, you are correct as usual, as Jeroen's suggestion does not solve the problems. Mind you, even with my 'bug' I have separate .className, #idName, htmlKeyword and :psuedo-class highlighting that is not in the standard CSS. (just checked and re-read the comments in there ;) ) As I see it, this whole thing will work better after b6 (or later) anyway, so I'm not too bothered. It works and if it enforces a better coding style by the user then that's a good thing in my book.
Oh, and Mats, really nice work you're doing with the HTML stuff! I don't do much HTML myself, so it's nice with these “best practices” snippets that include the arguments that really should be there :)
Thanks, and if I have the time, energy and some help, you've only seen the tip of the iceberg so far. I would love to have complete XHTML code blocks, CSS styles, browser (= Win IE) workarounds etc. etc. as ready snippets. Not to mention JS scripts ready to go. "Want a style-switcher? Here you are.." type of thing
Did anyone notice my subtle drumming on about the "help" bit ? ;-)
Kind regards,
Mats
---- "TextMate, coding with an incredible sense of joy and ease" - www.macromates.com -
On Apr 5, 2005, at 17:41, Mats Persson wrote:
[...] As I see it, this whole thing will work better after b6 (or later) anyway, so I'm not too bothered.
Just to follow up on this, now that I've seen the syntax:
The problem is that “{” is optionally used to terminate the selector matching rule-block (other options are space or end-of-line). But then this character is eaten and will not start a parameter block (another rule).
Beta 6 will allow for the end pattern to be only a look-ahead assertion, and not actually match any characters. This will fix the problem.
It works and if it enforces a better coding style by the user then that's a good thing in my book.
I guess it's just one step toward the Emacs-style indent that people have requested, which AFAIK enforce some VERY specific rules about how you write your code ;)
Thanks, and if I have the time, energy and some help, you've only seen the tip of the iceberg so far. I would love to have complete XHTML code blocks, CSS styles, browser (= Win IE) workarounds etc. etc. as ready snippets. Not to mention JS scripts ready to go. "Want a style-switcher? Here you are.." type of thing
Did anyone notice my subtle drumming on about the "help" bit ? ;-)
I understand you have put a lot of work into all these snippets, but if you want my [humble] opinion, I don't see the need to have snippets for all the possible things you can type in a language like HTML. Don't get me wrong, I am lazy :D but I find typing <h1> A HEADER and then hitting opt+cmd+"." to close the tag much easier than inserting a snippet called "<h1>" . I would suggest focusing on bigger time-savers ... like the Colorpicker command. that thing is awesome!! Anyway, I don't want to dampen your progress but I think you are asking for help in an area where other users may not share your vision.
Kumar
On 5 Apr 2005, at 20:16, kumar mcmillan wrote:
I understand you have put a lot of work into all these snippets, but if you want my [humble] opinion, I don't see the need to have snippets for all the possible things you can type in a language like HTML.
Hmm, Kumar, is this the same guy that made the PHPDoc snippets in the PHP bundle speaking ? ;-) I personally see no difference in value between yours and mine.
Don't get me wrong, I am lazy :D but I find typing <h1> A HEADER and then hitting opt+cmd+"." to close the tag much easier than inserting a snippet called "<h1>" .
Personally I find typing h1 + [tab] and then the content within the <h1></h1> tags much faster with a second tab out of it. ( I set the official <hN> snippets to h1-6 as the tab triggers)
I do understand what you are saying Kumar, and I don't exactly disagree with you. However, there are two main reasons why I'm doing it: 1. Some users (= mainly new TM trial users) don't like the lack of code completion and so on that they are used to in their other apps. Although not the same, I am hoping that these snippets will go some way towards helping with that.
2. I was used to hand coding most tags myself in BBEdit before, together with a few glossary items. However, after using TM I found that being able to store common code bits as snippets cut down on my typing and kept a consistent style throughout my code. In other words I was more productive and produced better code and all I had to remember was a number of tab trigger names instead of some more complicated tags and their various attributes etc. (the <hN> is not a good example of this)
I would suggest focusing on bigger time-savers ... like the Colorpicker command. that thing is awesome!!
Yes, the ColorPicker is cool. What other commands would you want ? Please give me some examples and ideas. I've added some new ones and is working on others: -- "Delete whitespace between tags" which speeds up the cleaning of spaces between tags in old 'dirty' unorganised html code -- A better <!-- --> HTML comment command that handles un-commented blocks, blocks with comments within them already and so on. To mention just two, and I even hope to create a bunch of Tidy commands to help people produce better code faster. So I'm all for creating time-savers. Just let me know which ones you are thinking of.
Anyway, I don't want to dampen your progress but I think you are asking for help in an area where other users may not share your vision.
No worries, Kumar, lack of time and energy can dampen my progress, but not really anyone's rightful comments. As for others not sharing my visions, well, there's nothing new there, but then I know that I have been proven right more than once in the end. All I say is don't work in the same old ways when you can be more productive. And I seriously doubt that either you or other users can't do with a bit of productivity boosting in your work life, especially when coding boring HTML. But hey, I've been wrong before, so nothing new there either ;-)
Personally, I think the biggest problem I will face when asking for help from others is the general lack of willingness to help anyone else in our society today, because we can all justify ourselves as being too busy to help out right now. Unfortunately, I was born into an idealistic family that thought "do good and good will be done to you". I know, many would think of that as "stupid silly notions", but I don't.
Kind regards,
Mats
---- "TextMate, coding with an incredible sense of joy and ease" - www.macromates.com -
On Apr 5, 2005, at 22:58, Mats Persson wrote:
Don't get me wrong, I am lazy :D but I find typing <h1> A HEADER and then hitting opt+cmd+"." to close the tag much easier than inserting a snippet called "<h1>" .
Personally I find typing h1 + [tab] and then the content within the
<h1></h1> tags much faster with a second tab out of it. ( I set the official <hN> snippets to h1-6 as the tab triggers)
Actually, there's a macro on ctrl-space that turns word + ctrl-space into <word></word> with caret in between. It's even smart enough to recognize br, hr, img etc. and will turn br + ctrl-space into <br />.
I just recently switched my CVS client to MacCVSClient v1.9 (why? I needed a native cocoa app that wasn't a complete piece of junk [it's the only one I found that I liked, there could be others I would lie as well])
This new client creates folders (actually packages) named: 'CVS.sandboxinfo' in every folder in my sandboxes. While I don't mind the package folders in my finder view, I would love a way to have the project view in TextMate ignore them. Is there a way to do this now? Or is this a feature I would have to request?
Thanks a ton guys, -Greg
PS: if you have a native CVS tool (Preferably cocoa) you want to tell me about feel free to respond to this personally (electric mail me at: junk_at_thinkof-dot-net). I doubt everyone on the list wants to hear about the CVS tool of the day (but I am open to suggestions).
PSS: Allan, I got some headway on the xslt checker, though not exactly what I wanted. xmllint still seems to be my best open, and just verifying XML compliance. The DTD's required to check XSLT don't appear to be written... soooo I guess simple check are better than nothing.
On Apr 6, 2005, at 12:48 PM, Greg Militello wrote:
I just recently switched my CVS client to MacCVSClient v1.9 (why? I needed a native cocoa app that wasn't a complete piece of junk [it's the only one I found that I liked, there could be others I would lie as well])
This new client creates folders (actually packages) named: 'CVS.sandboxinfo' in every folder in my sandboxes. While I don't mind the package folders in my finder view, I would love a way to have the project view in TextMate ignore them. Is there a way to do this now? Or is this a feature I would have to request?
TextMate -> Preferences -> Advanced -> Folder References
You can edit the regular expressions to indicate what file and folder names to exclude from the lists.
Jonathan,
Thanks... I can't believe I missed that, I looked, but for some reason I didn't see it there.
-Greg
Greg... please heed this:
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't)
You didn't... so now we can just wait for the sky to fall.
On 05.04.2005, at 23:23, Allan Odgaard wrote:
Actually, there's a macro on ctrl-space that turns word + ctrl-space into <word></word> with caret in between. It's even smart enough to recognize br, hr, img etc. and will turn br + ctrl-space into <br />.
whoha, cool! somehow that one escaped me. that's a real productivity enhancer for me, thanks!
Just one gripe: since it seems to use a selector for the word to the left of the cursor/caret it doesn't pick up on tags with namespaces, i.e. when doing Zope/Plone development and I need to create a tag like
tal:define I get tal:<define></define>
any chance on fixing that?
best regards,
tom
-- tom lazar tom@tomster.org http://tomster.org
there sure is. in your preferences, add : as a word character.
mx:Application
became
mx:Application</mx:Application> afterwards
On Apr 6, 2005 2:39 PM, Tom Lazar tom@tomster.org wrote:
On 05.04.2005, at 23:23, Allan Odgaard wrote:
Actually, there's a macro on ctrl-space that turns word + ctrl-space into <word></word> with caret in between. It's even smart enough to recognize br, hr, img etc. and will turn br + ctrl-space into <br />.
whoha, cool! somehow that one escaped me. that's a real productivity enhancer for me, thanks!
Just one gripe: since it seems to use a selector for the word to the left of the cursor/caret it doesn't pick up on tags with namespaces, i.e. when doing Zope/Plone development and I need to create a tag like
tal:define I get tal:<define></define>
any chance on fixing that?
best regards,
tom
-- tom lazar tom@tomster.org http://tomster.org
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 06.04.2005, at 21:21, Todd Boland wrote:
there sure is. in your preferences, add : as a word character.
duh! indeed... I mean, yeah... that's kind of what that preference option is there for in the first place ;-)
thanks!
tom -- tom lazar tom@tomster.org http://tomster.org
On Apr 5, 2005, at 9:16 AM, kumar mcmillan wrote:
find typing <h1> A HEADER and then hitting opt+cmd+"." to close the tag much easier than inserting a snippet called "<h1>" .
or you could just type "h1" and hit Ctrl + Space to get <h1>|</h1>. Thank you Justin.
I would suggest focusing on bigger time-savers ... like the Colorpicker command. that thing is awesome!! Anyway, I don't want to dampen your progress but I think you are asking for help in an area where other users may not share your vision.
I disagree, and hope others do as well. I think there a huge need for better web development workflow support in TM.
-t