Hello,
In JavaScript, I'd like to be able to fold not only functions (that
works great) but also "variables" as declared in json for example.
function Bookmark(p_idx, p_type, p_text) {
this.index = p_idx;
this.bookmarkType = p_type;
this.text = p_text;
}
folds great, but:
var UNITS_METRIC = {
name: "metric",
distance: " m.",
speed: " m/min.",
weight: " kg.",
pressure: " bar"
}
does not fold when JavaScript language is selected but folds when
HTML language is selected!
Wouldn't it be possible to add a "rule" to be able to fold such
variables in JavaScript language as it works in the HTML language? How?
Many thanks for your help.
/p
it seems like the "edit in textmate" does not support page names with
(e.g. german) umlauts. when saving and doing an apple+w the contents
do not get pasted back to safari. i think the problem must be related
to the umlauts, since it works with non-umlaut html form documents.
will this be fixed in the future?
> Harold,
>
> Are there any files in the directories ~/Library/Application
> Support/TextMate/ or /Library/Application Support/TextMate/? It's
> possible that you have an older version of the Support directory in
> one of those folders. If you do see a Support folder in one of
> those directories, it is OK to delete it. Restart TextMate and see
> if you still get a hung PyMate when running the test script.
1. I have a directory: /Users/harry/Library/Application Support/
TextMate which contained 3 subdirectories:
Bundles Pristine Copy Support
a. Bundles directory merely contains an extra command added to
Python.tmbundle (Run Script (PyMate) version 2.tmCommand based on
using the pymate.py script)
b. Pristine Copy directory contains bundles that have been downloaded
via svn and installed ... to be safe (from conflict) I moved/deleted
all these bundles.
c. Support directory seemed to be empty; only contained a hidden .svn
subdirectory
2. After deleting the Support directory (/Users/harry/Library/
Application Support/TextMate/Support) as you suggested ...
I ran the test python script using PyMate ...
but the latest (bleeding edge) version TextMate Version 1.5.4 (1360)
still gets hung ...
PyMate r6190 running Python 2.3.5 (/usr/bin/python)
>>> test_input.py
3. whereas a previous version, TextMate Version 1.5.4 (1324) works OK
(cut and paste from PyMate screen; excess blank lines deleted):
HIDE STDERR SHOW STDERR
Python 2.5.0 - PyMate r5848
For comments contact the author.
The regular Python interpreter can be invoked using ⌘⇧R.
>>> test_input.py
1
forcing redraw!!! don't remove
Script terminated with success.
4. as does TextMate Version 1.5.2 (1103)
Python 2.5.0 - PyMate r3226
For comments contact the author.
The regular Python interpreter can be invoked using ⌘⇧R.
>>> test_input.py
1
forcing redraw!!! don't remove
Script terminated with success.
5. These older versions use $TM_BUNDLE_SUPPORT/pymate.py rather than
$TM_BUNDLE_SUPPORT/PyMate/pymate.rb
I can more or less make sense of the pymate.py code but the Ruby code
pymate.rb appears enigmatic.
so far it is a mystery which may have to go on the backburner ...
Adios
Harry.
------------------------------------------------------------------------
----
Dr. Harold W. Schranz, Research Fellow, Computational Genomics Group
Division of Molecular Bioscience, John Curtin School of Medical Research
Australian National University, Canberra ACT 0200, Australia
------------------------------------------------------------------------
----
Hello,
I'm a new textmate user.
And starting to try to use textmate for this simple website I have to edit.
I'm trying to use the tidy bundle function and it's not working as I
think it should have.
I an html page on the screen (actually it's file.php) and when I press
Ctrl+Shift+H I get a new blank screen ;)
No errors, nothing.
Am I missing something?
For what it's worth it has one single <?php include(); ?> in it and
about 500+ lines of html.
Is that the problem?
Thanks in advance.
I cannot commit a file to my repository using the subversion bundle.
When I try I get this error message:
Couldn't find /usr/bin/ruby
We need Ruby to proceed.
Locations searched:
/Applications/TextMate.app/Contents/SharedSupport/Support/bin/CocoaDialog.app/Contents/MacOS
/opt/local/bin
/opt/local/sbin
/Users/phurley/bin
/usr/local/bin
/sw/bin
/sw/sbin
/bin
/sbin
/usr/bin
/usr/sbin
/usr/X11R6/bin
/Applications/TextMate.app/Contents/SharedSupport/Support/bin
>From the bash prompt:
which ruby
> /opt/local/bin/ruby
ruby -v
> ruby 1.8.5 (2006-12-25 patchlevel 12) [i686-darwin8.8.2]
which svn
> /opt/local/bin/svn
svn --version
> svn, version 1.4.2 (r22196)
> compiled Jan 9 2007, 01:05:16
(snip)
FYI I can add files to repository without a problem. Any suggestions
would be welcome,
Thanks
pth
> Harold,
>
> Can you post the specific error you are encountering? Do you scripts
> not run at all? Can you post a minimal example script that isn't
> working?
>
> I am able to execute the following script without any problems using
> the latest PyMate:
>
> #!/usr/bin/python
> x = input("Foo:")
> print x
For example, if I put your script above in a file called test_input.py
1. It will run successfully over the terminal (directly and via the
Run Script (Terminal) command).
2. However, if I use the Run Script (PyMate) command (based on
pymate.rb) I get the following lines printed:
PyMate r6190 running Python 2.3.5 (/usr/bin/python)
>>> test_input.py
and no dialog window for input, the task keeps running ... a ruby and
python process hang around ... until I interrupt it.
3. If I use the previous version of PyMate based on pymate.py I get
an input dialog and successful completion of the script.
I'm running Mac OS X 10.4.8 on a MacBookPro (Intel Core 2 Duo) 2.33
GHz with 2GB RAM and 4MB L2 Cache (per processor).
Assuming ruby from /usr/bin/ruby is being used that is ruby 1.8.2
(2004-12-25) [universal-darwin8.0] as indicated by the ps line:
/usr/bin/ruby -- /Users/harry/Library/Application Support/TextMate/
Pristine Copy/Bundles/Python.tmbundle/Support/PyMate/pymate.rb
If I use python 2.5 (installed in /usr/local/bin/python), same deal ...
Any suggestions?
Harry.
Hi.
http://pastie.textmate.org/40039 is parsed wrong by my textmate
installation. I'm running the latest version from svn. Seems to have a
problem with $<delim> under qr. works fine with m//.
--
With regards
Marcus Ramberg
It appears a bug has crept in the Python bundle for the Run Script
(PyMate) command in TextMate ...
All appears well with the following version which correctly runs
interactive Python scripts (requiring a dialog):
Version 1.5.4 (1324) [2006-11-02: REVISION 1324] Python 2.5.0 -
PyMate r5848
uses the code:
# Save file, use tmp-file if there's no filepath.
[[ -z "$TM_FILEPATH" ]] && TM_TMPFILE=$(mktemp -t pythonmate)
: "${TM_FILEPATH:=$TM_TMPFILE}"; cat >"$TM_FILEPATH"
TPY=${TM_PYTHON:-pythonw}
"$TPY" "$TM_BUNDLE_SUPPORT/pymate.py" "$TM_FILEPATH"
rm -f "$TM_TMPFILE"
However the following (bleeding edge) version
Version 1.5.4 (1360) [2007-02-13: REVISION 1360] PyMate r6190 running
Python 2.5 (python)
uses the code (Ruby in a Python bundle???):
export TM_RUBY=$(which "${TM_RUBY:-ruby}")
"$TM_RUBY" -- "$TM_BUNDLE_SUPPORT/PyMate/pymate.rb"
and only works for non-interactive Python scripts (I'm partly
suprised it works at all).
Should this code change have happened between versions or is there a
glitch.
Adios
Harry.
------------------------------------------------------------------------
----
Dr. Harold W. Schranz, Research Fellow, Computational Genomics Group
Division of Molecular Bioscience, John Curtin School of Medical Research
Australian National University, Canberra ACT 0200, Australia
------------------------------------------------------------------------
----
I think the reason you used hg status $WorkPath is because it limits
the status to the current sub directory of a hg repository.
i.e.
Let's say project/ is a hg repo
cd project/
hg status # This shows status for everything under project/
cd project/subdir
hg status project/subdir # This shows status for everything in subdir
Now...if this is GOOD or BAD behavior is up for discussion.
Personally I like the former better, I usually want to see the status
of all files in my repo.
What do you think?
Yi