Hello, long-time Emacs user / new TextMate user here. I wanted to drop by and say "hi", say how much I am loving TextMate so far (I thought nothing would drag me away from Emacs), and discuss a couple of features that I miss.
Firstly, I was on the whole a very happy user of Emacs, and an article I wrote describing my Emacs environment for XHTML/CSS/Javascript/PHP web development was even mentioned in the O'Reilly Emacs book. I'd tried TextMate a couple of years ago and not liked it, but I tried it again a few weeks ago and was blown away.
However there are two things that I miss. I have done a Google search on the mailing list archives and couldn't see much discussion of either of these, but please appreciate that the mailing list archive is very large and I'm new here so I apologies in advance if I'm just raking over things that have been discussed to death.
1. Good parenthesis matching and highlighting
I'm actually genuinely surprised at this. TexMate is very weak in this area. I should be able to put the cursor between say "})" and have the two closing parentheses highlighted in different colours and have their corresponding opening parenthese highlighted in matching colours.
2. The ability to parse DTDs and Schemas for automagic knowledge of markup languages
This is much more of a tall order, but it is something that PSGML mode and nXML mode provide in Emacs, and to some extent it is similar to what AUC-TeX provides for LaTeX editing in Emacs. With PSGML mode and nXML mode I can open any type of SGML or XML document and as long as Emacs can find the DTD or the Schema it automatically understands the language in question: it knows what elements are part of the language, where they can be inserted, what attributes those elements can have and even what attribute values they can have. That means that you don't need to write a MathML mode, an SVG mode, etc. In TextMate I needed to hand edit an SVG file but there is no SVG bundle, just an XML one. It was the first time in weeks I had to use Emacs. Similarly work is progressing rapidly now on HTML 5. Support will have to be laboriously added to TextMate for this in the absence of something which simply understood the DTD or Schema. AUC-TeX on Emacs worked in a similar way, in that it was capable of parsing the LaTeX packages you were using and automatically extracting the commands and environments they used and adding them to menus.
As I understand it, the features of TextMate 2.0 are somewhat shrouded in mystery, but I understand that the underlying engine for language grammars is being re-written. Does anyone know if the kind of feature I discussed is likely to be possible in TextMate 2? Maybe it is already possible in TextMate 1, but no one else has seen a need for it?
Anyway, so far the pros of TextMate are outweighing the cons. There were a large number of niggles with Emacs that were driving me up the wall, and so far it has been a joy to switch to TextMate. Better paren matching seems like something that just needs to be there. A more intelligent way for dealing with markup languages is highly desirable from my point of view, and could in the long-term end up being a deal- breaker. I'd be interested to hear what others think.
Best, Darren
Hey guys,
First, I have a few very large projects with upwards of 100K files (mostly images and .svn files...) and I run into two problems because of it. And no, I do not have the folder tabs open that have the majority of these files. I have those folder tabs closed, because they are all not really editable by textmate, ever.
So, first, I regularly background and foreground TextMate, and every time I do so with this "folder" open in a TextMate window, it takes anywhere from 2 to 20 seconds to re-foreground. I'm one of those really really fast users who makes a change, switches to browser, hits refresh, goes back, makes a change, etc. etc. Pretty standard with web development. This delay (especially when it leans towards the longer end) is really unbearable. I have a feeling that it is re- scanning the entire directory tree for changes everytime I background/ foreground it. This is less than ideal. I've been to a few Leopard dev talks at the last WWDC and I remember a feature (can't remember the name) that let you subscribe to folder/file changes. Perhaps TextMate should do this instead of rescanning the directory tree for changes? Or, maybe it's not doing that... but something is happening which makes it take up to around 20 (sometimes rarely even 30-40) seconds everytime I foreground textmate with this folder open. Anything I can do about this?
Second, I regularly "find in files" in textmate. And with 100K files, PHEW this takes sometimes a minute or two to finish. Is there any way to specify a file filter to search through? (eg. only search through .php, .txt, .tpl and .lib files). If not, can this feature exist please? :\ TextMate is searching my folder(s) through huge SQL dumps which are useless to me. And/or is there any way to specify a "blacklist" of file extensions/types to NOT search through? Even if this is a hardcoded list in a plist somewhere, that would work for me for now, anything to reduce the time on my searches. Any ideas?
Cheers,
Andrew
P.S. This is all on a brand new unibody MacBook with 4G of RAM and 320GB 72K RPM drive... so I'm not low on ram or anything. :)
On Apr 30, 2009, at 4:26 AM, Andrew Farley wrote:
So, first, I regularly background and foreground TextMate, and every time I do so with this "folder" open in a TextMate window, it takes anywhere from 2 to 20 seconds to re-foreground. I'm one of those really really fast users who makes a change, switches to browser, hits refresh, goes back, makes a change, etc. etc. Pretty standard with web development. This delay (especially when it leans towards the longer end) is really unbearable. I have a feeling that it is re- scanning the entire directory tree for changes everytime I background/ foreground it. This is less than ideal. I've been to a few Leopard dev talks at the last WWDC and I remember a feature (can't remember the name) that let you subscribe to folder/file changes. Perhaps TextMate should do this instead of rescanning the directory tree for changes? Or, maybe it's not doing that... but something is happening which makes it take up to around 20 (sometimes rarely even 30-40) seconds everytime I foreground textmate with this folder open. Anything I can do about this?
I am anxious to see if you find others who notice this or found a solution. I was talking with a friend about this the other day, and http://ciaranwal.sh/remate/ ReMate was mentioned. This was more to speed up ExpanDrive, so not sure if it applies.
I am not editing more than a few files at a time, and until the other day, was not even using projects, as I never saw the "Save as Project" option. I felt it was too much a pain to drag and drop files to make a new project every time, this has been solved. But I still do a lot of remote dev, and there is no way to get remote opened windows into project order, so I am still stumped.
Back to the issue at hand, with my small, around 10-100k in size files, I too noticed the lag in toggling between command-tab of apps. I use Lite Switch X, and was attributing it to that app, but good to know that is not the case.
Only ever when I use TM, does edit -> cmd-tab -> Safari/Refresh -> cmd- tab, there is a clear, noticeable slowness in that switch to me. Sometimes it is more than others, ReMate did nothing to solve this for me.
For me, it is minimal, but it is something I do in fact "feel". It seems to grow worse as time goes on, I reboot of the entire machine is needed to make it get snappy again, but it will slow quickly.
Glad someone else does in fact notice it. Though only glad in that I do not have to troubleshoot my hardware and software setup :)
A long time ago there was a discussion about TextMate leaking memory when using "Find in Project" ... I wonder if that applies here, too. On Apr 30, 2009, at 7:26 AM, Scott Haneda wrote:
On Apr 30, 2009, at 4:26 AM, Andrew Farley wrote:
So, first, I regularly background and foreground TextMate, and every time I do so with this "folder" open in a TextMate window, it takes anywhere from 2 to 20 seconds to re-foreground. I'm one of those really really fast users who makes a change, switches to browser, hits refresh, goes back, makes a change, etc. etc. Pretty standard with web development. This delay (especially when it leans towards the longer end) is really unbearable. I have a feeling that it is re- scanning the entire directory tree for changes everytime I background/ foreground it. This is less than ideal. I've been to a few Leopard dev talks at the last WWDC and I remember a feature (can't remember the name) that let you subscribe to folder/file changes. Perhaps TextMate should do this instead of rescanning the directory tree for changes? Or, maybe it's not doing that... but something is happening which makes it take up to around 20 (sometimes rarely even 30-40) seconds everytime I foreground textmate with this folder open. Anything I can do about this?
I am anxious to see if you find others who notice this or found a solution. I was talking with a friend about this the other day, and http://ciaranwal.sh/remate/ ReMate was mentioned. This was more to speed up ExpanDrive, so not sure if it applies.
I am not editing more than a few files at a time, and until the other day, was not even using projects, as I never saw the "Save as Project" option. I felt it was too much a pain to drag and drop files to make a new project every time, this has been solved. But I still do a lot of remote dev, and there is no way to get remote opened windows into project order, so I am still stumped.
Back to the issue at hand, with my small, around 10-100k in size files, I too noticed the lag in toggling between command-tab of apps. I use Lite Switch X, and was attributing it to that app, but good to know that is not the case.
Only ever when I use TM, does edit -> cmd-tab -> Safari/Refresh -> cmd- tab, there is a clear, noticeable slowness in that switch to me. Sometimes it is more than others, ReMate did nothing to solve this for me.
For me, it is minimal, but it is something I do in fact "feel". It seems to grow worse as time goes on, I reboot of the entire machine is needed to make it get snappy again, but it will slow quickly.
Glad someone else does in fact notice it. Though only glad in that I do not have to troubleshoot my hardware and software setup :) -- Scott * If you contact me off list replace talklists@ with scott@ *
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On Thu, Apr 30, 2009 at 8:31 AM, Kai Janson kaijanson@thejeeper.net wrote:
A long time ago there was a discussion about TextMate leaking memory when using "Find in Project" ... I wonder if that applies here, too.
In general, I've stopped using find in project, I'm quite happy with the "Ack in project" bundle.
Also, I wonder if the OPs problem with slow re-foregrounding might actually be caused by memory leaks/hogging by some of the other apps being run concurrently, causing a bigger swap in?
When a leaky app, like for example Firefox chews up memory, it can slow the whole system down. It might be worthwhile to use activity monitor and quit/force quit any app(s) which seem to be using excessive real/virtual memory and see if that helps.
On Apr 30, 2009, at 5:39 AM, Rick DeNatale wrote:
When a leaky app, like for example Firefox chews up memory, it can slow the whole system down. It might be worthwhile to use activity monitor and quit/force quit any app(s) which seem to be using excessive real/virtual memory and see if that helps.
Good idea, though I do not use FireFox, so my list of candidate apps would be Apple Mail, Interarchy, Safari, and TM, that is about all I have running when doing dev.
Andrew, expanding on this comment below, what other non "App" apps are you using?
I have DropBox, which seems to be using about 35/1000 MB, Safari is way up there with 350/1500 MB, mds indexing 49/800 MB, X-Marks 33/950 MB, The rest are really low, other than a kernel task that is chewing up 135/1000 MB
But I also have KeyBoard Maestro, LaunchBar, 1Password, Growl, NetWork Location, type it 4 me, Lite Switch X, and probably a few more.
Most of these I would really hate to see go. I can tell x-Marks to run on demand, but that is a new one, and this happened before that, So is Dropbox and LaunchBar.
On Apr 30, 2009, at 5:39 AM, Rick DeNatale wrote:
Also, I wonder if the OPs problem with slow re-foregrounding might actually be caused by memory leaks/hogging by some of the other apps being run concurrently, causing a bigger swap in?
I pretty much always have VMware running with a minimalist web dev environment (gentoo), Apple Mail, QuickSilver, Safari, Adium, Terminal, and only startup Firefox for some more in-depth CSS/Ajax debugging (firebug ftw).
I have 4G of RAM, and the problem I'm describing I can replicate upon a fresh reboot with only my Gentoo VM (1GB RAM), Safari, and TextMate running. That's why I was leaning towards the problem being by TextMate, and not by low memory conditions.
Andrew
On Apr 30, 2009, at 8:03 AM, Scott Haneda wrote:
Andrew, expanding on this comment below, what other non "App" apps are you using?
I have DropBox, which seems to be using about 35/1000 MB, Safari is way up there with 350/1500 MB, mds indexing 49/800 MB, X-Marks 33/950 MB, The rest are really low, other than a kernel task that is chewing up 135/1000 MB
But I also have KeyBoard Maestro, LaunchBar, 1Password, Growl, NetWork Location, type it 4 me, Lite Switch X, and probably a few more.
Most of these I would really hate to see go. I can tell x-Marks to run on demand, but that is a new one, and this happened before that, So is Dropbox and LaunchBar.
On Apr 30, 2009, at 5:39 AM, Rick DeNatale wrote:
Also, I wonder if the OPs problem with slow re-foregrounding might actually be caused by memory leaks/hogging by some of the other apps being run concurrently, causing a bigger swap in?
-- Scott * If you contact me off list replace talklists@ with scott@ *
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Well, if the devs (or anyone) looks into this or wants to debug/test this, I'd be happy to run a debug version of TextMate.
And I have had TextMate crash a few times after not being able to recover from a find in project, or cmd-tabbing a lot. Usually takes about 3-4 minutes of it hanging there to crash. So it is possible there is a leak here. Happy to test! :) Hit me up! :P
Andrew
On Apr 30, 2009, at 6:31 AM, Kai Janson wrote:
A long time ago there was a discussion about TextMate leaking memory when using "Find in Project" ... I wonder if that applies here, too. On Apr 30, 2009, at 7:26 AM, Scott Haneda wrote:
On Apr 30, 2009, at 4:26 AM, Andrew Farley wrote:
So, first, I regularly background and foreground TextMate, and every time I do so with this "folder" open in a TextMate window, it takes anywhere from 2 to 20 seconds to re-foreground. I'm one of those really really fast users who makes a change, switches to browser, hits refresh, goes back, makes a change, etc. etc. Pretty standard with web development. This delay (especially when it leans towards the longer end) is really unbearable. I have a feeling that it is re- scanning the entire directory tree for changes everytime I background/ foreground it. This is less than ideal. I've been to a few Leopard dev talks at the last WWDC and I remember a feature (can't remember the name) that let you subscribe to folder/file changes. Perhaps TextMate should do this instead of rescanning the directory tree for changes? Or, maybe it's not doing that... but something is happening which makes it take up to around 20 (sometimes rarely even 30-40) seconds everytime I foreground textmate with this folder open. Anything I can do about this?
I am anxious to see if you find others who notice this or found a solution. I was talking with a friend about this the other day, and http://ciaranwal.sh/remate/ ReMate was mentioned. This was more to speed up ExpanDrive, so not sure if it applies.
I am not editing more than a few files at a time, and until the other day, was not even using projects, as I never saw the "Save as Project" option. I felt it was too much a pain to drag and drop files to make a new project every time, this has been solved. But I still do a lot of remote dev, and there is no way to get remote opened windows into project order, so I am still stumped.
Back to the issue at hand, with my small, around 10-100k in size files, I too noticed the lag in toggling between command-tab of apps. I use Lite Switch X, and was attributing it to that app, but good to know that is not the case.
Only ever when I use TM, does edit -> cmd-tab -> Safari/Refresh -> cmd- tab, there is a clear, noticeable slowness in that switch to me. Sometimes it is more than others, ReMate did nothing to solve this for me.
For me, it is minimal, but it is something I do in fact "feel". It seems to grow worse as time goes on, I reboot of the entire machine is needed to make it get snappy again, but it will slow quickly.
Glad someone else does in fact notice it. Though only glad in that I do not have to troubleshoot my hardware and software setup :) -- Scott * If you contact me off list replace talklists@ with scott@ *
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
I also stopped using "Find in Project" for large projects because of the (supposed) memory leaks and the fact that you cannot select a sub- directory to search. Instead, I installed Wycat's Search command [1] and I mapped the cmd-cap-F to this command.
Unfortunately, this Search command does not allow you to Replace. To do so on a sub-directory of your project, I would advice to open this sub-directory as a new project in TM to reduce the number of files to process.
[1] - http://yehudakatz.com/2007/11/15/textmate-search-in-a-folder-with-grep-part-...
Hope I was clear.
Best regards, Mathieu
___________________________________________
Mathieu Godart
Skype: mathieu_godart MSN: mathieu_godart@hotmail.com
ASIC Integration Manager Coolsand Technologies ___________________________________________
Le 30 avr. 09 à 14:41, Andrew Farley a écrit :
Well, if the devs (or anyone) looks into this or wants to debug/test this, I'd be happy to run a debug version of TextMate.
And I have had TextMate crash a few times after not being able to recover from a find in project, or cmd-tabbing a lot. Usually takes about 3-4 minutes of it hanging there to crash. So it is possible there is a leak here. Happy to test! :) Hit me up! :P
Andrew
On Apr 30, 2009, at 6:31 AM, Kai Janson wrote:
A long time ago there was a discussion about TextMate leaking memory when using "Find in Project" ... I wonder if that applies here, too. On Apr 30, 2009, at 7:26 AM, Scott Haneda wrote:
On Apr 30, 2009, at 4:26 AM, Andrew Farley wrote:
So, first, I regularly background and foreground TextMate, and every time I do so with this "folder" open in a TextMate window, it takes anywhere from 2 to 20 seconds to re-foreground. I'm one of those really really fast users who makes a change, switches to browser, hits refresh, goes back, makes a change, etc. etc. Pretty standard with web development. This delay (especially when it leans towards the longer end) is really unbearable. I have a feeling that it is re- scanning the entire directory tree for changes everytime I background/ foreground it. This is less than ideal. I've been to a few Leopard dev talks at the last WWDC and I remember a feature (can't remember the name) that let you subscribe to folder/file changes. Perhaps TextMate should do this instead of rescanning the directory tree for changes? Or, maybe it's not doing that... but something is happening which makes it take up to around 20 (sometimes rarely even 30-40) seconds everytime I foreground textmate with this folder open. Anything I can do about this?
I am anxious to see if you find others who notice this or found a solution. I was talking with a friend about this the other day, and http://ciaranwal.sh/remate/ ReMate was mentioned. This was more to speed up ExpanDrive, so not sure if it applies.
I am not editing more than a few files at a time, and until the other day, was not even using projects, as I never saw the "Save as Project" option. I felt it was too much a pain to drag and drop files to make a new project every time, this has been solved. But I still do a lot of remote dev, and there is no way to get remote opened windows into project order, so I am still stumped.
Back to the issue at hand, with my small, around 10-100k in size files, I too noticed the lag in toggling between command-tab of apps. I use Lite Switch X, and was attributing it to that app, but good to know that is not the case.
Only ever when I use TM, does edit -> cmd-tab -> Safari/Refresh -> cmd- tab, there is a clear, noticeable slowness in that switch to me. Sometimes it is more than others, ReMate did nothing to solve this for me.
For me, it is minimal, but it is something I do in fact "feel". It seems to grow worse as time goes on, I reboot of the entire machine is needed to make it get snappy again, but it will slow quickly.
Glad someone else does in fact notice it. Though only glad in that I do not have to troubleshoot my hardware and software setup :) -- Scott * If you contact me off list replace talklists@ with scott@ *
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On 30 Apr 2009, at 13:26, Andrew Farley wrote:
First, I have a few very large projects with upwards of 100K files [...] regularly background and foreground TextMate, and every time I do so with this "folder" open in a TextMate window, it takes anywhere from 2 to 20 seconds to re-foreground.
See http://wiki.macromates.com/Troubleshooting/Beachball
This will help with Find in Project as well.
On Apr 30, 2009, at 6:50, Darren Brierton wrote:
Firstly, I was on the whole a very happy user of Emacs, and an article I wrote describing my Emacs environment for XHTML/CSS/Javascript/PHP web development was even mentioned in the O'Reilly Emacs book. I'd tried TextMate a couple of years ago and not liked it, but I tried it again a few weeks ago and was blown away.
However there are two things that I miss. ...
Some comments from my own understanding of TM. Sorry if I'm saying things which have already been discussed; I don't follow the list very closely.
- Good parenthesis matching and highlighting
I'm actually genuinely surprised at this. TexMate is very weak in this area. I should be able to put the cursor between say "})" and have the two closing parentheses highlighted in different colours and have their corresponding opening parenthese highlighted in matching colours.
TM's grammar facility allows very good matching, and it also has a default brace-matching facility -- what it lacks is UI which automatically *presents* this information. What it does have is Edit > Select > Enclosing Brackets | Current Scope.
- The ability to parse DTDs and Schemas for automagic knowledge of
markup languages
Pondering this, it seems to me that the most powerful way to do this would be to add a hook to allow bundles to compute the definition (as plist text) of an additional language grammar to be used with the current file (which could then be referenced by the static grammar provided by the bundle).
On 30 Apr 2009, at 13:29, Kevin Reid wrote:
On Apr 30, 2009, at 6:50, Darren Brierton wrote:
- Good parenthesis matching and highlighting
I'm actually genuinely surprised at this. TexMate is very weak in this area. I should be able to put the cursor between say "})" and have the two closing parentheses highlighted in different colours and have their corresponding opening parenthese highlighted in matching colours.
TM's grammar facility allows very good matching, and it also has a default brace-matching facility -- what it lacks is UI which automatically *presents* this information. What it does have is Edit > Select > Enclosing Brackets | Current Scope.
Yes, but I don't want to select what is in between the parentheses, I just want a better visual cue of where I am when I am editing. It's really just a special case of syntax highlighting that is only active when the cursor is next a parenthesis character. Most other editors I've used have it some extent. Given that TextMate's syntax highlighting is so good (probably the best I've ever seen), I am surprised it doesn't have this, especially if as you say the underlying language grammars could easily make it available.
- The ability to parse DTDs and Schemas for automagic knowledge of
markup languages
Pondering this, it seems to me that the most powerful way to do this would be to add a hook to allow bundles to compute the definition (as plist text) of an additional language grammar to be used with the current file (which could then be referenced by the static grammar provided by the bundle).
As a new TextMate user I'm afraid I don't really know what that means, but I'm excited by the suggestion that this is something that is feasible even in TextMate 1.
Thanks for your reply.
Best, Darren
On Thu, Apr 30, 2009 at 3:50 AM, Darren Brierton darren.brierton@gmail.com wrote:
Hello, long-time Emacs user / new TextMate user here. I wanted to drop by and say "hi", say how much I am loving TextMate so far (I thought nothing would drag me away from Emacs), and discuss a couple of features that I miss.
Firstly, I was on the whole a very happy user of Emacs, and an article I wrote describing my Emacs environment for XHTML/CSS/Javascript/PHP web development was even mentioned in the O'Reilly Emacs book. I'd tried TextMate a couple of years ago and not liked it, but I tried it again a few weeks ago and was blown away.
However there are two things that I miss. I have done a Google search on the mailing list archives and couldn't see much discussion of either of these, but please appreciate that the mailing list archive is very large and I'm new here so I apologies in advance if I'm just raking over things that have been discussed to death.
- Good parenthesis matching and highlighting
I'm actually genuinely surprised at this. TexMate is very weak in this area. I should be able to put the cursor between say "})" and have the two closing parentheses highlighted in different colours and have their corresponding opening parenthese highlighted in matching colours.
It does have this sort of. If you move over a closing paren or bracket, the corresponding opening punctuation is flashed for a second. So, the intelligence is there, but like Kevin said, TextMate doesn't currently display it quite how you would prefer.
Cheers, Chris
On 30/04/2009, at 8:50 PM, Darren Brierton wrote:
- The ability to parse DTDs and Schemas for automagic knowledge of
markup languages
+1
I've been using TM for a couple of months for docbook editing and not having this feature (or at least a complete docbook grammar (which would be obsoleted by DTD parsing) is the thing that keeps me on the look out for a replacement editor.