Terje Romslo | 2 May 2010 13:55
Picon

Help

Hi

How do I open html-files from textmate into Firefox, instead of Safari, that seems to be default+

tromslo

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

brad tittle | 3 May 2010 18:21

Help -- Opening files in firefox


Hi

How do I open html-files from textmate into Firefox, instead of Safari, that seems to be default+

tromslo

------------------------------


Open firefox, close safari, use the Html macro "Open in Running Browser" or "Refresh currently open browsers".

 

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate
Matt Neuburg | 3 May 2010 20:59
Favicon
Gravatar

Re: compatibility between textmate and snow leopard

Eric Cheng <ericchengfudan@...>
wrote:

> But since snow leopard I've been encountering more and more problems than
> before. And later I heard it's because snow leopard use Ruby 1.8.7 as
> default while most textmate bundles use Ruby 1.8.2. When I use textmate on
> my snow leopard Macbook Pro, a lot of bundles and scripts that used to
> function pretty well now don't work. Here I have the question, can I solve
> those compatibility issues by just getting the latest bundles from the svn
> sites? Or that textmate 1.5.* is just not suited for Snow Leopard, the app
> itself needs update to get full compatibility on Snow Leopard? If so, maybe
> I'll wait for textmate 2 before I write all my projects in textmate.

TextMate works great for me on Snow Leopard. If you're having trouble
with a particular bundle or script, maybe you should ask about that
particular bundle or script.

m.

--

-- 
matt neuburg, phd = matt@... <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Kenny Scott | 3 May 2010 22:36
Picon

Adding Executor/Run Script for Custom Bundles

Hey Guys,

A friend pointed me to the this list! Way excited. Any of you guys have experience adding the run script for a new bundle? I'm helping a friend with a new open source markup language called ZML.We added a bundle to TextMate and added the syntax highlighter.

I really love the functionality, with apple command + R that allows me to run a Perl Script or Shell Script, or what have you, and display the results in HTML. This would be really helpful, in place of being forced to run each document in terminal to view the output. My command is simply "zml myzmlfile.txt" and I want to leverage the bundle editor to get this going.

Anyone have experience doing this? I obviously, do not.

Thanks in Advance!

Kenny G


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate
Jason J. W. Williams | 4 May 2010 01:29
Picon
Gravatar

Bundle for HAProxy configuration files

Hi Y'all,

In case anyone else could use it, I've posted a syntax highlighting
bundle for HAProxy config files:

http://github.com/williamsjj/haproxy.tmbundle

-J

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Adam Strzelecki | 4 May 2010 11:06
Picon
Favicon
Gravatar

Textmate's bundle Insert Scratch Snippet steals accented S (Ś) character shortcut

Hello,

Application shall not bind ⌥letter or ⇧⌥letter shortcuts as those are used to type
accented/special characters on various keyboard layouts.
TM follow this rule with one exception "Insert Scratch Snippet" that binds to ⇧⌥S which makes typing Ś
(accented S) impossible in my case.

I believe this is a bug and this keyboard shortcut shall be corrected to i.e. ⇧⌃⌥S.

Filled at: http://github.com/textmate/textmate.tmbundle/issues/issue/1

Regards,
--

-- 
Adam

_______________________________________________
textmate mailing list
textmate <at> lists.macromates.com
http://lists.macromates.com/listinfo/textmate
Marius Hofert | 5 May 2010 13:27
Picon

How to execute a shell script within TextMate?

Dear TextMate experts,

I would like to execute the shell script myscript.sh from within TextMate. The script myscript.sh takes a
file name as argument and does something with the file (it indents the file correctly; for this, it calls
emacs in batch mode). So if I use 
sh myscript.sh myfile.R
the script works perfectly fine, i.e., it indents the source code contained in myfile.R. I would like to
have textmate do this for me on the file I am working on when I use a certain key combination. 

Using the Bundle Editor, I created a new command "tidy" with key equivalent "shift+command+T". As the
actual command, I put in:
sh /path_to_my_script/myscript.sh "$TM_FILENAME"

Unfortunately, this does not work. I set "Input" to "Entire Document" and "Output" to "Replace Document"
(currently I obtain an empty document after "shift+command+T"). 

How can I trigger the shell script, such that the current content of myfile.R is replaced by the (quietly
generated) output of myscript.sh?

Below is the script

Many thanks in advance,

Marius

