Hi Allan.
I started a new DRYML bundle (actually a.t.m. it's just a simplistic
language definition) and some other Hobo users thought it would be
nice to start a small DRYML bundle (anyone interested can see get it
at the Hobo forum). What would be the procedure to get the bundle
into TMs bundle repository?
And related Thomas: What happend to bundleforge?
Kind regards, Niko.
--
____________________________
niko dittmann <ni-di(a)web.de>
____________________________
On my MacBook (running ghc-6.6 and OS X 10.4), when I select "Load in
GHCi", nothing happens.
Any clue as to what's wrong, or anyone else experience this problem?
Thanks,
Edwin Chen
Hi,
TextMate's HTML syntax coloring seems to be based on rules while
other coloring schemes (e.g. CSS, PHP) are based on keywords.
Here's an example with syntax errors:
<style type="css">
table
{
broder:1px solid #000;
}
</style>
<p stlye="width:100px">foo bar</p>
So, TexMate will display the 'broder' NOT colored (because it's a
syntax error) which shows me that TextMate uses keywords here.
But it WILL display the 'stlye' colored (using the "Markup tag
attribute" color) because it is placed where a attribute has to
be... but of course, it's no valid HTML attribute.
So, my question is: Is there any way to get TextMate to use a keyword
list for HTML coloring as well - so it will use the default text
color for 'stlye' making me realize that it's a typo?
Kind regards,
Tobias Jung
Haris Skiadas wrote:
>
> On May 27, 2007, at 6:40 AM, Daniel Sönnerstedt wrote:
> > LaTeX - Insert Label Based On Current Word
> >
> > I didn't get this feature to work on my project. I experimented a bit
> > and it seemed like the script was having troubles dealing with
> >
> > \include{"filename.tex"}
> >
> I actually have tried using filenames this way, and I find that LaTeX
> doesn't process the corresponding file, unless you remove the .tex
> part in the above line. Is there some package you need to use to make
> this work with the .tex part?
You're right. I wasn't thinking when I wrote the example code. Of
course it actually should say
\include{"filename"}
> I'll commit your patch.
>
Great. I bought TextMate yesterday after trying it out for a few
weeks, and I'm already contributing. This is fun.
> > but not with
> >
> > \include{filename.tex}
> >
> > I use this since I have filenames with spaces. So I skimmed through
> > the code and added a small fix in LaTeXUtils.rb:
> >
> > def find_file(filename, extension, relative)
> > filename.gsub!(/\.#{extension}$/,"")
> > [...]
> > end
> >
> > became
> >
> > def find_file(filename, extension, relative)
> > filename.gsub!(/\"/,"") # Added this
> > to strip ":s
> > filename.gsub!(/\.#{extension}$/,"")
> > [...]
> > end
> >
> > And now it works!
> >
> > Now, I'm not a ruby programmer so there's is probably some better way
> > to solve this. But I think that this fix should benifit others;
> > perhaps implemented in a more proper way though.
> >
> > Thanks for another great LaTeX-bundle-feature.
> >
> > Regards,
> > Daniel Sönnerstedt
>
> Haris Skiadas
> Department of Mathematics and Computer Science
Daniel Sönnerstedt
Quicksilver has application activation very similar to TextMate's
ability to move between files, i.e. press an activation key to
activation, and then type a sequence of characters that appear (in that
order) with the application name (not necessarily sequentially). Is it
possible to activate TextMate commands (built-in and custom) in this way?
Thanks,
Ken
LaTeX - Insert Label Based On Current Word
I didn't get this feature to work on my project. I experimented a bit
and it seemed like the script was having troubles dealing with
\include{"filename.tex"}
but not with
\include{filename.tex}
I use this since I have filenames with spaces. So I skimmed through
the code and added a small fix in LaTeXUtils.rb:
def find_file(filename, extension, relative)
filename.gsub!(/\.#{extension}$/,"")
[...]
end
became
def find_file(filename, extension, relative)
filename.gsub!(/\"/,"") # Added this to strip ":s
filename.gsub!(/\.#{extension}$/,"")
[...]
end
And now it works!
Now, I'm not a ruby programmer so there's is probably some better way
to solve this. But I think that this fix should benifit others;
perhaps implemented in a more proper way though.
Thanks for another great LaTeX-bundle-feature.
Regards,
Daniel Sönnerstedt
I may be asking a few overly simple questions as, due to work pressure,
I only had time to really look at TextMate seriously just a bit before
trial mode expired.
1) I know that (using the great Key Binding Editor facility), I can bind
emacs-style multikey sequences to os x editing actions. Can I bind
multikey sequences to TextMate macros or scripts?
2) When editing text files in bundles, is it possible to bring up the
file directly in a normal textmate window, rather than in the 'bundle
editor window'? Copying and pasting back and forth seems sorta
pointless, for the most part.
Thanks, maybe some more questions later,
Ken
P.S. what's the best solution for making the caps lock behave like
ctrl--DoubleKey? It'd doesn't seem to work on my external keyboard
(hangs the keyboard), but maybe because that's because I have
Quicksilver installed.
Is there a way for me to take over the Standard ML bundle? I have
made some significant improvements.
On May 24, 2007, at 7:00 AM, textmate-request(a)lists.macromates.com
wrote:
>> Is there anyone actively maintaining the Standard ML bundle?
>
> No -- for the records, you can =93svn log=94 the bundle to see what
> =20
> activity it has seen, and the =93info.plist=94 in the bundle shows
> who=92s=
> =20
> the maintainer (and his contact email).
>
> For the ML bundle it is Sune, but he only used it for a university =20
> project, so it never evolved beyond the initial grammar and a run =20
> command.
Hi
If I mark
my 2xG5 does a bell sound when switching to terminal (or other
application). It does not occur in my PowerBook G4...
It is a bit inconfortable but I now can't live with this option!!
-----
Juan F.
Hi!
Any idea how I can find out why ctrl+esc won't open anymore bundle
items menu anymore but does nothing (it's quite for a long time now
but today I got curious ;) ).
Searching for it in the "select bundle item"-menu didn't bring up any
results.
Niels
TextMate shows the current line that contains the cursor by
highlighting the entire line. I like this because it makes finding the
cursor easy when I come back to a TextMate window.
But it gets short circuited by Find which highlights the found text,
but removes the "whole line highlight". Consequently, it takes more
effort to find where the selection/cursor jumped to upon finding text.
My request is that selecting text within a line would retain the
"whole line highlight".
-Chuck
Hi list!
Is there a way to open a textarea in textmate? Maybe with an extension
for Firefox? Cause I want to edit the textarea in a html-editor like
Textmate, editting HTML in a textarea drive me crazy.
--
Met vriendelijke groet,
Reinier Ladan
Digital Energy BV
W: www.digitalenergy.nl
T: +31624872725
E: reinier(a)digitalenergy.nl
Zin in een enorme lading web 2.0? Check uwbatterij.nl
DISCLAIMER
===========
De informatie verzonden met dit e-mailbericht is uitsluitend bestemd
voor de geadresseerde(n). Gebruik van deze informatie door anderen dan
de geadresseerde(n) is verboden. Openbaarmaking, vermenigvuldiging,
verspreiding en/of verstrekking van deze informatie aan derden is niet
toegestaan. Digital Energy BV staat niet in voor de juiste en
volledige overbrenging van de inhoud van een verzonden e-mail, noch
voor tijdige ontvangst daarvan. Wij raden u aan e-mail berichten bij
ontvangst op virussen te controleren. De verzender kan, ondanks
voortdurende controle, niet instaan voor het virusvrij verzenden van
e-mail berichten.
So I happened to notice that when I use the Shell Script bundles
"Open Terminal" that my project environment variables don't appear.
According to this tech note:
http://developer.apple.com/technotes/tn2002/tn2065.html
osascript (which is what the "Open Terminal" command uses to tell
Terminal.app to open a window) passes its environment along, which
contains the project variables.
Is this a limitation of using "do script" instead of "do shell script"?
The only work around I can think of is to explicitly set the
environment variables inside the "do script" (possibly exporting all
the variables to a temporary file and then sourcing that file inside
the "do script"). That seems icky for a variety of reasons.
Thoughts?
j.
Dear All,
Is there anyway to "tie" actions in other applications to actions in
Textmate? For example, I'd like the opening of a new file in Textmate
(by the file menu or input manager) to also initiate my timer program
(through an applescript, probably).
Is this possible?
Thanks,
Zvi Biener
Thanks everybody.
It looks like for the time being I'll just make a bundle command to
start the timer, and have to launch it myself. If you develop
something for this, Cliff, do let me know!
Best,
Zvi
> On May 23, 2007, at 1:57 PM, Brooks Seymore wrote:
>
>> Could this also be done through a Bundle Command, with the new
>> document created and the timer launched by running the command?
>>
>> B.
>
> Yeah, you can trigger a Applescript when you run a bundle command
> or even include run it from the script used when creating a file
> from a template so creating a new file would start the timer, but
> then you wouldn't be able to log time if you were just editing
> existing files.
>
> I haven't had time to look into it for myself, but does anyone else
> know if you can just use launchd to watch a TextMate related file
> for changes, say, the TextMates preferences for example? If the
> file is modified you can assume you're working with TM & then start
> your timer? I know launchd can monitor paths, but I don't know if
> TM alters its prefs file on disk when its running or just when it
> shuts down or what. If so it'd maybe work to use launchd to watch
> the prefs file and run a script. The script could even maybe use
>
> defaults read com.macromates.textmate NSRecentDocumentRecords
>
> to examine what documents were last opened / saved and mess with
> your timer accordingly, though you'd have to translate them from
> alias references (or whatever the heck the prefs file stores) to
> paths somehow. Thats beyond me at the moment.
>
> I'm just tossing out ideas...
>
> - Cliff
> De: Jacob Rus <jacobolus(a)gmail.com>
>
>
> Juan Falgueras wrote:
>
>> ....but, why it doesn't colour when you give it selections? ehmmm
>> I usually need to cut functions, etc...
>> but anyway the Brad Choate solution is much much better than the
>> enscript one. Thanks
>> Is there some trick for make B. Choate script to colour portions
>> of text?
>>
>
> You're going to have to explain what you're having trouble with. I
> have no trouble turning selections to html with that command...
>
Yes. If you select a slice of your source code like...
-------
int main(){
TpNumero numero;
if (LeerCadena(numero)){
cout << "La cadena es correcta: " << numero << endl;
ImprimeDisplay(numero);
}
return 0;
}
--------
you get:
---------
<pre class="textmate-source"><span class="source source_c++">
<span class="storage storage_type
......
</span></pre>
--------
without the definitions of styles.. and the the rendering of this
html is uncoloured...
You need to select ALL the source text to get the full html with
colour styles, etc.
If you do so, the generated html starts with all the necessary styles:
-------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>displayNum.cpp</title>
<style type="text/css">
/* Stylesheet generated from TextMate theme
*
* VERDE
*
*
*/
/* Mostly to improve view within the TextMate HTML viewer */
body {
margin: 0;
padding: 0;
}
pre.textmate-source {
margin: 0;
padding: 0 0 0 2px;
font-family: ProFont, monospace;
........
---------------
Hi
I used to need pretty print my C++ code for students and I have found
the next simple script solves my problem in a cute way, since it
shows me the formatted code in a separate window (output "Show as
HTML") and then I can easily copy the source (Cmd-Opt-U) or the
styled text (copying directly from the output window):
----- input "Selected text" or "Document"
echo "<PRE>"
enscript --language=html -Ecpp -e -B --color \
--header="$TM_FILENAME|$E|pag. $% de $=" --title="$TM_FILENAME" \
-o- 2>/dev/null | \
perl -ne 'next if (1../<PRE>/i); last if (m|</PRE>|..1); print'
echo "</PRE>"
------ output "Show as HTML"
--- Save nothing, source.c
I would like to generalize it for it to be used with other source
code, not only C, what should be the better way? to have a table
mapping modes with enscript input modes... ?
Any help will be welcome.
--
Juan F.
Thanks Dougal, it is very impressive, really.
...but, why it doesn't colour when you give it selections? ehmmm
I usually need to cut functions, etc...
but anyway the Brad Choate solution is much much better than the
enscript one. Thanks
Is there some trick for make B. Choate script to colour portions of
text?
Thanks!
> De: Dougal <dougal(a)gmail.com>
> Fecha: 22 de mayo de 2007 01:59:38 GMT+02:00
> Para: "TextMate users" <textmate(a)lists.macromates.com>
> Asunto: Re: [TxMt] html pretty print
> Responder a: TextMate users <textmate(a)lists.macromates.com>
>
> Have you tried "Create HTML from Document / Selection" in the
> TextMate bundle?
>
> On 5/21/07, Juan Falgueras < jfalgueras(a)uma.es> wrote:
>
> Hi
>
> I used to need pretty print my C++ code for students and I have found
> the next simple script solves my problem in a cute way, since it
> shows me the formatted code in a separate window (output "Show as
> HTML") and then I can easily copy the source (Cmd-Opt-U) or the
> styled text (copying directly from the output window):
>
> ----- input "Selected text" or "Document"
> echo "<PRE>"
>
> enscript --language=html -Ecpp -e -B --color \
> --header="$TM_FILENAME|$E|pag. $% de $=" --title="$TM_FILENAME" \
> -o- 2>/dev/null | \
> perl -ne 'next if (1../<PRE>/i); last if (m|</PRE>|..1); print'
>
> echo "</PRE>"
> ------ output "Show as HTML"
> --- Save nothing, source.c
>
>
> I would like to generalize it for it to be used with other source
> code, not only C, what should be the better way? to have a table
> mapping modes with enscript input modes... ?
>
> Any help will be welcome.
>
>
> --
> Juan F.
I am having trouble figuring out the spreadsheet bundle. Suppose I have the
following table:
|name |foo |bar |total |
|mike | 1 | 2 | |
How do I calculate the total?
>From the screencasts, I think I should have this line:
% A3 := SUM(A1:A2)
Then what do I need to do to get the cell to display the value?
Mike
I recently added support for .rcss files to my Ruby on Rails project, those
being the equivalent of .rhtml, but for stylesheets. I've been trying to make a
grammar that gives me all the nice ERB autocompletion and syntax coloring that
exists for .rhtml files, but seem to be running into issues with the scope
selectors.
My grammar, based on th HTML (Rails) one is here: http://pastie.textmate.org/63540
Using that, I get proper syntax coloring for embedded Ruby if I use it at the
root level, but I still don't get autocomplete. And inside a CSS selector, I
can't get anything.
The output I'm getting: http://pastie.textmate.org/63543
Is there a way to specify conditional scope within a grammar? It seems like once
it hits the CSS selector, it doesn't recognize ERB anymore.
I've made a command which will list all colours in a CSS file as a list of
swatches.
At the minute it only does Hex colours also I would like it if you could
click
colours and it would jump to them in your document but I lack the ruby
skills as I'm sure you will notice from the shoddy
"colourArrayToTrim.each" bit.
Anyway some people might find it useful
input:entire document
output:show as HTML
activation:Key cmd+shift+opt+ctrl+c (ALL modifiers + C, to show ALL
colours ;) )
scope: source.css
Code as follows:
#!/usr/bin/env ruby
file = STDIN.read
fileName = ENV['TM_FILENAME']
hex = Regexp.new(/(#(\d|[a-f]|[A-F]){3,6})/)
colourArrayToTrim = file.scan(hex)
colourArray = []
colourArrayToTrim.each { |colour|
colourArray.push colour.shift
}
puts '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Colours</title>
<style type="text/css" media="screen">
a {
color: #000;
text-decoration: none;
line-height: 22px;
border: 1px solid #fff;
padding: 2px;
}
a:hover {
background-color: #EFEFEF;
border: 1px solid #999;
}
.colourRow {
display: block;
margin-top: 5px;
margin-bottom: 5px;
width:160px;
margin-right: 10px;
float:left;
}
.swatch {
width: 20px;
height: 20px;
display: block;
border: 1px solid #666;
margin-right: 10px;
float: left;
}
.swatch div {
width: 18px;
height: 18px;
border: 1px solid #fff;
}
</style>
</head>
<body>'
puts "<h2>Colours used #{fileName}</h2>"
colourArray.each { |colour|
puts "
<a href='' class='colourRow'>
<div class='swatch'>
<div style='background-color:#{colour};'></div>
</div>
#{colour}
</a>
"
}
puts "
</body>
</html>
"
Hi,
Just wondering how I go about altering the setup to have folding
block comments in a PHP file? I only need to fold doc-block type
comments which I see have been designated as effectively ^/**$ - I'm
not worried about blocks within functions. My doc comments can be
quite voluminous, and it's frustrating seeing huge swathes of
comments and little class xxxx {... stubs when I want to get an over
view of the entire file...
;-)
R
Hi,
I'm experiencing some trouble running the auto-reload feature of Skim.
It seems that Skim doesn't wait for the pdf to be closed by the TxMt
command.
Looks like it was trying to reload the file as soon as a single bit
is added to it, imho.
What's more, a warning popup tells me Skim is "Unable to open the
file", but when TxMt is done compiling (displaying the # of errors
and warnings in the output window), I can reload the file successfully.
Have you ever noticed such a behaviour, Skim users?
Any ideas of workarounds?
Xavier Cambar
I use the Diff bundle a lot. I regularly do a 'svn diff | mate'
command prior to check-ins. One of the things I typically do with
larger sets of files is collapse all the diffs so there is one file
per line. I can then examine each group of changes, and once happy
with the review (or as they get committed), I will delete the
collapsed "line".
This is a tedious process because the foldings for a diff are not
automatically done for me. This is one of many cases I've found where
the folding separators cannot be described properly since the close
of the fold is not a match for anything in particular, just the fact
that a new fold is starting. (Another such case is for Markdown-- I'd
like to provide foldings for the "# ..." header, down to the next
available "# ..." header, but I can't express that.)
So what I do is start at the top of the file, then hit Option+Shift
+⇣ which will select just that one file's diff somehow (I haven't
investigated how TextMate knows to skip down to the next "Index..."
line like that. Does it do so based on the lines identified as
separators?). Then I hit ⌘+F1 to fold the selection.
Again this is very tedious, especially for a large diff. I would be
very happy if someone found a way to automate this process. Ideally,
it should be possible to describe a folding marker whose end is
identified by the start of a new fold, but I don't think it's
possible today.
-Brad
Hi,
Just wondering how I submit some snippets for the PHP bundle? They're
small, but I'm using them all the time.
( ${2:'$1'}=>${4:'$3'},$0
tab-triggered on (,
and the more general
, ${2:'$1'}=>${4:'$3'},$0
tab-triggered on ,,
They make typing hashed lists really very much quicker for me.
Or am I missing an altogether quicker way?
R
--
Richard Dyce MA (Cantab.) MBCS MIET
http://dyce.com
Hello all,
When I try to run the patch documented at http://macromates.com/wiki/
Blogging/WordPress, I get the following error:
burt:~/Desktop michael$ patch < wp-xmlrpc-mw-gmt-patch
patching file xmlrpc.php
Hunk #1 FAILED at 669.
Hunk #2 FAILED at 740.
2 out of 2 hunks FAILED -- saving rejects to file xmlrpc.php.rej
I'm assuming this means that my file is not patched correctly. I'm
running the latest Wordpress (2.2) but I'm not aware of any changes
that were made to the xmlrpc.php file from previous versions. Here is
what comes up in the xmlrpc.php.rej file (sorry for all the code)...
***************
*** 669,675 ****
if ($postdata['post_date'] != '') {
- $post_date = mysql2date('Ymd\TH:i:s', $postdata['post_date']);
$categories = array();
$catids = wp_get_post_cats('', $post_ID);
--- 669,686 ----
if ($postdata['post_date'] != '') {
+ /* BEGIN PATCH */
+ /* Convert post_date to GMT so receiving applications can
+ safely adjust it to the user's local time zone.
+ Using post_date_gmt instead of post_date does *not* work,
+ since it is (wrongly) adjusted for the gmt_offset *twice*. */
+ /* Old code:
+ $post_date = mysql2date('Ymd\TH:i:s', $postdata['post_date']); */
+ $post_date = mysql2date('Y-m-d H:i:s', $postdata['post_date']);
+ $post_date = get_gmt_from_date($post_date);
+ $post_date = str_replace('-', '', $post_date);
+ $post_date = str_replace(' ', 'T', $post_date);
+ /* END PATCH */
$categories = array();
$catids = wp_get_post_cats('', $post_ID);
***************
*** 729,736 ****
}
foreach ($posts_list as $entry) {
-
- $post_date = mysql2date('Ymd\TH:i:s', $entry['post_date']);
$categories = array();
$catids = wp_get_post_cats('', $entry['ID']);
foreach($catids as $catid) {
--- 740,759 ----
}
foreach ($posts_list as $entry) {
+
+ /* BEGIN PATCH */
+ /* Convert post_date to GMT so receiving applications can
+ safely adjust it to the user's local time zone.
+ Using post_date_gmt instead of post_date does *not* work,
+ since it is (wrongly) adjusted for the gmt_offset *twice*. */
+ /* Old code:
+ $post_date = mysql2date('Ymd\TH:i:s', $entry['post_date']); */
+ $post_date = mysql2date('Y-m-d H:i:s', $entry['post_date']);
+ $post_date = get_gmt_from_date($post_date);
+ $post_date = str_replace('-', '', $post_date);
+ $post_date = str_replace(' ', 'T', $post_date);
+ /* END PATCH */
+
$categories = array();
$catids = wp_get_post_cats('', $entry['ID']);
foreach($catids as $catid) {
Can anybody diagnose this problem? I would appreciate it very much.
Thanks!
Michael
P.S. Great work on the blogging bundle! I love it!
Consider the following code:
=================
#include <Cocoa/Cocoa.h>
#include "MyClass.h"
@implementation MyClass
- (id) init
{
return self;
}
#ifndef _DEMO_
- (void) setSerialNumber: (NSString *) aSerialNumber
{
serialNumber = [aSerialNumber copy];
}
#endif
- (NSString *) description
{
return @"A MyClass";
}
@end
=================
The name of the method setSerialNumber: is not highlighted, and it
does not appear in the function popup. Removing the #ifndef cures
both problems.
Is there something I can do? Is there a later version of the Obj-C
bundle that covers this?
— F
Hari, you might be able to easily answer this, but I'm posting this
question here in case someone else knows as well...
I'm trying to typeset a document entirely in Greek. Document body,
section/chapter headers, everything. I have TeXniscope installed,
using teTeX (and relevant packages) installed through macports.
\usepackage[utf8]{inputenc} at the top produces errors for every
character in the document, in the form of:
./untitled.tex:50: Package inputenc Error: Unicode char \u8:Δ not set
up for us with LaTeX.
etc. I definitely came across this problem before, but I don't
remember if I eventually solved it or if I found it couldn't be
solved... Anything I can try to resolve this? (or typeset everything
in... ugh.. M$ w*rd??)
Thanks,
Constantinos
--
What's your Dream?
Make it happen with www.dostpost.com
Has anyone created an upload command when mp3s are dragged onto a
document? This would be a great podcasting feature for the blogging
bundle.
Thanks,
Graham English
I have noticed that if I set Line Endings to "CRLF (Windows)" (when
collaborating with windows people), line endings are correctly
translated to windows style. I forgot to set Textmate back to Unix
standard (LF), opened a text file, and when I next saved it it had
CLRF line endings. When I changed Textmate back to LF mode, the line
endings stayed as CRLF. Even if I delete then re-do all the
linebreaks, they are still CLRF. I need to get this sorted right
away, so I have used Fink to install dosunix to convert these
"CRLFed" documents.
Is this a bug in TextMate? It would be nice if there was some way to
set the line endings by file, rather than having an app wide setting.
Also, it would be great if this could be put in a bundle (LF->CRLF
and vice-versa).
Thanks,
Nick Forge
Hi All,
I am trying to use FileMerge for the 'Diff with...' commands in the
Subversion bundle.
The help file says to set $TM_SVN_DIFF_CMD to fmdiff. I guess that
should be fmdiff.sh, which needs to be downloaded and installed first
from elsewhere (help should mention that).
Anyhow after I did set that up and run a diff, it does open in
FileMerge, but the "Accessing Subversion Repository" panel in
TextMate sticks around until FileMerge is quit. Am I doing something
wrong, or is that a problem with the bundle?
Thanks
Gerd
Hello,
while testing mercurial I noticed that the diff commands in the
Mercurial Bundle behave differently than what I'm used to from the svn
bundle.
When I select a folder in the drawer and issue any diff command using
the subversion bundle, I get a diff for all files under that selected
folder.
The mercurial diff commands always use the currently active file in the
diff commands.
Changing the hg_diff.rb file enables me to select a folder and get a
diff for everything under it:
@@ -6,7 +6,7 @@
module Mercurial
def Mercurial.diff_active_file( revision, command )
hg = ENV['TM_HG'] || 'hg'
- target_path = ENV['TM_FILEPATH']
+ target_path = ENV['TM_SELECTED_FILE'] || ENV['TM_FILEPATH']
work_path = ENV['WorkPath']
path = target_path.sub(/^#{work_path}\//, '')
output_path = File.basename(target_path) + ".diff"
(patch is attached)
While I'm here .. I had to change all diff commands do something like
(
"${TM_RUBY:=ruby}" -I "$TM_BUNDLE_SUPPORT/" <<END
require 'hg_diff'
Mercurial::diff_active_file("-r$rev2 -r$rev1", "Diff Revisions…")
END
) | iconv -t UTF-8 -c
since without the iconv call I'd get empty diff windows (probably
because of incorrectly encoded german special chars inside the generated
diff) -- but I'm not shure if this is just a local problem.
Bye,
Eike
Index: /Library/Application Support/TextMate/Bundles/Mercurial.tmbundle/Support/hg_diff.rb
===================================================================
--- /Library/Application Support/TextMate/Bundles/Mercurial.tmbundle/Support/hg_diff.rb (revision 7253)
+++ /Library/Application Support/TextMate/Bundles/Mercurial.tmbundle/Support/hg_diff.rb (working copy)
@@ -6,7 +6,7 @@
module Mercurial
def Mercurial.diff_active_file( revision, command )
hg = ENV['TM_HG'] || 'hg'
- target_path = ENV['TM_FILEPATH']
+ target_path = ENV['TM_SELECTED_FILE'] || ENV['TM_FILEPATH']
work_path = ENV['WorkPath']
path = target_path.sub(/^#{work_path}\//, '')
output_path = File.basename(target_path) + ".diff"
I'd love to have a command that can put the current symbol on the
clipboard, and this would be short-work if the current symbol where
available via a TM_* variable, but I'm not seeing it.
My particular use case is Python and I'd like to be able to easily
construct "<module>.<class>.<method>" or "<class>.<method>".
I see no way of getting this information, short of writing a python-
specific parser to grab it (using TM_LINE_NUMBER to figure out where
the cursor is). Am I missing something?
j.
I have a user of my FlickrMate bundle getting the following error...
error 63 (File name too long) opening sem /tm_dialog async/
> nilsborchers/4.
> tm_dialog (async_update): Window '4' doesn't exist
> /Applications/TextMate.app/Contents/SharedSupport/Support/lib/
> dialog.rb:83:in /bin/bash: -c: line 1: unexpected EOF while looking
> for matching `''
> /bin/bash: -c: line 4: syntax error: unexpected end of filecall'
> from /Applications/TextMate.app/Contents/SharedSupport/
Support/lib/
> progress.rb:36:in /bin/bash: -c: line 1: unexpected EOF while
> looking for matching `''
> /bin/bash: -c: line 3: syntax error: unexpected end of filecall'
> from /Applications/TextMate.app/Contents/SharedSupport/
Support/lib/
> progress.rb:49:in /bin/bash: -c: line 1: unexpected EOF while
> looking for matching `''
> /bin/bash: -c: line 3: syntax error: unexpected end of filefork'
> from /Applications/TextMate.app/Contents/SharedSupport/
Support/lib/
> progress.rb:47:in /bin/bash: -c: line 1: unexpected EOF while
> looking for matching `''
> /bin/bash: -c: line 3: syntax error: unexpected end of filedialog'
> from /Applications/TextMate.app/Contents/SharedSupport/
Support/lib/
> progress.rb:40:in
It's occurring during the "Browse Flickr Photos" command. If anyone
is familiar with that particular error, could you please let me know
what it might be related to?
Thanks,
Brett
Hi. This may be an another obvious thing I have missed, but:
Running Ruby produces beautiful output, through Rubymate. But running
shell commands splats the output into a plain window, with output and
errors thrown in together, and line endings ignored.
Is there any way to pipe shell output through Rubymate, or any similar
functionality for the shell?
---
Bruno
Hi TextMaters,
I recently started to translate TextMate manual into Japanese.
Subversion repository is located at http://macromates.com/svn/Bundles/
trunk/Manual/pages .
`en` directory is a Markdown version of Allan's original manual,
which I use as a source of translation and as a template. We can,
therefore, expect the same look of the translation, sharing the same
graphics and layout if Allan can tweak his script a bit.
`ja` is used for the translation. Except for a `_read_me.mdown` file,
the directory will have the same file names. My plan is to translate
the all contents quickly but roughly, and polish the translation
later on. At the moment, there's no way to *compile* a book from the
files. (Note: I haven't even translated 5% of the Manual yet.)
**Caution**
TextMate doesn't support CJK at this moment. Users including those
who use [Fake CJK Support](http://macromates.com/blog/archives/
2006/11/09/faking-cjk-support/) are encouraged *not* to open files
other than `_read_me` file in the directory with TextMate. TextMate
or the entire system may hang. You may be able to open, but
converting the Markdown to HTML may also be a cause of this hang.
From my personal experience, handling lots of CJK text prones to
this issue.
Since I can't find anyone else who is using TextMate with a large set
of Japanese text, the problem may be personal. But for now, my
suggestion is that you not use TextMate to open the files. I get a
few emails saying I'm putting virus, but .mdown files are just plain
text files.
Takaaki
--
Takaaki Kato
http://samuraicoder.net
I'm having a problem running the default task with RakeMate. Rake reports
an error saying that '(default task)' is not a valid task. I worked around
the problem by converting the 'task' variable returned by TextMate::
UI.request_item to a string on line 58 of rake_mate.rb:
task = task.to_s
Apparently request_item is return an Array, so 'task == DEFAULT_TASK'
returns false. Converting task to a string fixes it. I'm using TextMate
1383, which is the latest cutting edge I believe.
Steve
I've been using CSSEdit for the last few days, and it's got a really
nice interface. There is a left-hand pane which is the equivalent of
the popup menu for functions in Textmate. And crucially, there is a
live search box at the top which filters that pane, so you start
typing, say 'news', and it shows all selectors with a class or id
containing that word.
I personally think that would be a great feature for Textmate to have,
perhaps in a drawer on the other side from the Projects drawer. The
popup menu is pretty unwieldy (IMHO) with big documents.
---
Bruno
Hello all,
I'm working on a command that generates some functions for a set of
variables, and I'd like to print out the result in line with the text
that is selected. Is there any really clean way to do this that I'm
not aware of? I need to get the tab indentation of one of the
selected lines of text.
Thanks,
Michael
Dear All,
I have a strange situation wherein the output of a command appears
properly if I select "Show as HTML", but disappears if I select
"Create New Document" (i.e., a blank file appears). Why does this
happen?
Here is the full story:
I wanted to modify the subversion Diff commands to use wdiff instead
of subversions built-in capacities. I added an enviornment variable
called "TM_SVN_DIFF_CMD", with a value "wdiff_svn_wrapper.sh".
"wdiff_svn_wrapper.sh" is simply a wrapper script that calls "wdiff
$6 $7". I do this in order to get read of the numerous options that
subversion attaches, and retain only the file names.
If I then use the commands "Diff Revisions..." or "Diff With
Revision..." everything works perfectly: I get the appropriate
comparison between the appropriate revision. If I use "Diff With
Newest (Head)" or "Diff With Working Copy (Base)", etc., I get the
appropriate output if I select "Show as HTML" for the output, but a
blank document if I select "Create New Document" as output. What can
be happening?
Thanks,
Zvi