Hi,
I'm really new to TextMate, having recently converted to a bit of Ruby
development on the Mac. I'm interested in writing a bundle or some
commands to help me use a tool called Hackystat. You can check out a
few things about it here:
http://hackystat.ics.hawaii.edu/hackystat/docbook/ch05.html
Basically, it's a metrics collection server. It lets you install
small sensors to collect software metrics, like how long you worked on
a particular file. Since it's automatic it stays out of your way,
it's consistent, and it's reliable. Each user controls their own
metrics data.
I want to write a sensor to collect these metrics from TextMate. The
basics would be: 1) log when a new file is opened, 2) log when a file
is closed, and 3) every so often (30 seconds) log which file is in the
active window. Pretty simple.
I'd like to start a small command-line program from a TM command, but
I'd like to keep it open until TM is closed and send info to it
periodically throughout the TM session.
I've seen several items about launching command-line programs from TM,
but can I keep one open in the background? Does TM block until the
script finishes or can my Ruby script start another process and then
return and get back to that process later?
Can I intercept the File | Open actions and then record my metrics? I
haven't seen how to do this in other posts. There's a growing list of
tools that support Hackystat, including Emacs, Vim, Eclipse, and
VisualStudio. I'd love to add TextMate to that list.
http://hackystat.ics.hawaii.edu/hackystat/docbook/apa.html
Plese let me know if any of this is possible and where I can dig up
some documentation on it.
Thanks!
Tim
I'm having some trouble with the keybinding. It seems that in the
latest stable release (1.1b15) the keycombination ^u is hardcoded to
make current word uppercase. How can I change this? (it doesn't seem to
be in the keybinding file).
Regards,
Johan Kåhrström
I have made a colorpicker.. you can find your desired color
with max 5 clicks.
How to set it up in your TM.
Step #1
Save the attached 'colorpicker.xhtml' in your homedir.
Step #2
Menu -> Automation -> Run Command -> Edit Commands...
Step #3
In the left panel, select XHTML
Step #4
Below the left panel.. click the leftmost + then New Command
name the command 'Neoneye's Colorpicker'
Step #5
In the rightpanel.. set the following options:
Save: Nothing
Input: Nothing
Output: Show as HTML
Activation: Key Equivalent F13
Scope: source
Step #6
In the rightpanel.. insert the following line:
cat "/Users/simonstrandgaard/colorpicker.xhtml"
(or whatever absolute path you have)
Step #7
close the Bundle Editor.
hit F13
good luck
--
Simon Strandgaard
I'd just started using the Subversion bundle, and everything was
working great once I defined $TM_SVN except for the Log command,
which would complain that it couldn't find the svn binary.
Turns out that the problem is within the format_log.rb program; the
line defining $svn_url read as follows:
$svn_url = `svn info #{ENV['PWD'].quote_filename_for_shell}|grep URL|
cut -b6-`.chop
changing it to:
$svn_url = `#{ENV['TM_SVN']} info #{ENV
['PWD'].quote_filename_for_shell}|grep URL|cut -b6-`.chop
corrects the problem.
Not sure if this is documented yet, but I've been having problems
with files that are open in TM, and at the same time I edit their
name through the Finder. It seems that TM still works with the old
filename, and if I save it will save (a copy of) the file with the
old filename.
If the file is inside a folder and it is open in TM, and I rename the
folder, then TM asks me for my password (!!!) when I try to save the
file.
No particular error messages in the console.
Anyone else can reproduce this?
Haris
OK, considering the number of RoR users using TM and on this list, I
am throwing this whole thing out to the community to help and assist
with.
Over the past few weeks I've been working on the TM documentation
site (90% done), and has hacked a version of Hieraki to handle it.
I've done a variety of changes even though I'm a RoR newbie, but now
I'm a bit fed up with my limitations, and the time it takes for me -
as a newbie - to do the stuff. It's a good learning ground, but I'm
also completely out of time for doing this stuff, so I am hoping that
others are willing to help out as well.
Outstanding issues & problems:
1. Routing & URLs issues
This is 90% done, and the documentation now handles human readable
URL's like these:
a. URL: site.com/chaptertitle/
b. URL: site.com/chaptertitle/pagetitle/
c. URL: site.com/chaptertitle/subchaptertitle/
d. URL: site.com/chaptertitle/subchaptertitle/pagetitle/
Translated into TM doc's speek:
if we have a chapter called "Appendices" and a subchapter called
"RegExp" and then a page called "Overview" then the url becomes
site.com/appendices/regexp/overview/
The outstanding issues here are:
-- not all links are working fully/correctly
-- there's too many hacks in the code,
-- too much repeated code
-- may have issues in it that I've not thought off
2. Support for Markdown within Hieraki.
Allan prefers to work with Markdown code, and Hieraki does only
support Textile at the moment. I and many others (?) prefer Textile
so ideally the system should cater to both.
3. User comments System
Having the ability for user's to easily comment on existing
documentation is in my mind fundamental to good documentation, and
that's why I'm hoping for this feature to be added as soon as possible.
The following two points are more important really and are stuff that
I can't possibly do, so they really do need someone else to help out
with.
4. Code Checking
As a newbie, I'm sure to have done some bad stuff, so it needs
someone more knowledgeable to look through the code and confirming
it's solid & efficient.
5. Installation on Allan's TextDrive a/c and setting up issues.
You can see a basic working version - minus some of the latest
changes - on this URL: [ www.imediatec.co.uk/tmdocs/ ]
I have it all in a SVN a/c on TextDrive, so I can easily open it up
for you to work on and commit your changes to.
So please take some time to help out !!
Worst come worst, I'd be grateful IF I could just have a few people
to ask for help from as and when I need it. Yes, I'm on the RoR IRC
and ML, and although I've been helped there, it's not always
convenient and fast.
OK, I'm sure some of you will say "why a hacked version of Hieraki ?
Why not ....?" and so on. Hieraki did the vast majority of what was
needed, but had some limitations, like no single page display (done),
no search (done) and it was easy to make it look and work like the
new design style of the Macromates site (due to be public later on
this year).
Kind regards,
Mats
----
"TextMate, coding with an incredible sense of joy and ease"
- www.macromates.com -
Is there any timeline for Subversion integration in Textmate? I'm
sure this has been discussed before, but I couldn't find any solid
information.
Thanks,
Bryce
In order for the system caret to move with pageup/down, I use this in
my Keybindings file
"\UF72C" = "pageUp:"; /
* Page Up */
"\UF72D" = "pageDown:"; /
* Page Down */
This works all and well, but is it possible to get smooth scrolling
with it to? If i remove these lines, I get smooth scrolling but the
caret won't move (actually, textpad gives smooth scrolling).
Also, I'd like tab to indent/outdent lines of selected code, but
"\U0009" = "indent:"; /
* Tab */
seems to do nothing (actually, it does do something, it completely
disables tab in textpad).
as always, thankful for assintance
Andreas
This was my first stab at editing a language
definition. I tried to add "COPY" support as well,
but couldn't get it to work for whatever reason. This
version supports most keywords in the spec. I'll try
and add better stored procedure/function support as
well as get copy working and respam.
'njoy,
Mark
{ scopeName = "source.sql";
fileTypes = ( "sql", "ddl", "dml" );
foldingStartMarker = "\\s*\\(\\s*$";
foldingStopMarker = "^\\s*\\)";
patterns = (
{ name = "declaration.create.sql";
match =
"(?i:^\\s*(create)\\s+(aggregate|conversion|database|domain|function|group|(unique\\s+)?index|language|operator|operator
class|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\s+)(\\w+)";
captures =
{ 1 = { name = "keyword.function.create.sql"; };
2 = { name = "keyword.other.sql"; };
4 = { name = "entity.name.function.sql"; };
};
},
{ name = "keyword.other.DDL.create.II.sql";
match = "(?i:\\s+(on\\s+|(not\\s+)?null)\\b)";
},
{ name = "declaration.drop.sql";
match =
"(?i:^\\s*(drop)\\s+(aggregate|conversion|database|domain|function|group|index|language|operator|operator
class|rule|schema|sequence|table|tablespace|trigger|type|user|view))";
captures =
{ 1 = { name = "support.function.create.sql"; };
2 = { name = "keyword.other.sql"; };
};
},
{ name = "declaration.drop.sql";
match =
"(?i:\\s*(drop)\\s+(table)\\s+(\\w+)(\\s+cascade)?\\b)";
captures =
{ 1 = { name = "support.function.create.sql"; };
2 = { name = "keyword.other.table.sql"; };
3 = { name = "entity.name.function.sql"; };
4 = { name = "keyword.other.cascade.sql"; };
};
},
{ name = "declaration.alter.sql";
match =
"(?i:^\\s*(alter)\\s+(aggregate|conversion|database|domain|function|group|index|language|operator|operator
class|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\s+)";
captures =
{ 1 = { name = "support.function.create.sql"; };
2 = { name = "keyword.other.table.sql"; };
};
},
{ name = "keyword.other.DML.sql";
match =
"(?i:^\\s*([\\(]{0,}select(\\s+distinct)?|insert\\s+into|update|delete|from|where|group\\sby|and|union(\\s+all)?|having|order\\sby)\\b)";
},
{ name = "keyword.other.DML.II.sql";
match = "(?i:\\s+values\\s+)";
},
{ name = "keyword.other.sql.LUW.sql";
match =
"(?i:(begin(\\s+work)?|commit(\\s+work)?|rollback(\\s+work)?))";
},
{ name = "keyword.other.authorization.sql";
match =
"(?i:(grant(\\swith\\sgrant\\soption)?|revoke))";
},
{ name = "storage.type.sql";
match =
"(?i:^\\s*([A-Za-z0-9'_])+\\s+(bigint|bigserial|bit|bit\\svarying\\(\\d+\\)|boolean|box|bytea|character\\s(varying)?\\(\\d+\\)|char\\(\\d+\\)|var\\schar\\(\\d+\\)|cidr|circle|date|double\\sprecision|inet|int|integer|interval\\(\\d+\\)|line|lseg|macaddr|money|numeric(\\(\\d+,\\d+\\))?|oid|path|point|polygon|real|smallint|serial|text|times(\\(\\d+\\))(\\swithoutstimeszone)?|timestamp(s(\\(\\d+\\))(\\swithoutstimeszone)?)?|varchar(\\(\\d+\\))?)\\s*)";
},
{ name = "storage.modifier.sql";
match =
"(?i:\\b(primary\\s+key|references|on\\sdelete(\\s+cascade)?|check)\\b)";
},
{ name = "keyword.other.data-integrity.sql";
match = "(?i:\\bin\\b)";
},
{ name = "string.quoted.single.sql";
begin = "'";
end = "'";
swallow = "\\\\.";
},
{ name = "keyword.other.object-comments.sql";
match =
"(?i:^\\s*(comment\\s+on\\s+(table|column|aggregate|constraint|database|domain|function|index|operator|rule|schema|sequence|trigger|type|view))\\s+.*?\\s+(is)\\s+)";
},
{ name = "comment.line.double-dash.sql";
match = "--.*$";
},
{ name = "string.quoted.double.sql";
begin = "\"";
end = "\"";
patterns = (
{ name = "string.interpolation.sql";
match = "#\\{([^\\}]*)\\}";
}
);
},
{ name = "string.quoted.double.sql";
begin = "%\\{";
end = "\\}";
patterns = (
{ name = "string.interpolation.sql";
match = "#\\{([^\\}]*)\\}";
}
);
},
{ name = "string.regexp.sql";
begin = "/(?=\\S.*/)";
end = "/";
patterns = (
{ name = "string.interpolation.sql";
match = "#\\{([^\\}]*)\\}";
},
{ name = "string.escaped-slash.sql";
match = "\\\\/";
},
);
},
{ name = "string.regexp.modr.sql";
begin = "%r\\{";
end = "\\}";
patterns = (
{ name = "string.interpolation.sql";
match = "#\\{([^\\}]*)\\}";
},
{ name = "constant.character.escaped.slash.sql";
match = "\\\\/";
},
);
},
);
increaseIndentPattern =
"^\\s*(create|grant|insert|delete|update)\\s*";
}