I'm trying to figure out how to perform a function in textmate2 which was in
textmate1
Used to be able to open a new file "from a template". I no longer see this
option anyway. Any advise much appreciated.
--
View this message in context: http://textmate.1073791.n5.nabble.com/Template-File-New-from-template-tp272…
Sent from the textmate users mailing list archive at Nabble.com.
I've just discovered that part of the breakage in the Asciidoc bundle is due to the higher precedence in TextMate 2 of the indentation rules. In particular, I have deduced that I'm being bolluxed by a rule inherited from text.html. The asciidoc grammar is scoped as text.html.asciidoc, wrongly; I intend to change that, but right now I'm still learning my away around.
(There is little doubt that the scoping of the asciidoc grammar as text.html.asciidoc is a huge mistake and lies at the heart of many of my problems. I didn't write this grammar so it isn't my fault; I'm just trying to fix it so it works. Asciidoc has nothing to do with html - even less, indeed, than markdown does. There are some places where asciidoc should behave like xml, but then the solution is presumably to adopt xml behavior in just those places. So all this is going to change. But humor me anyway, for now.)
According to the FAQ on github, I should be able to shelter myself from indentation rules ("you can disable the auto-indentation entirely") by a setting like this:
{ disableIndentCorrections = :true; }
But no matter how I scope that pref (including no scope, text.html, etc.), automatic indentation when I press Return is happening, under the influence of text.html (the caret is in the scope text.html.asciidoc meta.paragraph.asciidoc).
Have I found a bug in TextMate 2, or am I just being misled by the wording in the FAQ?
m.
--
matt neuburg, phd = matt(a)tidbits.com, 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
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
It turns out that it is wrong, in a grammar, to put a "patterns" section inside a "name/match" section.
But it isn't _forbidden_. It just makes everything behave wrong. I lost an entire day over this, because none of the documentation made this sufficiently clear, but mostly because TextMate did not complain. I am suggesting that it should do so.
Here is an extremely silly example to illustrate. Start with this:
{ patterns = (
{ name = 'punctuation.test';
match = 'this.*?test';
},
);
}
It successfully matches the phrase "this is a test" in the middle of a longer sentence such as "I tell you that this is a test of everything".
Now introduce an embedded pattern:
{ patterns = (
{ name = 'punctuation.test';
match = 'this.*test';
patterns = (
{ name = 'constant.character.escape.untitled';
match = '\\.';
},
);
},
);
}
(I told you it was silly!) The result is that "punctuation.test" now wrongly matches the entire document starting with "this is a test". Evidently, TextMate didn't like that. But what I'm saying is, if TextMate doesn't like that, TextMate should forbid it. The lovely dialog that says that this is not a valid property list, for example, might be used to tell me that this is not a valid grammar and will mess things up as we go along.
m.
--
matt neuburg, phd = matt(a)tidbits.com, 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
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
Hi.
Starting with 2.0-alpha.9503 (i guess) it's not possible to disable soft wrap anymore. Or is it just me?
What's the best way to downgrade? For special reasons i need a visible wrap column without the code actually being wrapped.
thanks.
Robert
My bundle command, written in Ruby, looks like this:
s = #... command-line command that produces many lines of output
STDOUT.sync = true
puts '<pre>'
puts `#{s}`
puts '</pre>'
It is set to output as HTML. In TextMate 1, the result was correctly formatted: line after line of text, wrapped in <pre> tags, wrapped in HTML. In TextMate 2, the opening and closing <pre> tags both appear before the output from executing s, and thus the output is not correctly formatted.
Clearly something has changed. What's the new correct way of doing this? Thanks - m.
--
matt neuburg, phd = matt(a)tidbits.com, 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
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
Hi everybody !
I use ⌃ ⌘ T to look into the bundles, but what if the key equivalent is used in TM itself ?
**Example:** If I search for ⌘ E in "Select Bundle Item dialog" => I find nothing. Although it is used by TM for menu "Use Selection for Find". So, what would be great would be that the "Select Bundle Item dialog" could inform that the key equivalent is used by TM. Or, when I type in the "Key equivalent" field, a message could inform me that the key equivalent is already used and where.
Furthermore, is there a way to record the settings in the "Select Bundle Item dialog" ? If I previously set «Key equivalent» instead of «Title», I would like to have «Key equivalent» selected the next time I call the dialog. Idem for «Current Scope» and «Actions».
Thank you in advance for your answer.
And thank you for this wonderful tool: TextMate.
Bruno.
Deep in the TextMate bundle is escape.rb, containing this utility:
# URL escape a string but preserve slashes (idea being we have a file system path that we want to use with file://)
def e_url(str)
str.gsub(/([^a-zA-Z0-9\/_.-]+)/n) do
'%' + $1.unpack('H2' * $1.size).join('%').upcase
end
end
The problem is that the "n" modifier on the match requires that this string (str) be ASCII-8BIT encoding. But on the Mac a file system path is UTF-8. Thus it is possible that this method will be sent a UTF-8 string and will choke on it. For example:
e_url("/Users/matt/Desktop/höwdy.txt")
[That's "howdy" with an umlaut over the o, in case it doesn't come across in your email.]
Now, it is legal to make a file:// URL that points to this file. But e_url is failing to create such a URL and we get a warning.
I suggest that this utility may need to be revised for use with Mavericks and Ruby 2.x.
m.
--
matt neuburg, phd = matt(a)tidbits.com, 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
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
Hi,
I am a TextMate 2 Alpha user since the day it was made public. However, some months ago an update of it shredded my TM1 installation because the support folder was then renamed from "Avian" to "TextMate". This was unfortunate but I could live with it since I only relied on TM1 for HTML zen coding anyway.
Once in a while I am trying out new bundles and I am noticing that if I want to install bundles manually I still have to do this in "Application Support/Avian/Pristine Copy/Bundles" since TextMate will ignore everything in "Application Support/TextMate/Bundles" or "Application Support/TextMate/Pristine Copy/Bundles".
Maybe there is a deeper sense to it I just don't get but I find this really confusing and thus hard to work with.
Or maybe I am just getting it wrong and there is a command I need to run or a file I need to delete for this to work properly.
Any help or info regarding this is greatly appreciated.
Thanks,
Torsten