Hello,
I was wondering if that is possible. The symbol for variable in the language I
am working on is the "$" sign.
Would it be possible to add this after the word has been typed and have it added
in the beginning of the word? The same would go for the array symbol %,
strings array "!" etc..
So I would type "counter" and then decide if I want this to be a variable or an
array so depending if I type $ or % after that word it would end up being
$counter or %counter
Thanks in advance for any input.
Best,
John
Hello,
thanks, this works ok but now every time I have any {comment}, TM shows a down
fold arrow only (since there is no {/comment} obviously.
Is there a way to have the {block}...code...{/block} folding system
differentiate from regular {comments}
It could be something like:
{<block>}
{comment on code}
code
{comment on loop}
{<loop>}
loop
code
end
{</loop}
more code
{</block>}
Only the {<...>} ...... {</...>} would have folding markers and not the regular
{comment}.
Secondly regarding the language, there is no standard folding set but it would
be nice to set up keywords that would start and end folds in user defined paired
words like
function.... end function, if...end if, on init...end on, etc... Is that
possible?
Thanks in advance.
------------------------------
Message: 4
Date: Tue, 12 Jul 2011 13:01:25 -0700
From: Dru Kepple <dru(a)summitprojects.com>
To: TextMate users <textmate(a)lists.macromates.com>
Subject: [TxMt] Re: Custom Folding
Message-ID: <882B4362-5E89-413C-AA0A-BA1FD64670DB(a)summitprojects.com>
Content-Type: text/plain; charset="us-ascii"
A basic folding pattern could be set up like this:
foldingStartMarker = '\{([^\/]+)\}';
foldingStopMarker = '\{\/.+\}';
This won't be smart enough to match the text in between the curly braces, but as
long as you use the slash to mark an end comment, it should be pretty workable.
TextMate will handle nesting as you'd probably expect it to, so this:
{block}
code
{loop}
loop
code
end
{/loop}
more code
{/block}
Should fold as you'd want it to.
Do you have standard folding set up for the language? I don't know what
language you're using, but folding is usually set up for things like functions
and loops, so that's helpful, too. But I mention it because if you have to add
the above markers into an existing language grammar that already has markers set
up, you'll need to do them like this:
foldingStartMarker = 'otherMarker|\{([^\/]+)\}';
Note the vertical pipe in between the new addition and the existing marker;
that's the regex "or".
Also, worth noting that TextMate only matches folds if the start and stop
markers are at the same indent level, not merely if the marker is matched. You
might get some interesting folding results with the additions combined with
goofy indentation.
+dru
On Jul 12, 2011, at 11:12 AM, John Relosa wrote:
Hello,
Excuse my newbie question but I am trying to do custom folding in the language
that I am working on and can't figure out how.
Comments in this language start and end with { comment..... } Anything else is
compilable.
Is there a way to specify something like
{Start of code block}
code
.
.
.
.
{/End of code block}
Thanks
John
_______________________________________________
textmate mailing list
textmate(a)lists.macromates.com<mailto:textmate@lists.macromates.com>
http://lists.macromates.com/listinfo/textmate
-
I'm using TM mostly to edit web sites so lots of html files. Prior to TM I used XCode3's Organizer which I liked a lot but is no longer available in XCode 4. So I've switched to TM lately.
I keep finding garbage at the end of my files.
Stuff like
</script>
</body>
</html>
t('Got back auth_token: ' + json.auth_token); });
})
</script>
</body>
</html>
but TM doesn't show the stuff beyond the first </html> tag. Basically, it seems TM doesn't shrink file sizes correctly when writing them. Closing the file and re-opening it will reveal the mess at the end (as does my web browser :-( ) but I'm getting bitten by this bug a LOT. I'm using version Version 1.5.10 (1631) on Snow Leopard 10.6.8 (although it has been around for a few different versions of SL). No extra bundles or plugins beyond the standard install.
I'm kind of amazed that this kind of bug is hanging around in such a mature product. I can't be the first guy to find this?
-Todd Blanchard
Hello,
Excuse my newbie question but I am trying to do custom folding in the language
that I am working on and can't figure out how.
Comments in this language start and end with { comment..... } Anything else is
compilable.
Is there a way to specify something like
{Start of code block}
code
.
.
.
.
{/End of code block}
Thanks
John
Has anyone seen/made a command that would gather all open windows into a new project? This would be valuable for me, but can’t see the hooks so to do.
cheers,
tim
Hi,
I just noticed that when trying to insert a citation in latex via ALT+ESC in the latex bundle, this warning occurs.
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/ui.rb:177: warning: Insecure world writable dir /usr/local in PATH, mode 040777
What does this mean? Certainly I didn't set any permissions manually. I'm a little confused, the Finder says /usr/bin is 755.
Thanks for your help!
Hi all,
I'm trying to figure out the magic behind $ (the dollar sign) in LaTeX mode,
with no luck.
In LaTeX mode when, say, 2+2=4 is highlighted and the $ is pressed, $2+2=4$
is what you get.
Who (what command or code) does this task?
In general: How to discover the command performed by a shortcut? Is there a
way?
Many thanks in advance.
--
ßlue
--
View this message in context: http://old.nabble.com/How-to-discover-the-command-performed-by-a-shortcut--…
Sent from the textmate users mailing list archive at Nabble.com.
>
> Where may I post a bug or ask for support? I have an issue with keymap
> that I cannot solve but I hostly cannot find a way to get vendor support.
You've come to the right place.
I'm running a Ruby script from TextMate and within that script call a Perl script (gpsPhoto.pl) and would like to capture the error messages and act on them. The messages show up in the TM Running window.
An example of an error that appears in the TM Running window:
Use of uninitialized value $text in pattern match (m//) at /someFolderOnMyMac/gpsPhoto.pl line 3120.
Thanks for any ideas.
Greg