Hi,
I'm using the latest version (2.0-alpha.9529) and I've some problems getting python output when running the script.
The python script is just:
print "ok"
It works fine when ran in terminal (Run Script (Terminal)) but if I run script directly (Run Script), I get no output. For other type of files (Latex for example), everything seems ok.
The weirdest part is that if I do the same with another user (administrator) it works fine and I get the output in the window: from my regular account, I can "su administrator" and starts TM from command line and it works as expected.
I tried to reinstall TM, not load my .profile/.bashrc in case something's wrong in my path, delete any TM preferences (com.macromates.TextMate.preview and Library/Caches/...) but it does no change anything.
So I guess something wrong's with my regular account but I'm out of ideas at this point.
(I also checked "env" gives same values for regular/administrator)
If someone has any idea ... or how to debug.
Nicolas
I think I've found a bug in TextMate's regular expression format string replacement feature. Try this.
Target document:
=== testing
== testing
= testing
Find expression (regex):
^(=+)
Replace expression:
${1/=(=)?(=)?/${2:?2:${1:?1:0}}/}
Do a replace all. What I expect:
2 testing
1 testing
0 testing
What I get:
2 testing
1 testing
1 testing
In the last line, neither group 2 nor group 1 should be matched, since the initial equal-sign is supposed to scarf up the entire match. Therefore I expect the logic to be:
* group 2 failed, so use its "else" alternative, which is the test for group 1
* group 1 failed, so use its "else" alternative, which is the value "0"
But try as I may, I cannot make "0" appear in the document. That is the proposed bug. It is as if group 1 is thought to be _always_ satisfied, which should not be the case.
Of course, feel free to prove me wrong by fixing my find/replace expressions, thus doing my homework for me. :) m.
--
matt neuburg, phd = http://www.apeth.net/matt/
pantes anthropoi tou eidenai oregontai phusei
Programming iOS 7! http://shop.oreilly.com/product/0636920031017.do
iOS 7 Fundamentals! http://shop.oreilly.com/product/0636920032465.do
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
>> 1) Memory usage should be in the ballpark of starting footprint (40
>> MB) + file (66 MB) = 106 MB.
>
> This is not possible because TM associates scopes with everything in
> your document and it also needs to create CoreText line objects to
> render the text (which is too slow to do ad-hoc so these are cached).
>
> It will probably need 10-20 extra bytes per character in your document,
> which turns 66 MB into ~1 GB, add in memory fragmentation and data
> structure alignment requirements, and you probably have your 1.4 GB.
>
> Maybe it can be improved, maybe there is the need for a special
> (limited) mode for large files, but it?s not currently a priority.
Thank you for the explanation. I really like TM2 for coding and was hoping it could be my editor for large files but it seems this was not meant to be-- will use TM for coding, vim for large files.
>
>> 2) After closing the window/file, memory footprint should go back to
>> near starting footprint (40 MB)
>
> How do you measure this? The malloc allocator does not give pages back
> to the OS (AFAIK), so once a process has increased its number of
> allocated pages, the count does not go down again.
>
>> 3) Closing and reopening a file should not increase memory footprint
>> further.
>
> This might be due to fragmentation. Here one solution could be a custom
> memory allocator to keep everything related to a document allocated from
> the same memory pool, but there are still many other things I would like
> to do, before I look into such optimizations.
I measured using the memory pane of Activity Monitor.app. Regarding the malloc allocator not giving pages back, this sounds bad behavior and is an OS or C library issue that should be fixed by "them." Thank you for taking the time to respond to my email.
Just upgraded to tmate2 (2.0-alpha.9529+macports.git.9f177d3) and noticed extremely high memory usage and slowdowns on Mavericks 10.9.2 on a Macbook Pro with 4GB RAM. I have tried resetting to defaults by deleting all the setting files/caches and the problem persists. After I open a large (66 MB, ~600K lines) tab delimited file, the memory usage goes up to 1.4 GB of real memory usage. Even after I close the window, the real memory usage is 800-900 MB although the memory usage falls to ~400 MB. If I open the same file again, the real memory usage goes up to 1.7 GB.
The starting memory usage of textmate is ~40 MB. I can quit textmate and restart and the problem is reproducible.
For comparison, opening the same 66 MB file in vim, the total memory usage is only 80 MB. The expected behaviors for textmate are the following:
1) Memory usage should be in the ballpark of starting footprint (40 MB) + file (66 MB) = 106 MB.
2) After closing the window/file, memory footprint should go back to near starting footprint (40 MB)
3) Closing and reopening a file should not increase memory footprint further.
Peter
Some time back, I reported that Textmate was causing my MacBook Pro to switch to the discrete graphics card all the time after I’d installed OS X 10.9. After my initial message, a TM build appeared that stopped this happening, but two builds later the behaviour came back. I didn’t follow it up at the time because it only seemed to be affecting this model of MBP, which was also experiencing other graphics problems under Mavericks, so I was waiting for 10.9.2, which was known to include some graphics driver fixes.
10.9.2 didn’t stop TM using the discrete graphics, but TM Build 9523 did. I don’t know whether this was one of the 'Fixes and improvements’ in the release notes, but the behaviour did not reappear with 9527. I thought you should know.
The only remaining oddity is that the discrete graphics still takes over whenever I use the Commit command from the Git bundle. It doesn’t do it when I show uncommitted changes, so it isn’t the diff. It doesn’t matter, just seems strange.
Thanks for cooling my computer down.
http://stackoverflow.com/questions/20594226/textmate-2-smart-typing-pairs-f…http://stackoverflow.com/questions/22856490/textmate2-how-to-put-spaces-bet…
I've noticed that these 2 questions remain un-answered. I attempted to open the bundle editor for source, text, ruby, and scss and made changes to the various smartTypingPairs objects but was unable to create change in how TextMate operates. I tried the actual fixes for these peoples problems, deleting the pair in one, and modifying the ruby pairs, I even tried ['a':'b'], but typing a didn't append a b.Â
Are there known issues with smart typing pairs, or perhaps was I looking in the wrong location?
Thanks,Â
--Â
graham.p.heath(a)gmail.com
If I go to a line using Navigate > Go to Symbol (shift + command + T), the
line I go to could potentially be positioned anywhere on the page. Sometimes
it is near the bottom of the page, sometimes near the middle. Is it possible
to always position the line at the top of the page?
Thanks
Ross
As I've complained here before, it disturbs me that that my AsciiDoc single-line (double-slashed) comments are affected by the Source bundle's soft-wrap indenting:
{ indentedSoftWrap = {
match = '.*(//?)\s+';
format = '${0/(\s*)(.{,4}).*/$1${2/./ /g}/}';
};
softWrap = :true;
}
My comments are comment.line.double-slash.asciidoc, so they fall under the purview of the Source bundle's setting for comment.line.double-slash.
I have considered changing the scope name of my comments in order to evade this, for example to comment.line.doubleslash.asciidoc (no hyphen). That works.
However, I've just discovered that I can do it with a settings file like this:
{ indentedSoftWrap = {};
softWrap = :true;
}
That "shelters" me from the inherited soft-wrap indenting, which is what I was trying to achieve. m.
--
matt neuburg, phd = http://www.apeth.net/matt/
pantes anthropoi tou eidenai oregontai phusei
Programming iOS 7! http://shop.oreilly.com/product/0636920031017.do
iOS 7 Fundamentals! http://shop.oreilly.com/product/0636920032465.do
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
Last month I asked how to select some text and press a keyboard shortcut
that would send the selected text to R app:
http://lists.macromates.com/textmate/2014-March/037158.html
This is working excellently well. I¹m interested in extending this, but
cannot figure out how to set it up.
Lets say I have this code:
summary(lm(mpg ~ drat + hp, mtcars))
How can select 'mtcars¹ and Œhp¹ simultaneously, press a keyboard shortcut
and run this code in R app:
mtcars$hp
Similarly, in this code:
ddply(mtcars, .(cyl), summarise, mean(mpg))
How can select 'mtcars¹ and Œmpg¹ simultaneously, press a keyboard shortcut
and run this code in R app:
mtcars$mpg
Thanks
Ross
I've since found out you can reply to a thread from the website, by
clicking the authors email
Theres enough info in the mailto link to allow it to be threaded
Moot point now though, since I've changed to individual mails like you
suggest :)