When opening a document in a project that already has several tabs open, I find it very unpredictable where the new tab will go. It appears somewhere in the middle of the other tabs, and seems to disturb their order. Moreover, if I open a document whose tab is already open, it moves within the order of tabs.
All of that seems wrong and confusing, and makes it hard to keep track of which tab is which (because the order keeps changing so there is no positional memory). I would like to see the rule be:
* A document that is not already open, opens as the *first* tab. (I would really like it to be last, but that does not seem feasible because there might be too many tabs for the window, and it is pointless to hide the new tab off to the right.)
* A document that *is* already open, simply selects that tab, without changing the order of existing tabs.
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 everyone,
Today I felt the need to be able to select text between quotes, and
managed to dig up this old message from 2009
(http://lists.macromates.com/textmate/2009-June/028965.html):
On Sun, Jun 7, 2009 at 8:05 PM, Oliver Taylor <olivertaylor at me.com> wrote:
>
> On Sat, Jun 6, 2009 at 7:17 PM, MDX-LE<dj9027 at gmail.com> wrote:
> >
> > How do I Select all the characters between double quotes? When I use Ctrl+Alt+B when the cursor is somewhere inside the double quotes, it selects all the characters inside the quotes AND the quotes themselves.
> >
> > Can I change this so that I can restrict selection within the quotes without the quotes?
>
> If you create a macro or command with the same shortcut you'll override the menu item.
>
> I've attached a macro that might do what you want, but you may have to customize it.
I've attached an improved version of this macro that works for either
single or double quotes, including when single quotes are within a
double quoted string and vice-versa (though it still won't handle
escaped quotes properly).
If you have any suggestions for further improvements let me know!
–Adam
Since I updated to Textmate 2 I have a problem with folding code: whenever I unfold a piece of code (by clicking on the triangle), the code unfolds but the triangle disappears. This way I need to highlight the section and click fold again, instead of just clicking the triangle again to fold it. This was not the case under Textmate 1 and led to me never using Textmate 2 as it's such a crucial functionality for me. I hope you can tell me what I may be doing wrong or resolve it if it's a bug!
Thanks,
Samuel
What happened to the great little feature where you could ask to show/select in the file browser the file you are currently editing? It seems to be missing in action in TextMate 2.
This makes it very difficult (i.e. impossible) to know what file you are editing, especially when lots of tabs are open and there are lots of files in a big hierarchy in the file browser.
Of course if it is there but in some other guise, I'm happy to be corrected! Thx - 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
I'm still trying to get started writing my bundle, but I can't even get the first two rules to work...
AsciiDoc marks bold like *this*, but I don't want this to work across paragraph boundaries. I've started by arbitrarily dividing the document into paragraphs:
patterns = (
{ name = 'punctuation.test';
begin = '^';
end = '$';
},
);
I've marked 'punctuation.test' as red, so I can see that this is working.
====
This is a paragraph
And this is a different paragraph
====
In the repository, I also define bold; the real pattern is quite involved, but let's pretend it's very simple, like this:
repository = {
single_bold = {
name = 'markup.bold.asciidoc';
begin = '\*';
end = '\*';
};
};
Now I include single_bold in my punctuation.test paragraph, by changing the patterns to look like this:
patterns = (
{ name = 'punctuation.test';
begin = '^';
end = '$';
patterns = (
{ include = '#single_bold'; },
);
},
);
This screws everything up. Yes, it works on expressions like *this*. But it also works across paragraph boundaries:
====
Like *this
it boldifies* across paragraphs.
====
That is exactly what I wanted to prevent! What is happening, as I can see from my red "punctuation.test", is that including #single_bold in punctuation.test is actually changing the meaning of punctuation.test! Instead of stopping after "Like *this", the way it did before, punctuation.test is now mysteriously extended to included multiple paragraphs.
What I want to do is give the paragraph definition _priority_ so that #single_bold only works _inside_ a paragraph; instead, including #single_bold is causing the paragraph definition to stop working correctly and is extending both itself and the paragraph definition across multiple paragraphs. How do I prevent that? Or how do I make a begin/end rule that doesn't cross line boundaries? 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
I just quit TextMate 2 with an untitled dirty document open, and TextMate forgot to offer to save it - it simply vanished off the screen and the work was lost. I don't blame TextMate; if I really wanted that script, I should have saved it at some point. But I'm just warning people, there's a bug in there that can allow this to happen (though I am completely unclear on what the circumstances are; it's not like this bug is easily reproduced or anything). Don't assume you'll get the Save dialog on quit. 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
One of the coolest things about the bundle development process is that a grammar is "live". If you have a document open that comes under this grammar, and if you make a change in the grammar and save, the grammar is immediately applied freshly to the open document.
Unfortunately, this is _not_ true of custom themes. Let's say I have a custom theme in this same bundle (Test Theme). And let's say it contains this setting (among others):
{ name = 'Test';
scope = 'punctuation.test';
settings = { background = '#FF0000';};
}
I'm sure you can see where this is going. My idea here is to make a grammar-defined scope visible temporarily (for testing and analysis) by renaming it "punctuation.test" just long enough to let the theme color its background in the document, so I can see whether my scope is working correctly.
But this doesn't work. Well, it works, but every time I make a change in Test Theme, I have to apply that theme to the document _again_ (bring the document to the front and choose View > Theme > Test Theme) even though that theme is _already_ applied to this document (it is already checked at the time I choose it in the menu).
So what I'm suggesting is: please make themes "live" in the same way as bundle grammars: when I save a theme, it should be immediately and visibly applied to any open documents to which it is already applied. This would make the development process a lot snappier. 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
I have a file consisting of a single column of dollar amounts such as:
$172.83
$30.00
$74.36
$10.00
$528.33
$225.00
$107.78
$30.00
$74.36
$10.00
$61.85
$61.85
$18.70
$18.70
.
.
.
I need to transform this file into a file consisting of two columns with
the second column taken from every other of the single-column numbers. How
can I do that in TM2? I have looked in the manual and online for tips but
can not find any that do what I want, or so it seems. Can you guys please
suggest how to do this?
Thanks very much.
Comer
Let's say I've carefully set up a Regex find in the Find dialog. And let's say I switch away from TextMate to do something else, and I do a find, say in a Safari page. When I come back to TextMate, my find term is gone! It has been replaced from the system shared Find clipboard. This (the shared Find clipboard) is a vile feature and TextMate should either opt out or should give me a pref to opt out. 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
(I signed up to get emails in a digest, so I don't know how to reply to
an individual email)
Message: 1
Date: Thu, 16 Jan 2014 21:15:59 +0700
From: "Allan Odgaard"<mailinglist(a)textmate.org>
To: "TextMate users"<textmate(a)lists.macromates.com>
Subject: [TxMt] Re: when sending code to R.app textmate 1 and 2 both
open
Message-ID:<4E4D9C0E-7389-4E8E-AFF5-4FC9DFA68AF7(a)textmate.org>
Content-Type: text/plain; charset=utf-8; format=flowed
On 15 Jan 2014, at 12:44, Kevin Owens wrote:
> I'd like to have both versions of textmate on my computer, but when I
> send code to the R.app in either, it shifts focus to the other one.
> For example, if I am running textmate 1 it runs the R code, then
> shifts focus to textmate 2, and then I have to alt tab to get back to
> my original window.
Exactly what bundle command are you using?
I looked at the commands in the R Console (R.app) bundle (like ?Send
Document / Selection to R.app?) and while I see code that activates
R.app I see no code to bring back focus to TextMate.
I'm using the command "Send Selection/Line To" and the sub-menu is "R.app and step" and the key binding is alt shift enter.
I've restarted my computer, and now it seems that Textmate 1 works fine, but it's when I send code to R.app that it switches focus.
I think it may be related to the lines in that command like
"open "txmt://open?line="
I’m trying to add some missing functionality to a bundle and stumbled upon some odd behavior of the selection string in TM_SELECTION regarding the range…
When I select a block of text and my cursor is somewhere in the middle of a line, the selection string contains exactly the highlighted range. Consider the following selection (see screenshot):
TM_SELECTION is now "5:5-3”, so lines 3-5 are included.
Example 2, column selection:
TM_SELECTION is “5x3”, lines 3-5 included.
But whenever I’m using CMD-L for “Select line”, like here, it gets somewhat problematic:
TM_SELECTION is now "6-3”, the range now includes line 6, but the *visible* part of the selection is still 3-5.
I can work somewhat around this checking if the last character in TM_SELECTED_TEXT is a newline (\n) (because that is where the additional line in the range is coming from - as one can make the same selection in example 3 when the cursor is on the first row of line 6, holding shift and hitting UP 2 times. Standard OSX behavior).
But the more I think about it, the less I’m sure if this is intentional.
Can this be considered a bug or is it intended behavior / a feature?
I'd like to have both versions of textmate on my computer, but when I
send code to the R.app in either, it shifts focus to the other one. For
example, if I am running textmate 1 it runs the R code, then shifts
focus to textmate 2, and then I have to alt tab to get back to my
original window.
I tried moving and renaming one .app, but it didn't work.
Kevin
In the archive I found this conversion:
>> Looking for help with language grammar. Coding in perl, and adding
>> pod (documentation) within a codeblock, pod code gets automatically
>> indented. Is there a way to have lines that begin with a = symbol
>> auto- 'out-dent'? And then any subsequent lines, before a '=cut' line
>> to be indented to match the previous line?
> I assume decrease indent only by a single unit? If so, you can make
> the line be matched by both the increase and decrease indent pattern,
> e.g.:
>
> increaseIndentPattern = '^\s*=\w+';
> decreaseIndentPattern = '^\s*=\w+';
>
> This should give the behavior. Note though that if the indent is zero
> when the cut line is used, the current build will not cause the indent
> to be increased for the following lines, but this will be fixed in
> next build.
>
> Also, we disable indent-as-you-type for source.comment, so if you
> setup useful indent patterns for the documentation blocks (which I
> assume are scoped as block comments) then it might be useful to
> re-enable indent-as-you-type:
>
> disableIndentCorrections = :false;
I am not sure, where to change these settings. In the Perl Bundle ->
Settings -> Indention? Or should I better make my own Bundle, so that
these Settings stick in case of an update?
Thanks in advance!
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