I work with HTML, XML and Ruby code and I want to select blocks of code
based on the folding indicators for the current syntax. I may be missing
something but I cannot find a way to easily accomplish this.
I can fold the text and then hover over the ellipsis and see it there but
that also removes it from the context which is not quite what I am looking
for. There is the very useful "Fold Selection". I would like the inverse
Select Current Fold.
tks, louie
--
View this message in context: http://old.nabble.com/How-to-select-folded-text-tp28941022p28941022.html
Sent from the textmate users mailing list archive at Nabble.com.
Hi,
I'm writing a small bundle for a HTML template language I use, Tenjin
(http://www.kuwata-lab.com/tenjin/). So far so good but I ran into a
problem with pattern priority in the language definition.
The relevant part of the grammar is this:
patterns = (
{ include = 'text.html.basic'; },
{ name = 'source.perl.pltenjin.expression';
begin = '(\[==?)';
end = '(=?=\])';
captures = {
1 = { name = 'keyword.control'; };
2 = { name = 'keyword.control'; };
};
patterns = ( { include = 'source.perl'; } );
}
);
I "extend" the text.html.basic language (because most of the file is
HTML) and add Tenjin expression. They are in the format [==? =?=] (the
second = means "raw" output, single = means HTML encoded).
TextMate recognizes perfectly my expressions in the text between tags:
<p>[= $var =]</p> # this is ok
but not when used as a tag attribute value:
<p class="[= $class =]">text</p> # not ok
In the second case, the [= $class =] text is all green, the context is
string.quoted.double.html and not the expected
source.perl.pltenjin.expression.
Is there any way to work around this?
Thanks,
--
Pedro Melo
http://www.simplicidade.org/
xmpp:melo@simplicidade.org
mailto:melo@simplicidade.org
hi there - I've been trying my hand at learning Ruby and have been running some small scripts within TM but now I've run into a problem... here's the code I'm trying to run:
------------CODE--------------
class Song
def initialize(name, artist, duration)
@name = name
@artist = artist
@duration = duration
end
end
song = Song.new("Ruby Tuesday", "Rolling Stones", 360)
song.inspect
------------CODE--------------
however when I use the "Run" command the output window shows up blank - no errors, just blank.
adding this line to the class:
printf("foo")
results in "foo" in the output window but nothing else.
this code is taken directly from the "Programming Ruby" book published by The Pragmatic Programmers and should output some stuff that would take me far too long to type...
so, I'm obviously a bit of a noob - can you tell me what's going on?? is there some kind of limitation to the RubyMate bundle that doesn't allow passing of parameters into instantiated objects??
any kind of help would be great - I LOVE TM and use it for everything else I do so I'd love to use it for this too!
I should add that I'm running the latest version of OS X 10.6 and TM version 1.5.8 and that I have NOT installed Ruby via Terminal or anything else - I assumed that TM's RubyMate is a full fledged runtime environment for code testing... perhaps that I my mistake??
thanks in advance
bennett
I was wondering if there was maybe a hack or plugin that will allow me to do
this? I'm required to convert all tabs to spaces before committing any code,
and having to do it manually (text->convert->tabs to spaces) on every file
can get pretty frustrating.
--
View this message in context: http://old.nabble.com/Convert-tabs-to-spaces-when-saving--tp28891731p288917…
Sent from the textmate users mailing list archive at Nabble.com.
Hi,
I have added a command to allow you to retrace your steps so you can easily get back to where you came from. You may want to include it.
The modified goto method and two new methods in tm_ctags.rb are:
def historyFile
File.join(ENV['TM_PROJECT_DIRECTORY'] || ENV['TM_CTAGS_EXT_LIB'], ".etag_history")
end
def goto( hit )
# Record where we are before we jump.
File.open(historyFile, "a") {|f| f.puts ENV['TM_FILEPATH'] + '%%' + ENV['TM_LINE_NUMBER']}
TextMate.go_to :file => File.join(hit['f'], hit['path']), :line => hit['line']
end
def goback
history = File.readlines(historyFile) if File.exists?(historyFile)
goto = history.pop if history
if goto && goto =~ /(.*)%%(.*)/
File.open(historyFile, "w") {|f| f.puts history.join("\n")}
TextMate.go_to :file => $1, :line => $2
end
end
and the only change to tmctags.rb is to extend the action case to include a new one:
when 'goback'
TM_Ctags::goback
exit
I added a new command to call this function and tied it to ^[
Dave.
I know this is a bit off topic, but im guessing some of you are avid xcode users also. So here is my pickle, a couple of days ago the editor in xcode started to show normally invisible characters, like tabs and linefeeds, exactly like when you toggle the View->Show Invisibles in Textmate. But i can't for the life of me turn it off. The View->Text->Show Controll Characters does nothing. Ive done a complete reinstall and trashing all xcode prefs i could dig up, but no lucks so far. So has anyone a clue what might be the issue here?
Here is a screen of how it looks http://dl.dropbox.com/u/362683/Xcode.png
/Mikael
> This isn't exactly what you're looking for, but it might save you some time depending on the structure of the file. Go to View > Toggle Foldings at Level and try one of those.
Unfortunately that doesn't help in my case because the nodes I want to
fold are at several different levels.
Bruce
Hello:
I created a language grammar for the GI CP-1610 Assembly Language and I'm having trouble with getting code folding to work properly. I searched this list's archives and could not find an appropriate answer. The closest topic was a question by Abhi L, on Nov. 2009 regarding the same issue, which went unanswered.
The typical block pattern in this language is as follows:
; Procedure
LABEL PROC
;
; code
;
ENDP
; Record
LABEL STRUC
;
; constants
;
ENDS
Apparently, TextMate's code folding only works when the end marker occurs at the same indentation level as the start marker. Or something like that. I've experimented with a stock-included bundle, the one for Perl, and noticed the same behaviour:
# This folds properly in all brackets
sub foo
{
if (bar)
{
# code
}
# This block only folds if the bracket below
# is at the same indentation as its matching
# sibling.
}
# This does not fold
sub foo {
# code
}
Is there a way around this? If so, how? Below are the regexps I use for my language grammar:
foldingStartMarker = '(\s+(PROC|STRUCT)\b.*$)|(^MACRO\s+)';
foldingStopMarker = '^\s*(ENDP|ENDS|ENDM)\b';
Thank you in advance, cheers!
dZ.
Anyone having issues with TM, html validation via the built in feature?
It was working fine for me a few weeks ago, now it returns 1, 3 warnings... the output error is posted below.
I go to the official http://validator.w3.org/, and my pages validate w.out errors. Is this a bug of some sort, anyone
else having this issue?
I have Version 1.5.9 (1510)...
Validation Output: 1 Error
Line 1, Column 1: end of document in prolog✉
This error may appear when the validator receives an empty document. Please make sure that the document you are uploading is not empty, and report any discrepancy.
thanks,
bill
On Jun 12, 2010, at 7:00 AM, textmate-request(a)lists.macromates.com wrote:
> Send textmate mailing list submissions to
> textmate(a)lists.macromates.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.macromates.com/listinfo/textmate
> or, via email, send a message with subject or body 'help' to
> textmate-request(a)lists.macromates.com
>
> You can reach the person managing the list at
> textmate-owner(a)lists.macromates.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of textmate digest..."
>
>
> Today's Topics:
>
> 1. Re: TM2 (Adam Strzelecki)
> 2. Re: TM2 (Watts Martin)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 11 Jun 2010 18:25:04 +0200
> From: Adam Strzelecki <ono(a)java.pl>
> Subject: [TxMt] Re: TM2
> To: TextMate users <textmate(a)lists.macromates.com>
> Message-ID: <2C32BAEB-1AEF-4F76-AAEE-40C9D48A46C4(a)java.pl>
> Content-Type: text/plain; charset=us-ascii
>
>> I love TM that I have, but I would be lying if I didn't say I didn't poke around the other editors whenever a ugly bug rears its head and pisses me off.
>
> That's it. I neither need to have new shiny TM2, but want some bugfixes (Parsing improvement for long lines) and minor features requested long time ago (Soft-wrap indention). But the fact nothing is actually happening with TM1, and long standing requests makes me peek around once for a while for alternative editor.
> --
> Adam
>
> ------------------------------
>
> Message: 2
> Date: Fri, 11 Jun 2010 10:33:39 -0700
> From: Watts Martin <layotl(a)gmail.com>
> Subject: [TxMt] Re: TM2
> To: TextMate users <textmate(a)lists.macromates.com>
> Message-ID:
> <AANLkTilGJSC653h0l9b0Hg4idUn-R1DSwa1W1lxnkrPC(a)mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On Fri, Jun 11, 2010 at 9:25 AM, Adam Strzelecki <ono(a)java.pl> wrote:
>
> That's it. I neither need to have new shiny TM2, but want some bugfixes
>> (Parsing improvement for long lines) and minor features requested long time
>> ago (Soft-wrap indention).
>
>
> TextMate 1.5 is a great editor, but it's remained fundamentally the same for
> several years now. There are weird little bugs in TM that aren't being
> addressed (the "save a new file at the root directory" one, for instance),
> some useful features TM has never had (pane splitting) and some things that
> TM has just never done well at (handling large files and having many files
> open at once--both things that the old fogey of the Mac editing world,
> BBEdit, ironically handles really well). And other editors... well, aren't
> standing still. It's pretty clear that both Coda and Espresso are tacitly
> courting TextMate users, and I expect Coda 2.0 to be a really serious
> contender.
>
> I'm quite aware Allan doesn't have any interest in hearing "Dude, you gotta
> do this faster" any more," and that he still feels somewhat burned about the
> bad reaction TextMate 1.0 got in a lot of quarters. And, yeah, a buggy TM2
> public beta does risk a bit of that. On the flip side, though, there's a
> solid TM1 release that people can be pointed to, which wasn't the case the
> first time through: it's a lot safer now, in terms of perception, to let the
> public beta be a public beta. More importantly, it would give the TM
> community an opportunity to start working on new bundles that TM2's final
> release would have available right out of the starting gate.
>
> Okay, I'll stop now. :)
>
Hey guys,
I am trying to make use of the GetBundles package and I know that this is not the forum for questions/problems with that bundle but I think this may have something to do more with Textmate so bare with me.
GetBundles likes to keep the "Support" folder up-to-date. It checks out a version from "http://svn.textmate.org" namely the trunk version of Support. OK that's no problem on its own. But then once this gets pulled, I have a problem running Python scripts that run graphical interfaces. Namely I have a Tkinter app that works from the command line but when it runs the python icon just bounces on the dock and it just sits there.
I had this similar problem with LaTeX at one point but I updated to the newest version of the LaTeX bundle and it began to work again. I tried to update the Python bundle to the latest from git (textmate version _not_ the adamv fork) and that didn't fix the problem.
I figure its simply a matter that trunk is trunk and it's not necessarily supposed to work. I have resorted to using GetBundles and just deleting that updated Support directory. This seems to fix the problem.
--
Donald Ephraim Curtis
dcurtis(a)gmail.com