A recent change to the Perl bundle had the effect of highlighting
large chunks of code as if they were match or replace statments. For
example, it parses this line as if the slash were the start of a m/
regexp/ statement:
local $/;
It does the same to pretty much any line with a slash in it, for
example when dividing two numbers.
As a workaround I've added '#/' as a comment to the end of these
lines, but I'm hoping that's a very short-lived hack ;)
Many thanks in advance,
- Dave
This worked like a charm, mreece, thanks!
On Aug 31, 2006, at 12:46 PM, Michael Reece wrote:
> looks to me like this pattern:
>
> .*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle|archive)
>
> is matching folder names that have these extensions; anything (.*)
> followed by a dot (\.) followed by one of those patterns.
>
> you should put archive outside that closing paren, or near the front:
>
> .*/(\.[^/]*|CVS|_darcs|\{arch\}|blib|.*~\.nib|.*\.(framework|app|
> pbproj|pbxproj|xcode(proj)?|bundle)|archive)$
>
> or
>
> .*/(\.[^/]*|archive|CVS|_darcs|\{arch\}|blib|.*~\.nib|.*\.
> (framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$
>
>
I'm editing a Dashboard widget as a TextMate project. It took me a
while to figure out that **updates to CSS are not reflected in the
Web Preview** of the corresponding HTML page of the widget.
I can even completely delete the contents of the CSS file, and still,
the preview renders with the old version of the CSS file. I tried
Command-R, manual reloads in the preview windows etc - nothing worked
except quitting and restarting TextMate, which is obviously not a
satisfying solution.
Do I miss something here? (For me, this feature seems to be broken,
and I found some mailing list posting from 6 months ago; but I hoped
that the current version has fixed these problems).
My configuration is
TextMate 1.5.3 (1215),
Mac OS X 10.4.7 Latest update,
No HTML/CSS bundle modified by me.
Thanks for your help,
Martin.
Before the last update I could type something like:
div {
color:red;
}
And all was well and good. Now TM throws a space in automatically
which is fine. I just have to get used to that. But now I can't
overtype the semi-colon. I used to be able when I got to then end of
the statement type ";" and it would overwrite the one that was
already there and place my cursor outside the statement. Now it puts
2 semi-colons and i'm still stuck in the statement.
div {
color: red;;
}
What happened to the ability to Overtype the semi-colons in the css
context? And how do I bring it back?
Josh
I'm not sure what the TextMate terms for this are, so please bear with
me (I'd have searched the help file more thoroughly, if I knew the
right terms)
When, for example, creating a method declaration using m(tab) in the
Objective-C bundle, you get this:
-(id) method:(id)aparameter;
(or something close to it).
The caret is on the first id, which is selected. So far, so good --
type in, and the "id" is replaced, as expected, with what you typed.
However, and this is probably something I just got used to with
Eclipse, there doesn't seem to be a way to jump to, and select, the
next replaceable field, for example the word "method", which is done
by pressing 'tab' in Eclipse, navigating from field to field until all
are set, with the last caret position being a specified insert
position.
I'm not sure I'm explaining myself well, but I hope that what I
describe is fairly clear.
So, is there a way to do this? If so, how? And, what is it called,
so that I never have to ask this question again? ;)
--
Chris R.
======
Not to be taken literally, internally, or seriously.
In my language I'm using:
{ name = 'meta.blank.line';
match = '^\n';
},
which works great for identifying blank lines.
The problem comes when I get to the last line of the document.
Textmate usually uses the character to the right of the caret for
scoping, but when at the end of the document the scope switches to
the left side of the caret. And because I'm on an empty line there's
nothing to match.
So is it even possible to scope the last line of the document when
it's empty?
I thought I had an answer with \z but Textmate doesn't seem to
support \z in the language grammar - or maybe I'm using it totally
wrong.
Any help is appreciated.
--oliver
To replicate:
my ($match) =
/
\s*
(match_me)
/x;
my $syntax_coloration_broken = 'from here down';
What appears to be happening is that the \s* is interpretted as a
substitution, e.g. s*search*replace*;
Suggestions on fixing thing?
Thanks,
Joshua
To any users of the Subversion bundle: How can I add support for
providing passwords to svn when I'm using DAV_SVN with SSL and
key-based authentication?
For example, right now in the svn info output, there are six requests
for the password. If those are all ignored, I believe that I don't
get an SSL connection, which is... undesirable.
Any advice? I'm certainly willing to code the solution myself, if needs be.
--
Chris R.
======
Not to be taken literally, internally, or seriously.
Hi there,
I've got a new language for which I'd like to create a new grammar.
It's a LaTeX alike language, but environments look like this:
\startsomething
\stopsomething
The language grammar doesn't seem to accept the backslash (it does so
in the LaTeX bundle, so I must be doing something wrong). The
following works fine:
{ name = 'meta.foo.bar';
begin = 'xx';
end = 'yy';
},
and in my text between 'xx' and 'yy' the scope is also 'meta.foo.bar'.
But when I chage the grammar to
{ name = 'meta.foo.bar';
begin = '\\xx';
end = '\\yy';
},
I can't see that the scope changes to 'meta.foo.bar' within \xx and
\yy. Can somebody tell me what to do?
Patrick
The PPI module[1] on CPAN is designed to parse Perl (no small task
there). It was designed for projected /exactly/ like TextMate.
Why is PPI worth looking at? A few brief reasons:
1. It parses Perl wiithout executing it, so stuff like 'BEGIN {system
"rm -rf ~"}' won't do naughty things.
For the record, Textmate doesn't suffer from this problem.
2. It can parse 99% of the documents in CPAN [2]
Comparatively, TextMate isn't quite there yet. :-)
3. It's fast enough [3]. I watched a demo at OSCON 13 months ago with
a demo of PPI parsing the contents of a generic wx-based editor [4].
It responded in real-time.
TextMate is probably faster because it parses a smaller DOM than PPI.
The module PPI::XS, a Perl-C tokenizer hybrid, is an attempt to write
a faster tokenizer.
4. The Perl DOM class tree looks sane enough to use as the basis for
colorization. There are 62 classes, which should map neatly into the
TextMate model [5]
5. Adam Kennedy, the author, is a fantastic guy. He stayed at my place
for that OSCON. Not to put words in his mouth, but I'm sure he'd be
delighted to offer help integrating his baby into TextMate.
6. Once integrated, TextMate would benefit from future PPI
improvements for free. And PPI is under continual development since
2001. Updates are released about every two months, the most recent
being today, Sep 2.
Thanks for entertaining this idea,
Joshua
[1] http://search.cpan.org/~adamk/PPI-1.117/lib/PPI.pm
[2] http://search.cpan.org/~adamk/PPI-1.117/lib/PPI.pm#How_good_is_Good_Enough(…
"The goal for success was originally to be able to successfully parse
99% of all Perl documents contained in CPAN. [...] At time of writing
there are only 28 non-Acme Perl modules in CPAN that PPI is incapable
of parsing. Most of these are so badly broken they do not compile as
Perl code anyway."
[3] http://search.cpan.org/~adamk/PPI-1.117/lib/PPI.pm#The_Tokenizer
"The target parsing rate for PPI is about 5000 lines per gigacycle.
It is currently believed to be at about 1500, and main avenue for
making it to the target speed has now become PPI::XS, a drop-in XS
accelerator for PPI."
(At the time of this writing, PPI::XS is in the proof-of-concept stage)
[4] http://search.cpan.org/~adamk/PPI-Tester-0.06/
A wxPerl-based interactive PPI debugger/tester
[5] http://search.cpan.org/~adamk/PPI-1.117/lib/PPI.pm#The_PDOM_Class_Tree
I run a script to update bundles. At the moment it seems to hang trying to
update Rails. Anybody know what's happening and what to do about it?
Everything seems fine until near the end of the process, when I see:
Fetching external item into
'Bundles/Rails.tmbundle/Support/plugins/textmate_footnotes'
External at revision 121.
Fetching external item into 'Bundles/Rails.tmbundle/Support/plugins/engines'
... and there it sits.
The script is
#!/bin/sh
cd /Library/Application\ Support/TextMate/
/usr/local/bin/svn up
osascript -e '
and has been working for months.
I tried exiting terminal, which ended the script but left "engines" locked.
svn cleanup resolved that.
PowerBook G4 12"/Mac OS X 10.4.7
I have a strong background in .NET and Visual Studio 2003/2005. I'm
used to being able to wrap blocks of code around #Region "Fold this"
and #End Region markers and the UI would allow that block of code to
fold up.
Is there a way of doing this in Textmate with the PHP bundle or any
other bundle? I figured I'd ask before trying to reinvent the wheel.
Thanks!
Derek
Hi all,
I am having trouble with the Go to File command. It works fine from
the menu bar, but command T does not trigger it. I have double
checked and I have not assigned command T to any other command and I
have not created any ~/Library/KeyBindings/DefaultKeyBinding.dict. I
am using TextMate Version 1.5.3. Any help debugging this would be
appreciated. Thanks a lot.
All the best, Mark
Allen -
Cool, thank you.
So:
1) Yes, when I was using XCode bundle I was doing the Build & Run
command. I did NOT import, but followed directions someone had
(maybe it was on your wiki) put the textmate project file and the
xcode project file in the same path. Again, that seemed to work, but
was not getting anything "back" from ant.
2) I have been doing this on my new Macbook pro and I haven't touched
the /etc/profile or ~/bash_login or ~/bash_profile. I followed the
directions on 8.2 Search Path: my bash_init.sh and ~/.bash_profile
are identical to the ones in the manual. No luck - same problem: ant
runs, when you quit the app, everything displays.
3) I did check in the shell (using Terminal) and running ant there
works as in XCode: the targets are displayed as they are run, and my
lovely println() statements shine thru.
Sorry, I've never done anything beyond creating symbolic links and
using top in the shell. Not really my forte. But your wiki pages
are nice and helped, on this subject and everything else I've
referenced.
-Jerzy
Hi,
This used to work fine at one point, but has now been broken for a
few weeks.
From my rails app I call up Ruby->Run Rake Task. I choose "deploy"
from the list of tasks, and get the following output (apologies for
wrapping):
RakeMate r1.2.0 running Ruby v1.8.2.
>>> /Users/evansj/rails/my_app
loading configuration /usr/local/lib/ruby/gems/1.8/gems/
capistrano-1.1.0/lib/capistrano/recipes/standard.rb
loading configuration ./config/deploy.rb
loading configuration #<Proc:0x025d054c@/usr/local/lib/ruby/gems/
1.8/gems/mongrel_cluster-0.2.0/lib/mongrel_cluster/recipes.rb:1>
* executing task deploy
** transaction: start
* executing task update_code
* querying latest revision...
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:
command not found: svn log -q -rhead https://my.svn.server/repos/
my_app-portal/rails/my_app/trunk
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:
command not found: svn log -q -rhead https://my.svn.server/repos/
my_app-portal/rails/my_app
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:
command not found: svn log -q -rhead https://my.svn.server/repos/
my_app-portal/rails
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:
command not found: svn log -q -rhead https://my.svn.server/repos/
my_app-portal
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:
command not found: svn log -q -rhead https://my.svn.server/repos
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:
command not found: svn log -q -rhead https://my.svn.server
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:
command not found: svn log -q -rhead https:
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:
command not found: svn log -q -rhead .
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:
command not found: svn log -q -rhead .
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:
command not found: svn log -q -rhead .
The last line repeats indefinitely until you close the window and it
prompts you to stop the task.
svn is /usr/local/bin/svn, which is in my path, and the TM svn tasks
work fine for checking in etc. I have tried setting TM_SVN to the
full path to my svn in the prefs, but it still doesn't work.
I'm using the latest TM, with /Library/Application Support/TextMate
updated from svn.
TIA
Jon
Allan,
Thanks for your reply. I read over this page; I don't see how this
could be the problem because it is running ant. Am I missing something?
-Jerzy G.
> From: Allan Odgaard <throw-away-1(a)macromates.com>
> Date: September 1, 2006 12:30:18 PM EDT
> To: TextMate users <textmate(a)lists.macromates.com>
> Subject: Re: [TxMt] java ant [run]
> Reply-To: TextMate users <textmate(a)lists.macromates.com>
>
>
> On 1/9/2006, at 18:12, Jerzy Gangi wrote:
>
>
>> [...] Also, tried to use XCode bundle for the same thing. This
>> will not display anything until the app closes, at which time it
>> displays the full build output and my println's.
>>
>
> This is the Build & Run command?
>
>
>> Help! I want to use TextMate!
>>
>
> This is definitely not the standard behavior. I am not sure why you
> see the behavior, but my best guess would be that you have
> something in your bash startup which enables some form of buffering
> or similar.
>
> TextMate will source your bash startup files when running commands,
> the process is described here [1]. Could this be the reason?
>
>
> [1] http://macromates.com/textmate/manual/shell_commands#search_path
>
>
Hi there -
I'm relatively new to TextMate, trying to decide if I will buy it
(99% sold right now). Previously on XCode - I'm developing a Java
application w/swing, using ant to build.
When I do ⌘ (open apple) + B to build my TextMate project, and
select "1 Ant", the build / Ant window pops up. The jar
launches, and runs, but none of my debug println() statements show up
in the ant window until I: 1) close the jar myself (aka the program
exits), or 2) I force the jar to quit in the build / Ant window. So
after the app quits, the entire Ant output shows up for my targets,
with my debug println()'s at the bottom. Is there any way to make
the Ant display in TextMate "live?" Or not? Or am I just missing
something really basic?
Also, tried to use XCode bundle for the same thing. This will not
display anything until the app closes, at which time it displays the
full build output and my println's. Which, again, is good... but a
few minutes after I need them. Just as a point of reference, XCode
does display my debugging println()'s as the app is running in it's
console window.
Help! I want to use TextMate!
Thanks,
Jerzy G.
I've put together a very basic/simple/uncomplicated/doesn't do much
bundle for Stata, available at:
http://www.landfood.ubc.ca/people/timothy.beatty/page10/page10.html
I'm new to Textmate and so I'm sure the bundle could be improved upon
(there are certainly both typos and thinkos). If anyone has helpful
suggestions, particularly Stata users, they'd be very much
appreciated.
Thanks,
Tim
Hello. I have folders throughout my project called /archive/, in
which I put old versions of things. I would like the "Show TODO
List" command to ignore everything in any folder named archive/. Any
ideas on how to do that?
I looked at the Show TODO List Ruby script, but I don't know Ruby at
all and it was not obvious to me how I would modify (a copy of) the
script to ignore specific subfolders.
Thanks!
--Andreas
p.s. I use hard folders in my projects, and would like to continue to
do so. Moving the /archive/ folders out of the actual folders on my
HD is not an option. However, if there was some way to surpress
those subfolders from appearing in the project at all (other than
actually removing them), that would be fine. Unfortunately, deleting
the references in the project is insufficient; the files in /archive/
nevertheless have their TODOs appear in the list.
Hi there,
I like very much the ability to select
a word via ⌃W, then typing a quote to
wrap this word into.
How do I add a custom quote on my own ?
I would like to be able to do this with the
french quotes «...»
Thanks in advance
I used to be able to open remote files in TextMate by mounting the
remote directory via the Apple Filing Protocol [1]. Somewhere around
TextMate 1.5.2 (I think), this stopped working for me. TextMate's
open file dialog showed the volume as empty (?), and dragging and
dropping files from the remote volume onto the TextMate icon would do
nothing. Other applications, such as TextEdit, did not have these
problems, so I figured this was a new TextMate bug.
I went back and loaded a copy of TextMate 1.5.1, and it worked fine.
I thought this proved the issue to be a regression, but when I closed
1.5.1 and opened 1.5.3 again, it suddenly started working fine, too!
So I don't know what's going on, but if anyone has problems opening
files via AFP, going back temporarily to TextMate 1.5.1 might
magically fix the problem. At least it did for me.
Trevor
[1] http://comox.textdrive.com/pipermail/textmate/2006-February/
008656.html
Hi there,
I'd like to create a lot of snippets programmatically and not via the
bundle editor. Is there anything to be aware of?
Is the uuid important? What does TextMate do with it?
Patrick
Dear all,
I wonder if this a bug or not.
If I'm open maybe three selected files in the Finder with TextMate it
opens the project folder and all three files are listed. Fine!
If I click at one file TextMate opens it and writes the name and the
folder into the title bar.
E.g. file index.html folder gnu > title bar 'index.html - gnu' OK
But if I save this file called 'index.html' into an other folder,
e.g. 'bear', then I would expect that the title bar will change into
'index.html - bear' !?
Or I'm totally wrong.
My problem is that I'm often editing some files with the same name
but in different folders at the same time. So, I need an info which
file I'm editing.
Many thanks in advance!
Cheers,
Hans
Hello,
I've done some experiments with double clicks between words and it
seems inconsistent and not very useful compared to BBEdit.
I've been trying to switch from BBEdit in all cases but am finding it
sometimes difficult and extra work and clicks.
When I double click between two words:
Series of spaces get selected - correct
One tab - selects the word before the tab instead of the tab - wrong
Series of tabs - selects the tabs - correct
Series of spaces framed by words with single quote or double quote -
selects the spaces and the quotes - wrong
Series of tabs framed by words with single quote or double quote -
selects the tabs and the quotes - wrong
Series of spaces framed by words with $ - selects the spaces and the
$ - very wrong, really messes up perl
Series of tabs framed by words with $ - selects the tabs and the $ -
very wrong, really messes up perl
Why would it try to remove the $ in front of variables when all I
wanted to do was remove the spaces or change them to tabs?
In all cases it seems the invisible space between the words should be
selected, but nothing else.
Thoughts anyone?
Thanks,
ml