#!/bin/sh
function usage () {
printf "Indent R file with Emacs ESS package.\n"
printf "Usage: $0 FILE\n"
exit 1
}
f=$1
shift
if test "x$f" = x -o "x$f" = "x-h"; then
usage
fi
emacs -batch \
-eval '(load "/usr/local/share/emacs/site-lisp/ess-5.8/lisp/ess-site")' \
-f R-mode \
-eval '(untabify (point-min) (point-max))' \
-eval '(insert-file "'${f}'")' \
-eval '(set-visited-file-name "'"${f}"'")' \
-eval '(indent-region (point-min) (point-max) nil)' \
-f save-buffer \
2>/dev/null

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Alexey Blinov | 5 May 2010 13:37
Picon
Gravatar

Re: How to execute a shell script within TextMate?

This is from "Reformat with JS Beautifier" command:


Command(s):
cat > /tmp/reformat_this_file.js
cd "$TM_BUNDLE_SUPPORT/bin/js-beautify/"
java -jar ../js.jar beautify-cl.js -n -i 1 /tmp/reformat_this_file.js 2>&1

Input: Selected Text or Scope
Output: Replace Selected Text

HTH

-- Alexey


On Wed, May 5, 2010 at 15:27, Marius Hofert <m_hofert <at> web.de> wrote:
Dear TextMate experts,

I would like to execute the shell script myscript.sh from within TextMate. The script myscript.sh takes a file name as argument and does something with the file (it indents the file correctly; for this, it calls emacs in batch mode). So if I use
sh myscript.sh myfile.R
the script works perfectly fine, i.e., it indents the source code contained in myfile.R. I would like to have textmate do this for me on the file I am working on when I use a certain key combination.

Using the Bundle Editor, I created a new command "tidy" with key equivalent "shift+command+T". As the actual command, I put in:
sh /path_to_my_script/myscript.sh "$TM_FILENAME"

Unfortunately, this does not work. I set "Input" to "Entire Document" and "Output" to "Replace Document" (currently I obtain an empty document after "shift+command+T").

How can I trigger the shell script, such that the current content of myfile.R is replaced by the (quietly generated) output of myscript.sh?

Below is the script

Many thanks in advance,

Marius


#!/bin/sh
function usage () {
printf "Indent R file with Emacs ESS package.\n"
printf "Usage: $0 FILE\n"
exit 1
}
f=$1
shift
if test "x$f" = x -o "x$f" = "x-h"; then
usage
fi
emacs -batch \
-eval '(load "/usr/local/share/emacs/site-lisp/ess-5.8/lisp/ess-site")' \
-f R-mode \
-eval '(untabify (point-min) (point-max))' \
-eval '(insert-file "'${f}'")' \
-eval '(set-visited-file-name "'"${f}"'")' \
-eval '(indent-region (point-min) (point-max) nil)' \
-f save-buffer \
2>/dev/null


_______________________________________________
textmate mailing list
textmate-qhrM8SXbD5LrQoZeqNtYVeG/Ez6ZCGd0@public.gmane.orgcom
http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate
Hans-Jörg Bibiko | 5 May 2010 13:45
Picon

Re: How to execute a shell script within TextMate?


On May 5, 2010, at 1:27 PM, Marius Hofert wrote:

> How can I trigger the shell script, such that the current content of myfile.R is replaced by the (quietly
generated) output of myscript.sh?

It depends on.

First you have to use $TM_FILEPATH not $TM_FILENAME since it only holds the name not the entire path.
In your command you should set:
- Save: Current File
- Input: None

Next, does your script output the new generated stuff on standard output or does it save it?
If you run it in the Terminal.app and you see the new stuff then you can set in your command:
- Output: Replace Document

If it saves the new stuff to a file, then you can add a shell command "cat /path/to/the/new/file.

On the other hand, does your script support reading from stdin? Then you can simply write as command:

cat | /path_to_my_script/myscript.sh

and set as Input: Entire Document and Save: Nothing.

You see, it's rather difficult to guess how your script works thus provide a bit more details.

Cheers,
--Hans

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Hans-Jörg Bibiko | 5 May 2010 13:51
Picon

Re: How to execute a shell script within TextMate?

Oh, 

sorry, I didn't saw your script. I think if you simply use $TM_FILEPATH it should work.

What's about to use the R bundle "Tidy" function. It makes usage of R's internal formatter.

Can you post me the formatted style to me privately (if the code is not confidential, of course) to see the
difference, since I'm still looking for a nice prettifier for R code.

Cheers,
--Hans

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate


Gmane