Howdy
I code in the K&R style. "the first opening brace on the same line as
control statement"
codeCodeCode {
Code...
}
My co-worker uses BSD/Allman style "the brace associated with a
control statement on the next line, indented to the same level as the
control statement"
codeCodeCode
{
Code...
}
We both have extremely strong feelings about our style. I have
decided to be diplomatic and use his style.
I want to be able to fold on the line before the opening brace "{" .
But I haven't been able to come up with a foldingStartMarker that
works for it.
My guess is that the foldingMarkers are stuck on single line mode.
Can anyone help? This is really starting to annoy me.
Thanks
thomas Aylott—subtleGradient—oblivious(a)subtleGradient.com
Hi,
I have the following rule for a block comment:
{ name = 'comment.block.active4d';
begin = '/\*';
end = '\*/';
patterns = ( { include = '#fusedoc'; } );
}
Within a block comment, the fusedoc rule looks for some xml:
fusedoc =
{ begin = '^\s*<fusedoc ';
end = '^\s*</fusedoc>';
patterns = ( { include = 'text.xml'; } );
}
The problem is that I want the text.xml language parser to parse the
line on which '<fusedoc ' is found. However, it seems that it will
only parse the lines between the begin and end lines.
Is there any way to have the first and last lines of the fusedoc rule
be parsed by text.xml?
Regards,
Aparajita
www.aparajitaworld.com
"If you dare to fail, you are bound to succeed."
- Sri Chinmoy | www.srichinmoylibrary.com
I'm using TextMate to keep my daily log book - I have a
'Journal' template, language and snippets and it all works
very nicely.
What I'd really like is that when I create a new file from
the template, it immediately gets a filename based on
the date - eg. 060418.txt - so I don't have to enter that
manually when I go to save it.
The template creates the new file in the usual way, by
copying some standard contents to $TM_NEW_FILE.
I was hoping that I might then be able to call osascript
and do something like
tell application "TextMate" to save the document
of front window in "060418.txt"
but it doesn't seem to work.
Any suggestions most welcome!
Hello everyone. I'm trying TextMate out and so far I'm very impressed.
But today I noticed this problem. Apologies if it's well known already:
When I am in overwrite mode (Cmd-Opt-O) and press an opening bracket,
TextMate avoids adding the closing bracket if it would overwrite a non-space
character. This is rather clever. However, when it decides there _is_ space
to add the closing bracket, it mistakenly *inserts* it rather than
overwriting. It kind of defeats the point of overwrite mode, and it's extra
annoying because you have to leave overwrite mode to delete the extra
character again!
Actually adding closing backets in overwrite mode is hardly ever useful,
because if you keep typing you immediately overwrite the closing bracket. My
suggestion would be for TextMate generated the closing bracket but allowed
you to keep typing and "pushed" the bracket to the right (until it reached a
non-space character or you typed the matching bracket). Of course the
pushing behaviour would only be right when you have just typed the opening
bracket.
r/
I promised I'd be back!
I'm working on a bundle for Erlang [1], a nice functional language
that focuses on multithreading and distributed programming. It's
mainly used in embedded programming of telephony equipment, but you
might have heard of ejabberd (a Jabber server written in — guess what
— Erlang). this is a first rough draft -- there's only a basic syntax
description. when it gets good enough I'll add it to the repository,
if you wish.
in order to improve it, I need some help on automated indentation.
this is a typical (small) Erlang module:
> -module(sample).
> -export([fact/1]).
>
> fact(0) ->
> 1;
> fact(N) ->
> N * fact(N - 1).
I'd like to increase indentation of the next line if the current line
ends with -> and decrease indentation of the next line if the line
ends with "." or ";". still, I wasn't able to tweak the prefs in
order to achieve this... (I tried and I tried, man, but I just wasn't
up to the task.) help? help?!? HEEEEEELP! ;)
ciao,
Domenico
---
[1] http://www.erlang.org/, http://www.erlang.se/
Hi,
If I'm not mistaken the pattern match for the second meta.tag.xml
rule is missing _ as a valid character for the attribute name. The
correct match should be:
match = ' (?:([-_a-zA-Z0-9]+):)?([_a-zA-Z-]+)'
Regards,
Aparajita
www.aparajitaworld.com
"If you dare to fail, you are bound to succeed."
- Sri Chinmoy | www.srichinmoylibrary.com
How does TextMate determine if a particular bundle is applicable to the
files I'm editing? I can insert snippets that are in the Ruby bundle, but
the Rails bundle snippets never expand when I hit tab.
Thanks,
Justin
I'm using TextMate a lot these days to write code for R and I'd like
to see if there's a way to make an improvement.
The existing command in the R bundle works fine as long as I'm
sending just a handful of lines to the R application, but TextMate
gives me the beach ball for as much as a minute when I send lots of
code over, and then suddenly dumps all the code into R. For
reference, here's the short R command:
osascript -e 'tell application "R" to activate' -e "tell application
\"R\" to cmd \"${TM_SELECTED_TEXT//\"/\\\"}\""
I'm guessing that TM itself doesn't have a problem with the amount of
text, and that the bottleneck is in the applescript. Is there any way
to speed up how this is done in the event of a large set of commands?
For example, could the command be split into an array and run line-by-
line? (Would this result in an increase in speed? I have no idea --
just thinking out loud.)
Thanks for suggestions. Cheers-
-Alan
Hi All
Version 1.5.1 (948) has been crashing for the past few days. i'm not
sure if its textmate or OS X as i updated both sometime during the week.
the crash seems to happen when i press "tab" in the find&replace window,
but not all the time.
thanks
/V