The -w wait mode now switches back to the Terminal program upon
window close. You can set which program (or no switching) by editing
the OPENTERMAPP variable. E.g. I have it set to iTerm, because I like
it better!
http://macromates.com/svn/Bundles/trunk/Scripts/tm
- Eric
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
Okay, somebody had the brilliant and easy idea of adding a little
'Hit RETURN' kludge to allow use of TM with svn and other external
editing. So I tweaked the command line tool I posted and added a
better help listing and a -w to have it block until the user hits
RETURN.
I have used it successfully to check it into SVN and use TM to write
the comment. The little pleasures! :)
You can get it at
<http://macromates.com/svn/Bundles/trunk/Scripts/tm>. If you need
this tool, you don't need my help installing it...
best, Eric
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
1. I have appended a shell script that launches TM and allows piped
input. I did not write the script; in fact, I merely found it in my
~/bin directory and thought that it came with the standard TM
install. The -c option lets you create a new file.
It does lack the crucial 'don't quit until editing is done' feature.
Here are three kludges I can think of to get that feature. Given a
-wait flag:
a. add a block at the end of the script that creates a $TM_FILE.lock
in the same directory and checks every N seconds for the .lock file.
When it's gone, quit the script. Then create a command that saves
current file and deletes the .lock file. Finally, write a little
macro that saves, closes the window and runs the 'delete .lock'
command.
In a future version of TM that triggers scripts/commands on events,
one can avoid the command and macro, and have 'Close Window' trigger
the deletion of the lock file.
b. have the shell script loop and check for changes to the
modification date on the file. Unfortunately, that means it will quit
on the first save. But you don't need any fiddling with macros and
commands.
c. call the Textmate Service from a (different) shell script. The TM
Service definitely blocks whatever app calls it. In other contexts
this might be a bug, but here it's great. However, I don't know how
to pipe text to a Cocoa Service from the command line. This may be
rather hard. Any ideas?
- Eric
---
#!/bin/sh
# Originally written by Rick Gardner (rick.gardner(a)mac.com)
# and Kevin Ballard (kevin(a)sb.org)
# Modified to work with TextMate by Andrew Ellis aellis(a)gmx.net
# 10-11-2004
OPEN="open -a TextMate"
CREATE="touch"
USAGE="usage: tm [-ch] filename [filename ...]"
CREATE_FILE=0
while getopts ch FLAG; do
case $FLAG in
c) CREATE_FILE=1;;
h|\?) echo $USAGE; exit 1;;
esac
done
shift $(($OPTIND - 1))
# are we dealing with a filename or are we using stdin?
if (( $# == 0 )); then
if [ ! -t 0 ]; then
exec 6<&0
exec 7>&1
prefix=/tmp/tm
suffix=$(date +%s) # The "+%s" option to 'date' is
GNU-specific.
filename=$prefix.$suffix
$CREATE $filename
exec > $filename
while read a1
do
echo $a1
done
open -a TextMate.app $filename
exec 0<&6 6<&-
exec 1<&7 7<&-
else
if [ ! -z ${1} ]; then
$CREATE ${1}
$OPEN ${1}
else
$OPEN
fi
fi
else
# iterate over the files
for filename; do
# create the file if requested
if (( $CREATE_FILE )); then
if [[ -f $filename ]]; then
echo "File \`$filename' already exists."
fi
$CREATE $filename
fi
if [[ -e $filename ]]; then # now also
opens directories
$OPEN "$filename"
else
echo "File \`$filename' does not exist."
fi
done
fi
Hi guys,
is there a way to split a page in 2 views? Nice, when working with a
lot of properties in a class. So I
can have all the properties show up in one view, while working on other
parts in the class. It would
also be nice to have a split view with two different files. Like
classfile1 on top and classfile2 on the
bottom.
Best Regards,
Andy
Hi
Is there any way, or will there be, to browse the files from the HD?
Like as in the projects drawer, except - being able to browse your HD. I
was a long time user of jEdit and found this option most useful.
Thank you
Eoghan
This gets more interesting once we have a way to direct HTML to the
preview window. Another thing that would be nice: command execution
from URLs, which would allow the references to other man pages to work.
But there are -- of course -- security implications to that feature.
Perhaps if it only works in the preview window, not system-wide.
ruby -e "
def error( message )
%x{osascript <<END
tell application \"SystemUIServer\"
activate
display dialog \"#{message}\"
end tell
END
}
end
def ask(question, answer = '$TM_SELECTED_TEXT')
%x{osascript <<END
tell application \"SystemUIServer\"
activate
display dialog \"#{question}\" default answer \"#{answer}\"
set answername to text returned of the result
do shell script (\"/bin/echo \" & answername)
end tell
END}
end
error('Xcode tools must be installed to view man pages') if not
File.exist?('/Library/Application Support/Apple/Developer
Tools/Plug-ins/DocViewerPlugIn.xcplugin/Contents/Resources/rman')
name = ask('Display man page for which command?')
name.chomp!
temptemp = %Q{/tmp/tmp.#{name}.`whoami`.TMmantemp}
temphtml = %Q{/tmp/tmp.#{name}.`whoami`.html}
%x{man #{name} > #{temptemp}}
# generate HTML and open it if successfully found the entry
if not \$?.success? then
# puts 'No manual entry for ' + name
%x{open -a TextMate &} # switch back to TextMate
else
%x{cat #{temptemp} | \"/Library/Application Support/Apple/Developer
Tools/Plug-ins/DocViewerPlugIn.xcplugin/Contents/Resources/rman\"
-fHTML > #{temphtml}}
%x{open #{temphtml}}
end
"
On Jan 13, 2005, Allan Odgaard wrote:
> It's really difficult to say. I have a few things that needs to be
> done before I will go into the input stuff, and these are already
> taking far longer than predicted. And the fix itself I am not sure
> either how long will take -- the best I can do is probably to say,
> don't expect it before at least in 4-6 weeks.
Thanks for your candid reply. I'll work around the problem and look
forward to the fix.
Jonathon
Hi, I'm currently rewritiing the php code completion thingy, and I'd
like it to be scope sensitive.
To find the scope at the cursor I can use the file as stdin, and work
it out myself. But it struck me that I'd be able to work some things
out based on the current pattern applications (like 'Embedded PHP',
and being in quotes). So a couple of questions.
* could we have a variable $TM_PATTERN_NAME which gives the current
pattern name?
* would there be a way to access patterns names 'higher up'? (like
'Embedded PHP')?
I'm wanting to figure out the scope because I'm implementing scope
sensitive completion, including completions based on your own code.
Any comments, advice, much appreciated.
Ian White
Having just returned to the Macintosh after eight years of using
Windows (and TextPad), one of the first applications I installed was
TextMate. Twenty minutes later, when I'd piped my first text through
markdown.pl and created my first tab-activated snippets, I was already
happy to pay the license fee.
However, I then found it wasn't possible to enter Japanese text. The
list archives revealed that Kazuo Saito had already raised this issue
(http://one.textdrive.com/pipermail/textmate/2004-December/001824.html)
and that Allan Odgaard had promised a fix:
> I can't give an ETA on when this will be fixed, but I can imagine it's
> frustrating for those who rely on these input methods, so I'll try not
> to have “the fix” pending for too long.
I appreciate that perhaps only a tiny minority of TextMate users need
to work with Asian languages but was hoping that it might be possible
to give an approximate ETA on when this will be fixed. I really don't
want to waste time looking for an alternative to TextMate.
Thanks,
Jonathon Delacour
Just something I ran into today, which I just assumed to be there until I
wanted to use it: search direction option :)
Jeroen.
--
"We apologize for the inconvenience"
Emulate the CodeWarrior/Xcode Open Quickly feature, but open all
matches instead of just the first one. (NSAttributedString, I'm looking
at you.)
####
find /usr/include
/System/Library/Frameworks/ApplicationServices.framework
/System/Library/Frameworks/AppKit.framework
/System/Library/Frameworks/Foundation.framework
/System/Library/Frameworks/Kernel.framework -name `osascript -e "tell
application \"SystemUIServer\"
activate
display dialog \"Find and open which header?\" default answer
\"$TM_SELECTED_TEXT\"
set headername to text returned of the result
do shell script (\"/bin/echo \" & headername & \"*\")
end tell"` -print -exec open -a TextMate {} \; &
####
A refined version of this may show up in the C bundle soon. Meanwhile,
feedback is welcome.
Have fun,
Chris
hi,
some people on the list talked about the icon and it seemed they
didn't like it very much. i dont hate the old icon but it also doesnt
impress me every time i see it, so over the weekend i had too much
freetime and fired up inkscape to play around a bit. here is the
result, i would like to hear some opinions how you like it or not.
its inspired a bit by subethaedits icon and by the color-circle one
posted here on the list and so i filled it purple to fit the gap. :)
--
Torsten Becker
Hi,
I'm new to the list, so please forgive me, if this has being asked
before.
Is it possible to change the tab behavior of TextMate? For example I
find
it strange that single line intending to the right works correctly
(using tabs),
but if you try to tab back to the left site, it is using spaces instead
of tabs.
It would also be great to change the behavior of multi line tabbing.
I'm so used to use the
tab key to intend to the right and "apple key" together with the tab
key to move lines to the
left. But if I do that, the lines I would like to intend, are deleted.
(I hope you understand what I mean.. sorry for my english)
Other then that I really like TextMate.
Kind Regards,
Andy
Switzerland
hi folks,
Another tip I thought I'd share. I often have situations where I
have to discard all lines in a file that start with a number, or
other cleanup tasks like that. Now, you can use TM's Text>Filter
Through Command... and then use grep or grep -v. But I have a hard
time remembering grep's regexp format. It's already all I can do to
remember TM's and Perl's.
So I wanted to write a command to pop up a GUI input field so I could
enter in a Perl regexp for lines to match with two buttons so I could
either Keep only the matching lines or Discard the matching lines.
So what I did was toss together a quick script in Perl and use
CocoaDialog as a front-end. To use this, you need to download
CocoaDialog from <http://cocoadialog.sourceforge.net/download.html>,
and put it in /Applications. (If you don't like that place, change
the path in the script.)
If you don't have a need for this script, you still might be able to
get some mileage out of CocoaDialog. It is a simple way to get GUI
onto any script that talks to the command-line. It has a number of
different window formats. Pashua is neat, but it requires use-ing a
module, and Platypus is more for creating drag-and-drop things.
good luck, Eric
---
TM Command.
Before: nothing
Command:
my$CD="/Applications/CocoaDialog.app/Contents/MacOS/CocoaDialog";my$rv=`$CD
inputbox --title "Filter with Regexp" --no-newline \\
--informative-text "Filter lines matching this Perl regular
expression:" \\ --text "" \\ --button1 "Keep" --button2
"Discard" \\ --width
500`;my($button_rv,$term)=split/\n/,$rv,2;while(<STDIN>){if($button_rv==2){unless(/$term/){print;}}elsif($button_rv==1){if(/$term/){print;}}}
Stdin: selected
Stdout: replace selected
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
howdy,
there is an option to 'Highlight Current Line' in the preferences; is
there anyway to control the color of that line? maybe through the
syntax highlighting files? thanx in advance...
- jamal
I posted another set of icons to the wiki today, but I'll announce it
here. They are more in line (I think) with aqua-style editor icons
(pages and pen), and they use a lot of ideas garnered from the list
archives. There are six colors in the disk image, so hopefully you will
find one you like, and they all have been designed to degrade
gracefully (48 is less detailed so it's not burry and 32 and 16 are
even more so). I would appreciate any feedback/comments etc.
preview: http://www.eight7.com/repository/tmicon_preview.png
icons: http://www.eight7.com/repository/tmicons.dmg.gz
Thanks all!
Jonathan Raphaelson
University of Colorado at Boulder
--
Home: 303-469-3442
Cell: 720-937-4372
jonathan.raphaelson(a)colorado.edu
jonraphaelson(a)gmail.com
>If using LaTeXTidy.pl and your LaTex Tidy bundle command, were should
>LaTeXTidy.pl be placed. I tried usr/local/bin but that did not work.
>Should I place it inside the bundle itself.
First, make sure it's set to execute (chmod +x LaTeXTidy.pl). Then
either place it in your PATH and call it as LaTeXTidy.pl or put it
somewhere you like, e.g. /usr/local/bin/LaTeXTidy.pl and call it with
its full path in the command. I hope that works!
If you put it in the same bundle as the command, then call it with
wither the full path if you know it, or with
"$TM_BUNDLE_PATH"/LaTeXTidy.pl if you think you might move it someday.
Good luck, Eric
ps. Backup your documents! Check! This works for me, but you should
be cautious.
I'd like to play around a bit with an alternative light-on-dark color
scheme for my bundles, but, in the same way that I can't draw a
straight line with a ruler (but can appreciate architecture) I am
completely inept at picking text colors that have high contrast and
look good (but I know them when I see them).
I know someone (or someones) whipped up a C bundle with a light-on-dark
scheme, but I can't seem to find it anywhere. I thought I might start
by looking at that, but what might be better is if someone could point
me to a resource that had examples of high-contrast color schemes for
text highlighting. :-)
Anyone?
Thanks,
B
--
__ ____
/ / / __/ Brian Lalor
/ _ \/__ \ blalor(a)bravo5.org
/_.__/____/ http://bravo5.org/
Here is a little command I've written (as usual, a wrapper around a
Perl script), which naively tries to indent your LaTeX file
intelligently. If it succeeds, there are two good side effects.
First, your file looks nicer. Second, your file foldings work
correctly, as TM is cued by the indentation.
Good luck. Check the file, if you use it. It works for me, your
mileage may vary.
I've appended the one-liner version. Since it is a blob of line
noise, I also have a link to the latest version of the uncompressed
Perl, which is at
<http://anon:anon@macromates.com/svn/Bundles/trunk/Latex.tmbundle/LaTeXTidy.…>
You can put that somewhere and write a command to call it instead.
I suspect anyone with issues with the folding could customize this
script for their language if necessary. I know PerlTidy and HTMLTidy
exist. I couldn't find a TeXTidy, so I wrote this last year...
- Eric
--
Before: Nothing
STDIN: Entire
STDOUT: Replace doc
Command:
perl -e 'my$in;while(<STDIN>){$in.=$_;}my@keywords=qw( appendix
author bibliography bigskip chapter date def document
evensidemargin font headheight headsep include index make new
noindent oddsidemargin page paragraph part ragged renew
section subsection subsubsection subsubsubsection table
textheight textwidth title topmargin use
vfil);$in=~s/\%(.*?)\n/\n\n\%$1\n\n/g;my@pieces=split(/\n\s*\n/,$in);my$string,$keyword;foreach(@pieces){if(/^\s*\%/){$string.=$_."\n";next;}s/\s+/
/g;foreach$keyword(@keywords){s/(\\$keyword)/\n$1/g;}s/([^\\]\%)/\n$1/g;s/(\\begin\{)(.*?)(\})/\n$1$2$3\n/g;s/(\\end\{)(.*?)(\})/\n$1$2$3\n/g;s/(\\item)(.*?)(\\item)/$1$2\n$3/g;s/(\\item)/\n$1/g;s/[^\\](\\\[)/\n$1/g;s/(\\\])/$1\n/g;s/(\\\\)\s/$1\n/g;s/(\\\\\[)(.*?)(\])\s/$1$2$3\n/g;s/\n\s*\n/\n/g;s/^\n//;chomp;$string.=$_."\n\n";}$string=~s/\n\s+\n/\n\n/g;$string=~s/(\%[^\n]*)(\\)(end)/$1$2\{\n\n\n\}$3/g;$string=~s/(\%[^\n]*)(\\)(begin)/$1$2\{\n\n\n\}$3/g;$string=~s/(\\end)/\[\n\n\n\]$1/g;$string=~s/(\\begin)/\[\n\n\n\]$1/g;@pieces=split(/\[\n\n\n\]/,$string);my$indent=1;my@lines;my$piece,$i;$string="";foreach$piece((a)pieces){$piece=~s/\{\n\n\n\}//g;$piece=~/^\\(.*?)\{/;if(lc($1)eq"begin"){$indent++;}else{$indent--;}@lines=split(/\n/,$piece);foreach(@lines){s/^\s+//;if(/^\\begin/i){for($i=1;$i<=$indent-1;$i++){$string.="\t";}}else{for($i=1;$i<=$indent;$i++){$string.="\t";}}$string.=$_."\n";}}print$string;'
I love the new mode-based menu interface for macros/snippets/commands.
What I'd really love is if I could control which mode menu they show
up in.
For example, I've made a couple of commands that are related to HTML.
However, since I've made them myself, they show up under the "Custom"
menu, when I'd really like them to be under "HTML". Maybe, like with
the syntax files, a "mode" key could be added to the
macros/snippets/commands plist files where I could specify which mode
they should be a part of?
What do you think? Thanks much.
Wow--I use TextPad daily on my PC at work and always wished there was a
text editor like it for the Mac where I could easily switch between
documents with tabs. And the ability to call a shell script to do a
word count or any other UNIX command and have the output appear as a
tooltip, new window, or whatever you want--brilliant, and really easy
to use. This is probably the first time I've wished TextPad could do
some things a Mac editor can do, and not vice versa.
There's only one seemingly minor thing that's keeping me from buying
TextMate right now and retiring Tex-Edit Plus--TextMate's auto-identing
feature, where if I have a paragraph of text (not code), it
automatically inserts a tab on the next line when I hit return. This
drives me nuts because while I use my Mac editor for HTML at times, I
mainly use it to write documents that have normal indented paragraphs
of text. At the end of a paragraph in a word processor or email
program I'm conditioned to hit return, then hit tab for the next
paragraph--so having TextMate indent the next paragraph automatically
just means I end up with two tabs.
Does anyone know if there's a way to turn off auto-indenting of new
lines, or is that a feature being considered for a future release? If
there is a way to turn that off and I just can't find it, I apologize
for being an idiot in advance...anyway, thanks to the developer for
creating this, keep up the good work,
-Brian
Is it possible to close files that are open in tabs that are not
visible, i.e., located in the tab overflow without disturbing tabbed
files that are visible?
Greetings,
I'm just wondering if there is a graphic interface for key bindings in
the pipeline -- it seems to me that it would be in line with the
emphasis on customizability in TM to not have to tinker with a .dict
file. :)
Ciao,
David
hi
just a newly registered textmate user. and its great. i was wondering
if it will be possible (or if im missing it) to create a new tab (as in
a new file) within a project instead of having to open a new window -
saving it and then going back to my project where i can then see the
file and open it in a tab and edit it.
thanks
eoghan
>I'm not wedded to the colors, either, BTW.
A healthy attitude! But oh man, I don't want to go there. I always
like black on white text, and I know others love the dark green on
sage thing or black on white, and it gets very religious. Sort of
like tabs. :)
So I'm just adjusting syntaxes by hand and waiting until Allan adds
the magic CSS syntax coloring thing.
- Eric
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
>I would like to automate some customization for some bundles (as
>colors), is the format in those .plist files standard (for instance
>Perl.plist)? If it is and you wanted to search for a parser for some
>programming language which keyword would you use?
If you are asking whether the 'names' of each color class (e.g.
Comments) in the .plist is standard across the bundles, I'd say it
would be a miracle if they were, since they were all hacked by
individuals who wanted their favorite language colored.
On the other hand, it might be possible for people to agree to use
keywords in their names so the XML could be parsed and the color
settings could be custom set by a big regexp search and replace.
For the record, BBEdit 8 recognizes the following colors for customization:
General: Foreground, Background
Guide Contrast [the color of non-page window]
Custom Highlight Color: Primary, Secondary
Highlight Insertion Point Line Color
Source Code: Keywords, String Constants, Comments
HTML Tags: General, Processing Instructions, Anchor, Image, Names, Values
TM bundles generally have more colors than that. But if Bundle
writers could agree on a reasonable base set and rename their names,
that could go a long way towards making the colors customizable
before Allan gets his next solution done.
Allan may have to set standards like this anyway, unless he writes a
small GUI Syntax File browser that displays the Names with a little
Color Picker patch. That would be fabulous, of course.
- Eric
This is a known problem with Launch Services. Basically, any new application (or new version
of) needs to become "trusted" by the OS before other applications can "see" it. To make an
application "trusted" you must double click one of its documents, then you'll be presented
with an alert from the OS that you "are opening this for the first time" blah blah. From that
point, the application is "trusted".
As a little advertisement, Yummy FTP works around this problem :-)
Hope that helps.
Best regards,
Jason
Jason Downing
----------------------------------
Yummy Software
Software so good you could eat it. Yum!
www.yummysoftware.com
----------------------------------
> A follow up...
>
> Removing the cache stuff didn't solve the problem. Eventually things
> started working after I did a "open with..." on a file. I don't know
> if it depended on having removed the cache before. Just finding and
> opening the app (and opening files from within) didn't do it.
>
> If it gets messed up again, I'll be able to test further. :)
>
>
> On Jan 3, 2005, at 10:55 PM, Allan Odgaard wrote:
>
> > On Jan 4, 2005, at 3:33, Patrick Kelly wrote:
> >
> >> My Fugu stopped finding TextMate. I don't know if where the prob is.
> >>
> >> I've got Fugu 1.1.2rc1 in my Applications folder,
> >> and TextMate 1.1b1 in my Applications folder too.
> >
> > Sounds like the Launch Services cache problem:
> > http://lists.macromates.com/pipermail/textmate/2004-December/
> > 001774.html
> >
> > ______________________________________________________________________
> > For new threads USE THIS: textmate(a)lists.macromates.com
> > (threading gets destroyed and the universe will collapse if you don't)
> > http://lists.macromates.com/mailman/listinfo/textmate
> >
>
> ______________________________________________________________________
> For new threads USE THIS: textmate(a)lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate
>
>
Hello,
Greame Merrall pointed out to me that the lookup aspect of the phpcc
tool (http://ian.ardes.com/phpcc) was not working quite right (thanks
Graeme). The problem is that the manual page lookup does not work when
the current function has been expanded from a partial word.
To fix this change line 19 of phpcc.php to:
storeLookupWord($matching[0]);
I'm hoping to release a new version of this soon, with some more
features, and with an easier installation process.
Cheers,
Ian White
Man, I wish I'd had this iCalendar bundle when I was working on my
last little project...
Anyway, I submitted two bug fixes using SVN:
- DTEND was getting highlighted as a END: event. Changed to look for
^BEGIN and ^END.
- Also removed '' from highlighting, as events like SUMMARY:Go to
Mom's house were getting wrongly highlighted.
Chris can always revert it if he doesn't like the changes...
- Eric
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
My Fugu stopped finding TextMate. I don't know if where the prob is.
I've got Fugu 1.1.2rc1 in my Applications folder,
and TextMate 1.1b1 in my Applications folder too.
I tried downgrading both items but haven't been able to find a
combination that works.
I found this:
<dict>
<key>ODBEditorBundleID</key>
<string>com.macromates.textmate</string>
<key>ODBEditorCreatorCode</key>
<string>TxMt</string>
<key>ODBEditorLaunchStyle</key>
<integer>0</integer>
<key>ODBEditorName</key>
<string>TextMate</string>
</dict>
in /Applications/Fugu.app/Contents/Resources/ODBEditors.plist
What am I doing wrong?
On a related note, I just downloaded the latest Cyberduck 2.4b1 and it
now has TextMate in the pulldown selection for editors, but TextMate is
grayed out.
TIA
I've fixed the package name generation for the templates in the Java
bundle. I've implemented a bit of configurability to the bundle by
using a custom shell variable (set in the TM preferences) to override a
default regular expression. Check the source for details. If others
follow my example, I recommend implementing a reverse domain namespace
schema; I'm using "org_bravo5_Java" for variables used by the Java
bundle.
The newest version is (always, now) available at
http://telly.bravo5.org/~blalor/bundles/Java.tmbundle.tar.gz
--
__ ____
/ / / __/ Brian Lalor
/ _ \/__ \ blalor(a)bravo5.org
/_.__/____/ http://bravo5.org/
I would like to automate some customization for some bundles (as
colors), is the format in those .plist files standard (for instance
Perl.plist)? If it is and you wanted to search for a parser for some
programming language which keyword would you use?
-- fxn
How do I get all my txt, html, css, php, js, rb, and sql files to open
in textmate by default on OSX? It seems some of these extensions have
been hijacked and I don't know how to remap them globally. I'm a fairly
recent "switcher."
-t
>>It works pretty well and it catches in a 'jumpable way'
>>most of the errors and warnings that pdflatex produces. I leave it to
>>others to customize the path to pdflatex...
>
>This would work indeed, although I have the feeling it's a bit overkill
>to do this with perl ;)
Hey, it's only 56 characters in Perl!! :) Anyway, I wanted to get
it working before Allan comes out with an eventual fix.
>>Preview has an annoying habit of not refreshing files when they are
>>re-opened; otherwise this would be a complete replacement for TexShop.
>
>I use TeXniscope[1], which speaks a bit of applescript and is able to
>refresh the pdf.
Excellent recommendation! I changed my command to open TeXniscope instead.
- Eric
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
Hi,
Since I upgraded to 1.1b1, at least some commands stopped working, and
log the following:
2005-01-03 11:39:32.683 TextMate[1804] *** -[NSCFDictionary
setObject:forKey:]: attempt to insert nil value
Is it possible to download the previous beta?
Cheers,
-Ralph.
>- If TextMate could also jump to the place in the output where the error
>was produced, it would be great, because context is often important in
>finding the cause of the error and it's very hard to define regexps to
>grasp all those things.
I am having trouble picturing this suggestion. An example?
>- Allow for multi-line captures: (pdf)latex produces quite verbose
>errormessages that almost always are on two lines. I haven't been able to
>get TextMate to catch both lines and let me see it back in the overview.
I 100% agree with this. This would be the equivalent of a flag on the
regexp of searching across newlines.
FYI, I had this exact issue and here is the command I wrote to work
around it. Basically, I put pdflatex into a nonstop mode and pipe it
through a script to erase any newline that isn't part of multiple
newlines. Then I figure out the name of the resulting .pdf file and
open it in Preview. It works pretty well and it catches in a
'jumpable way' most of the errors and warnings that pdflatex
produces. I leave it to others to customize the path to pdflatex...
Preview has an annoying habit of not refreshing files when they are
re-opened; otherwise this would be a complete replacement for TexShop.
I hope this is helpful! - Eric
---
Before Cmd: Save
Cmd:
/usr/local/teTeX/bin/powerpc-apple-darwin-current/pdflatex
-interaction=nonstopmode -file-line-error-style "$TM_FILEPATH" |
perl -e 'while(<>){$f.=$_}$_=$f;s/([^\n])\n([^\n])/$1$2/g;print;'
echo
echo "Previewing..."
echo $TM_FILEPATH | perl -e 'while(<>){s/\.tex$/.pdf/;print;}' | xargs open
Stdin: None
Stdout: Show in separate window
Pattern: (\d+|LaTeX Warning): (.*?)$
Format: $1: $2
File:
Line: 1
Col:
Hi All,
I packed up all my java snippets and commands and integrated them with
the nice syntax and template stuff that already existed in the Java
bundle.
Attached you will find a tarred and gziped Java.tmbundle. It adds a
truckload of capabilities. Just slap it in one of the appropriate
directories that TextMate looks in for bundles and tar xvfz
Java.tmbundle.tar.gz, restart TextMate and fly!
Allan,
I would like to get this shipping with TextMate if you are interested.
I think a lot of Java programmers would enjoy this stuff.
Lang Riley
Hi,
I love the way TextMate allows me to catch errors from the output and
make them clickable, so that I can quickly correct them.
But I think this process can be improved even more with two requests:
- Allow for multi-line captures: (pdf)latex produces quite verbose
errormessages that almost always are on two lines. I haven't been able to
get TextMate to catch both lines and let me see it back in the overview.
- If TextMate could also jump to the place in the output where the error
was produced, it would be great, because context is often important in
finding the cause of the error and it's very hard to define regexps to
grasp all those things.
Thanks,
Jeroen.
Command purpose: Do a reasonably valiant attempt to locate all senders
of a particular message/method within the project.
Usage: Highlight the method name, excluding the parameter portion of
the method signature, and execute this command. It will search across
all source in your project and return a clickable list of method
invocations. It doesn't work perfectly, but it often works very
satisfactorily. Example, you would like to find all the places where
public void handleRequest(HttpServletRequest request,
HttpServletResponse response) is used, simply highlight handleRequest
and execute the command which will bring up a window with links to
these occurrences.
Command:
grep -rn "\.$TM_SELECTED_TEXT(" $TM_PROJECT_DIRECTORY | grep "\.java"
Standard Input: None
Standard Ouput: Show in separate window
Pattern: ^.*\/(\w+\.java):(\d+):.*
Format string: $1 $2
File register: 1 Line: 2
Command purpose: Do a reasonably good job of finding all declarations
of a particular method within the project.
Usage: Same as above.
Command:
grep -rn "[ ]$TM_SELECTED_TEXT(" $TM_PROJECT_DIRECTORY | grep "\.java"
Standard Input: None
Standard Ouput: Show in separate window
Pattern: ^.*\/(\w+\.java):(\d+):.*
Format string: $1 $2
File register: 1 Line: 2
Command purpose: Do a reasonably good job of finding a class definition
within the project.
Usage: Same as above, but highlight the class name. Example,
Dispatcher d = new DispatcherServlet();, highlight DispatcherServlet
and execute the command. This will bring up a window with clickable
links to each declaration found.
Command:
egrep -rns "class[ ]+$TM_SELECTED_TEXT[ ]+" $TM_PROJECT_DIRECTORY |
grep "\.java"
Standard Input: None
Standard Ouput: Show in separate window
Pattern: ^.*\/(\w+\.java):(\d+):.*
Format string: $1 $2
File register: 1 Line: 2
Command purpose: Do a reasonably good job of finding an interface
definition within the project.
Usage: Same as above, but highlight the class name. Example,
Dispatcher d = new DispatcherServlet();, highlight Dispatcher (assuming
it is an interface) and execute the command. This will bring up a
window with clickable links to each declaration found.
Command:
egrep -rns "interface[ ]+$TM_SELECTED_TEXT[ ]+" $TM_PROJECT_DIRECTORY |
grep "\.java"
Standard Input: None
Standard Ouput: Show in separate window
Pattern: ^.*\/(\w+\.java):(\d+):.*
Format string: $1 $2
File register: 1 Line: 2
Command purpose: Open a window listing all the methods found in a
particular class. assuming the class containing the method definitions
exists in the project.
Usage: Highlight the class name for which you would like to search,
then execute the command. This will bring up a window, no links sorry,
that lists the method signature for each of the methods local to that
class, i.e., non-inherited methods. I find this useful when I quickly
want to find what methods are available without having to search for
the file or read documentation.
cat `egrep -rnsl "class[ ]+$TM_SELECTED_TEXT[ ]+" .` | egrep "public[
]+\<.*\>[ ]+\<.*\>\(.*\)[ ]+(throws .*|){"
Standard Input: None
Standard Ouput: Show in separate window
Pattern: ^.*\/(\w+\.java):(\d+):.*
Format string: $1 $2
File register: 1 Line: 2
Enjoy,
Lang Riley
Below are some useful java snippets and their explanations that I
created. I will try to take the time later to add them to the wiki:
Snippet result: Create a class in java with auto-generated package
name, author, date, class name.
Usage: For the autogeneration of the package you should create your
class file in its proper location, e.g., org.foo.bar.Batz.java would be
created in the directory bar which is a subdirectory of foo and org
directories. The autogeneration of package name and classname also
assumes that your class package directory structure has as its parent
directory a directory named 'src'. You can of course change that in
the third call to sed for both the package name and the class name.
Trigger: jcl (or whatever you want to trigger it with)
Snippet:
${1:package `echo $TM_FILEPATH | sed 's/\//./g' | sed 's/^.//' | sed
's/.*src.//' | sed 's/.[A-Za-z]*.java//g'`};
/**
* ${2:`echo $TM_FILEPATH | sed 's/\//./g' | sed 's/^.//' | sed
's/.*src.//' | sed 's/.*\.\([A-Za-z]*\).java/\1/g'`}
*
* @author ${9:`niutil -readprop / /users/$USER realname`}
* @since `date +%D`
*/
public class ${2:`echo $TM_FILEPATH | sed 's/\//./g' | sed 's/^.//' |
sed 's/.*src.//' | sed 's/.*\.\([A-Za-z]*\).java/\1/g'`} ${3:extends}
$4 ${5:implements} $6${7:,}$8 {
$0
}
Snippet result: Create a private scoped variable. Not that useful,
but heh, it is here if you want it.
Usage: No explanation necessary.
Trigger: jpv
private ${1:String} $2;
$0
Snippet result: Create a public scoped method
Usage: No special comments. Pretty straight forward.
Trigger: jpum
Snippet:
/**
* $2
*
* @param $4 $5
* ${6:@return} $7
*/
public ${1:void} $2(${3:String} $4) {
$0
}
Snippet result: Create an if statement with guard comment
Usage:
Trigger: jif
Snippet:
if ($1) { // $2
$0
}
Snippet result: Create a privately scoped method.
Usage:
Trigger: jpm
Snippet:
/**
* $2
*
* @param $4 $5
* ${6:@return} $7
*/
private ${1:void} $2(${3:String} $4) {
$0
}
Snippet result: Create a while statement with guard comment
Usage:
Trigger: jwh
Snippet:
while ($1) { // $2
$0
}
Snippet result: Create a try/catch/finally block
Usage:
Trigger: jtc
Snippet:
try {
$2
} catch ($1 e) {
$3
} finally {
$0
}
Snippet result: Create a class variable/constant.
Usage:
Trigger: jps
Snippet:
private static final ${1:String} $2 = "$0";
Snippet result: Create an if/else statement with guard comments
Usage:
Trigger: jelse
Snippet:
if ($1) { // $2
$0
} else { // $3
}
Snippet result: Create the package imports and instantiation code for
using jakarta commons logging package.
Usage: I would suggest executing the snippet in the import area of you
class definition and then cut/pasting the instantiation code to the
private member variable declaration area.
Trigger: jlog
Snippet:
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/** Logger for this class and subclasses */
protected final Log logger = LogFactory.getLog(getClass());
Snippet result: Create a JUnit TestCase subclass for unit testing.
Auto-generates the package name and the proper imports for the class
that will be tested.
Usage: Assumes JUnit unit test class naming convention is followed
whereby if a class named UserDao is being unit tested, the unit test
class would be named UserDaoTests.java and would be located in a
parallel directory structure analogous to its package name. Also
assumes, as is standard convention, that unit test packages have as
their parent directory 'test' and the classes which they test have the
parent directory of 'src'. For example, UserDao.java would be located,
let's say, in src/org/foo/bar/dao/ and its unit test class,
UserDaoTests.java, would be in test/org/foo/bar/dao/. Of course, if
you don't work that way, you can message the regular expressions to
suite your environment.
Trigger: jtest
Snippet:
package `echo $TM_FILEPATH | sed 's/\//./g' | sed 's/^.//' | sed
's/.*test.//' | sed 's/.[A-Za-z]*.java//g'`;
import junit.framework.TestCase;
import `echo $TM_FILEPATH | sed 's/\//./g' | sed 's/^.//' | sed
's/.*test.//' | sed 's/Tests.java//'`;
/**
* ${2:`echo $TM_FILEPATH | sed 's/\//./g' | sed 's/^.//' | sed
's/.*test.//' | sed 's/.*\.\([A-Za-z]*\).java/\1/g'`}
*
* @author ${4:`niutil -readprop / /users/$USER realname`}
* @since `date +%D`
*/
public class ${2:`echo $TM_FILEPATH | sed 's/\//./g' | sed 's/^.//' |
sed 's/.*test.//' | sed 's/.*\.\([A-Za-z]*\).java/\1/g'`} extends
TestCase {
private ${5:`echo $TM_FILEPATH | sed 's/\//./g' | sed 's/^.//' |
sed 's/.*test.//' | sed 's/Tests.java//' | sed
's/.*\.\([A-Za-z]*\)$/\1/'`} ${6:`echo $TM_FILEPATH | sed 's/\//./g'
| sed 's/^.//' | sed 's/.*test.//' | sed 's/Tests.java//' | sed
's/.*\.\([A-Za-z]*\)$/\1/' | perl -e 'print lcfirst(<>)'`};
public ${5:`echo $TM_FILEPATH | sed 's/\//./g' | sed 's/^.//' | sed
's/.*test.//' | sed 's/Tests.java//' | sed 's/.*\.\([A-Za-z]*\)$/\1/'`}
get${5:`echo $TM_FILEPATH | sed 's/\//./g' | sed 's/^.//' | sed
's/.*test.//' | sed 's/Tests.java//' | sed
's/.*\.\([A-Za-z]*\)$/\1/'`}() { return this.${6:`echo $TM_FILEPATH |
sed 's/\//./g' | sed 's/^.//' | sed 's/.*test.//' | sed
's/Tests.java//' | sed 's/.*\.\([A-Za-z]*\)$/\1/' | perl -e 'print
lcfirst(<>)'`}; }
public void set${5:`echo $TM_FILEPATH | sed 's/\//./g' | sed
's/^.//' | sed 's/.*test.//' | sed 's/Tests.java//' | sed
's/.*\.\([A-Za-z]*\)$/\1/'`}(${5:`echo $TM_FILEPATH | sed 's/\//./g' |
sed 's/^.//' | sed 's/.*test.//' | sed 's/Tests.java//' | sed
's/.*\.\([A-Za-z]*\)$/\1/'`} ${6:`echo $TM_FILEPATH | sed 's/\//./g' |
sed 's/^.//' | sed 's/.*test.//' | sed 's/Tests.java//' | sed
's/.*\.\([A-Za-z]*\)$/\1/' | perl -e 'print lcfirst(<>)'`}) {
this.${6:`echo $TM_FILEPATH | sed 's/\//./g' | sed 's/^.//' | sed
's/.*test.//' | sed 's/Tests.java//' | sed 's/.*\.\([A-Za-z]*\)$/\1/' |
perl -e 'print lcfirst(<>)'`} = ${6:`echo $TM_FILEPATH | sed
's/\//./g' | sed 's/^.//' | sed 's/.*test.//' | sed 's/Tests.java//' |
sed 's/.*\.\([A-Za-z]*\)$/\1/' | perl -e 'print lcfirst(<>)'`}; }
public void test$8() {
$0
}
}
Snippet result: Create public getter/setter pair for a private instance
variable. This really comes in handy if you do a lot of dependency
injection style development, for bean properties.
Usage:
Trigger: jprops
Snippet:
public $1 get$2() { return this.$3; }
public void set$2($1 $3) { this.$3 = $3; }
Snippet result: Create a JSTL output statement for jsp code.
Usage:
Trigger: jcout
Snippet:
<c:out value="\${$1}"/>$0
Snippet result: Create an interface definition with autogenerated
package name, interface name, author name, and date.
Usage: Same as the usage for the java class snippet.
Trigger: jid
Snippet:
${1:package `echo $TM_FILEPATH | sed 's/\//./g' | sed 's/^.//' | sed
's/.*src.//' | sed 's/.[A-Za-z]*.java//g'`};
/**
* ${2:`echo $TM_FILEPATH | sed 's/\//./g' | sed 's/^.//' | sed
's/.*src.//' | sed 's/.*\.\([A-Za-z]*\).java/\1/g'`}
*
* @author ${3:`niutil -readprop / /users/$USER realname`}
* @since `date +%D`
*/
public interface ${4:`echo $TM_FILEPATH | sed 's/\//./g' | sed
's/^.//' | sed 's/.*src.//' | sed 's/.*\.\([A-Za-z]*\).java/\1/g'`} {
$0
}
Hope it helps someone, it sure has saved me a ton of typing.
Regards,
Lang Riley
I've been trying to get into the habit of using CVS, so I have created
a few TM command scripts that performs the basic CVS shell commands.
HOW do I convert the text returned from a Finder display dialog script
into a shell variable ????
sort of like this:
osascript -e "tell application \"Finder\"
display dialog \"mxCVS::Commit Message\" default answer
theDefaultAnswer buttons {\"Cancel\", \"OK\"} default button 2
set the theMessage to the text returned of the result
end tell"
$CVSmsg = output from the above AS script
I'm having a bug problem with the Applescript execution of "do shell
script", as AS can't somehow access $CVSROOT from .bash_profile or even
from /etc/profile which really pisses me off. Every other aspect of
CVS works OK, but not through AS.
Kind regards,
Mats
I wanted to have a beta out before the new year, so it's now available
:) I'm 'announcing' it since it turns out the automatic version check
was broken around 1.0.2b8 or so, in that it doesn't schedule a check
before the preferences window has opened.
So just open the preferences, and you should be told about it (if beta
versions are included in the check).
This bug actually lead to interesting statistics, because I can
correlate number of downloads with number of version checks (based on
IP address) and estimate how many actually open the preferences, which
is ~25%.
Beta 1 is btw only a minor update, as December wasn't my most
productive month. But it does feature mode-dependent lookup for
snippets and macros, which I think is rather cool :)
> > 1. Allow undo from find/replace dialog. Lots of times I enter in the
> > wrong regular expression and the find/replace goes badly. I want to
> > hit apple-Z and Undo it and fire up another search, but instead I have
> > to switch to the text window.
>
>hmm... so undo should fall through to the main window? currently I
>could do that, but if I introduce a multi-line mode for the
>find/replace strings it would probably be natural for these to also
>have undo/redo, which would then clash!?!
That's true too; it would be great to someday have undo in the
textbox. And maybe even commands! :)
Maybe instead of my suggestion there could be a little button on the
Find/Replace box that says Undo Last Replace?
2. PDF
Webkit already gives you PDF viewing for free, if you have Schubert's
PDF Plugin (doesn't everyone?) For instance, you can enter in the url
of a PDF file in TM's web preview and view PDFs right now. I just
need a way to tell TM to show a PDF in the web preview.
- Eric
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
A few small requests for this marvelous editor.
1. Allow undo from find/replace dialog. Lots of times I enter in the
wrong regular expression and the find/replace goes badly. I want to
hit apple-Z and Undo it and fire up another search, but instead I
have to switch to the text window.
2. It would be great if the new ( :) ) txmt: resource locator allows
us to load things like txmt://a.pdf, which would then get loaded into
the web preview window. Reason: I want to hack up a replacement for
TeXShop within TM. Already you can make a command to have pdftex
create a .pdf output file and open it in Preview. I'd like it to show
up in TM! It would feel cleaner that way.
3. Allow syntax files to be reloaded. Then we could edit them within
TM and see the results without quitting and restarting.
best wishes, Eric
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
here is a better google search command that escapes spaces and uses
highlighted text rather than the current word:
open http://www.google.com/search?q=`echo $TM_SELECTED_TEXT | sed 's/
/+/g'`
Standard input: selected text
Standard output: discard
Hi,
can you please make find/replace settings persistent between sessions
the way other settings are?
They revert to their default values each time I restart the editor.
David
Hi,
a common practice is to let Undo undo all characters entered during
last stroke (that is, not interrupted by movements or other operations
(find/replace/search) at once. That is, If I type a few words, then
press Option-Z, I expect all the words to disappear, not one letter at
a time. This is the way undo works in most environments, including
emacs, vi, TextEdit, AppleWorks, sam, acme, Word ...
David
howdy,
i just stumbled upon TextMate while looking for a native development
text editor and am _very_ impressed with it's featureset and believe i
will be purchasing soon.
i am wondering, however, if there is anyone out there who has
developed (or _loves_ to develop ;)) a syntax highlighting plist /
bundle for the Velocity Template Language
(http://jakarta.apache.org/velocity/vtl-reference-guide.html)? i am
terrible with regular expressions unfortunately, so i'm not having
much luck with it. it's basically a dynamic language like php or asp
and is mainly used in web (html type) files which can include css,
javascript, xml / xsl etc.... the best / closest type i've found to
work is the ASP style. it's _very_ close but would like to have
certain things highlighted differently and it's missing (obviously
since it's a different language) a bunch of declarations. i am
desperate for this type of highlighting.
if anyone is interested in helping me out, i could send an example
file that includes javascript, xml / xsl, css and Velocity markup. any
takers??
thanx in advance, jamal
Hi,
I'm attaching the compile script I use, or actually combination of scripts.
The compile script expects to get nothing as input and discards its output,
and the 'save active file before running command' thing should be on. The
command that runs it is:
compile-tm "$TM_FILEPATH" >/dev/null 2>&1 &
Two points:
- This reports on how things went via Growl---and it doesn't check if you
have it installed---so if you don't use it, you might want to go into the
'compile-report' script and change the Growl stuff to something else, like
maybe an AppleScript dialog box. (Just redirecting the output of the script
to a tooltip won't work without serious additional fiddling.)
- This tries to preview using TeXniscope.
The typeset script works analogously. I'm also attaching a script that goes
to the next TeX error by looking at the output file and piloting TM via
AppleScript (which is a bit slow and causes the 'go to line' dialog box to
appear briefly), and one that compiles the current selected text (but
requires the whole document as input).
Hope some of this might be of some use... It's not particularly earth-
shattering, but works OK for me.
On Dec 30, 2004, at 6:14 AM, Ivar Åsell wrote:
>
> From: Ivar Åsell <ivar(a)enskede.net>
> Date: 2004/12/30 Thu AM 05:14:54 CST
> To: TM Users <textmate(a)lists.macromates.com>
> Subject: [TxMt] Help with LaTeX-build command
>
> Hi!
>
> I would like to be able to do this in TM
>
> 1. select a .tex-file
> 2. run a macro that
> 2.1 selects all text
> 2.2 runs that text through a "tex-compiler" wich listens to stdin
> 2.3 pipe the results from the "tex-compiler" to the preview-app (can
> this too listen to stdin?) which show me a nice pdf
>
> And if I like the results I can save the .tex-file otherwise not.
> The main point here is that I which to see the pdf without having to
> save my .tex-file.
>
> Would someone help me with this?
> I have an idea on how this is supposed to be done...
>
> 1. record a macro (alt-cmd-m)
> 2. select all text (cmd-a)
> 3. filter through command (shift-alt-r)
> 3.1 input: selection
> 3.2 output: ? discard?
> 3.3 command: ??? something like "<build pdf> | open -a
> /Applications/Preview.app"
>
> I just read that "open" cannot read from stdin so I guess it has to be
> some other way around.
> Please, I'm really lousy at this stuff.
> Help would be much appreciated!
>
> Kindest Regards
> Ivar
>
> ______________________________________________________________________
> For new threads USE THIS: textmate(a)lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate
>
Hi!
I would like to be able to do this in TM
1. select a .tex-file
2. run a macro that
2.1 selects all text
2.2 runs that text through a "tex-compiler" wich listens to stdin
2.3 pipe the results from the "tex-compiler" to the preview-app (can
this too listen to stdin?) which show me a nice pdf
And if I like the results I can save the .tex-file otherwise not.
The main point here is that I which to see the pdf without having to
save my .tex-file.
Would someone help me with this?
I have an idea on how this is supposed to be done...
1. record a macro (alt-cmd-m)
2. select all text (cmd-a)
3. filter through command (shift-alt-r)
3.1 input: selection
3.2 output: ? discard?
3.3 command: ??? something like "<build pdf> | open -a
/Applications/Preview.app"
I just read that "open" cannot read from stdin so I guess it has to be
some other way around.
Please, I'm really lousy at this stuff.
Help would be much appreciated!
Kindest Regards
Ivar
Hi,
have you considered installing a web-based bug-tracking system
(bugzilla/RT/gnats/???) so users can submit bug reports and requests
for enhancements? It is much easier to track changes this way.
David
On Dec 30, 2004, at 0:25, Lars Pind wrote:
> [ default file/folder patterns ] So other people experiencing this
> problem, that's something to look for.
>
> Question for Allan: Is this on purpose?
The file/folder patterns are pretty much the result of evolution :)
I'm aware of the caveat about the preferences not reflecting existing
folder references. Interestingly I actually added this text to the
preferences pane yesterday -- but ideally it should affect non-changed
folder-reference patterns.
> It seems very confusing that there's a preferences pane setting that
> doesn't have any effect.
They are defaults (as implied by the label), i.e. used when creating
new folder references. But your critique is fair.
I'd like to be able to set my "indentation level" to 4 and leave the
tab stops at 8. That is, if I hit my tab key the cursor should move as
if my tabs stops are set at 4 (any any spaces required should be
added). If there are any actual tab characters in the file, the file
should display as if I had selected 8 as my tab size. (Basically this
is because I edit files that other people have edited using emacs which
"intelligently" uses tabs where it can to fill in sequences of 8
spaces.)
I was playing with the notion of expanding all the tabs to spaces so
that it will display properly even if I have my tab size set to 4, but
I'm afraid this will cause lots of extraneous differences when I check
in my changes to CVS.
Another item is that when I'm working in Tcl I want my indentation
level to be 4 characters. When working in PL/SQL I want it at 8.
(Probably in C or C++ I'd want 2 or 3.)
Allan,
It would be nice if the contextual menu for folders had an option
"Expand All" or some such that would expand all sub folders of the
currently selected folder.
Thanks.
Some features of the "bbedit" command line tool are discussed in this
review of BBEdit 8.0:
http://www.macdevcenter.com/pub/a/mac/2004/12/21/bbedit.html?CMP=ILC-
macrss&ATT=BBEdit+8.0++A+Developers+Viewpoint
For my taste, the notable bits are:
(1) The '--clean' option for suppressing the 'Do you want to save
changes?' dialog.
(2) The tool is installed from a button in the preferences.
Just some food for thought/discussion for the eventual TextMate
command-line tool.
Chris
> An Even Cooler Command Line
> I do quite a bit of work from the Terminal (well, iTerm, really)
> command line, and the new BBEdit Unix tool is useful in all the ways I
> wish the previous versions were. Before, I had to give BBEdit the -c
> switch to create a new document. Now, it figures that out on it's own.
> If I have the preferences set to open new documents in the front
> window, when the BBEdit tool opens multiple documents, they open in
> the same window.
>
> The latest update makes it even better. I can now pipe output from a
> command line process into BBEdit without creating an unsaved document.
> That way, I don't have to go through the annoying "Do you want to save
> changes" dialog. Once I've seen it and want to get rid of it, I just
> close the document.
>
> % netstat -rn | bbedit --clean
>
> I wish I had this feature for the "Unix Script Output" window I get
> when I choose "Run" from the "#!" menu (which I've set to
> Shift-Apple-R with the "Set Menu Keys..." item from the BBEdit menu.
>
> It gets even better, though. If I want to look at piped output, I want
> to read it from the top. Previously, BBEdit placed the curser at the
> end of the output, but I can now start off at the top of the output.
> % netstat -rn | bbedit --clean -view-top
>
> To get this updated version of the command line tool, you have to go
> to the Preferences. In the Tools pane, click on the button that says
> "Install Command Line Tools," which installs the latest versions of
> BBEdit and bbdiff.
>
>
>
With the holidays fast approaching and people drifting away from their
desks to do far more entertaining things than write code all day, I
though this was an appropriate time to:
a) wish everyone a very happy Christmas time, if they celebrate the
festival or not ;)
b) offer my thanks again to Allan for providing us with such a great
product. I spend all day, every day working with TextMate and it's the
first time I've actually felt 'at home' coding on the Mac since
switching last January.
That's all really :)
drew.
I'd like to make a bundle with PL/SQL syntax (didn't look like anyone
did that yet), but I don't see how to specify pairs of folding markers.
Here's an example of what's wrong:
PropertyList-Old.plist has these lines:
foldingStartMarker = "(\\{|\\()";
foldingStopMarker = "(\\}|\\))";
But what causes folds on bad blocks like this:
{ # curly brace
) # parenthesis
I'd like to do blocks like these:
IS -> END;
IF -> END IF;
( -> )
etc.
Possible? I see "pairs" of other things are being handled
(e.g.highlightPairs), perhaps we could do this too!
prl
A while back I posted about the possibility of having a history list
for tabs so that you could use a keyboard shortcut to quickly switch to
the last file you were editing. The resolution proposed was to use
drag sorting to locate the files next to each other, and then use tab
navigation to switch back and forth. With only 3 or 4 visible tabs and
many files open, most of my open files are pushed off the tab bar. Can
you drag sort items if they are not currently visible as a tab?
I still think my history list idea has merit. Maybe everyone else is
far more organized, but I've basically devolved to using the mouse and
the project drawer to switch files -- unless I know I am going to be
editing two files side by side for a while, in which case I will close
one -- switch to the other, then open the first one again so that I
know they are side by side.
I realized that this style of working is essentially what I would like
out of the History List that I proposed. In other words, if you
completely ignore the tab bar as a traditional tab bar, it would
function exactly like the history list if -- when switching to a file
from the project drawer, the file acts as if it was not open, and
appears as a tab to the right of the currently open tab.
I fear I did not explain that well, but the idea is simple. When
selecting a file for edit, first close the file, then open it (or
behave as if this was done). If the file is selected from the tab bar,
then leave the behavior as it is. With this behavior, the tab bar
would become a history list, and it would be simple to swap between
files using the already existing tab navigation shortcuts.
Is anyone else overwhelmed by the tab navigation as it stands? This
metaphor works great for something like browsing -- because I can open
up a new window if I have too many tabs already open in the current
window. I hate to keep bringing up emacs-isms, but the switch buffer
commands are very powerful (switch to last buffer, or switch to buffer
by using filename completion). Combine the project drawer with some
sort of history navigation, and I would be very happy.
Thanks,
Wayne
hi folks,
I am startled but gratified at the response to the Un/Comment hack.
I added a number of fixes and options people have been asking for and
packaged it up into a .tmbundle so you don't have to copy in the
hideous Perl 1-liner (but you can... attached below). In the bundle,
I also included the source code, which is released as Niceware.
That's like the Perl Artistic License, except that you have to be
nice to me when you criticize the code.
The bundle lives at <http://math.sfsu.edu/hsu/textmate>.
Changes
- I added some options. To invoke them, put them on the command line, e.g.
perl -e '...' "$TM_FILEPATH" first-column comment .tex
- so if you want separate comment/uncomment, make two commands with
one option 'comment' and the other 'uncomment'
- I added a bunch of filetype endings, including the ones in Chris
T's beautiful Ruby script.
- fixed Ollivier Robert's newline bug
- Drew McLellan: I added CSS, but sadly, I can only comment each
line, not the whole thing. I hope that is still useable.
Options
# 'first-column' puts the first comment marker at the line start
# 'comment' always comments (for people who want the smartness, but
not the toggleness)
# 'uncomment' always uncomments. If you foolishly use both comment
and this, comment wins.
# 'comment-whitespace' comments whitespace which we normally skip.
# '.tex' will force the use of TeX style comments. You can substitute
your favorite ending, like '.java' or '.pl'. The leading dot is
important. Last type listed wins.
# 'toggle' changes the comment status line by line. Normally, the
whole thing is a block.
best wishes, Eric
---
If you install the thing as a tmbundle, you can also install it as a command as
Before: do nothing
Command:
~/Library/Application\
Support/TextMate/Bundles/UnComment.tmbundle/comment-toggle.pl
"$TM_FILEPATH"
STDIN: Selected
STDOUT: Replace Selected
To install it as a command as a one-liner, with no path issues:
Before: do nothing
Command:
perl -e
'$markers={"pl,pm,rb"=>["#",""],"plist,c,css,m+h,cp,cpp,h,p,pas,js,htc,c++,h++"=>["/*","*/","//",""],"java,cc,mm"=>["//","","/*","*/"],"html,htm,xml"=>["<!--","-->"],"bib,ltx,tex,ps,eps"=>["%",""],"php"=>["#","","/*","*/","<!--","-->","//",""],"mli,ml,mll,mly"=>["(*","*)"],"script,adb,ads,sql,ddl,dml"=>["--",""],"f,f77"=>["C
",""],"inf,f90"=>["!",""],};$tab=4;while(($k,$v)=each(%$markers)){foreach(split(/\s*,\s*/,$k)){$c{"$_"}=$v;}}$_=shift@ARGV;($type)=/\.([^.]*)$/;foreach$option(@ARGV){if($option=~/^\.(.*)$/){$type=$1;}$opt->{$option}++;}unless($c{"$type"}){$type="pl";}($start,$finish,@etc)=@{$c{$type}};$isntfirst=0;while(<STDIN>){push@in,$_;($indent)=/^([
\t]*)/;$indentl=0;foreach$j(1..(length($indent))){$ch=substr($indent,$j-1,1);if($ch
eq"
"){$indentl++;}else{unless($indentl%$tab){$indentl+=$tab;}else{$indentl+=$indentl%$tab;}}}unless($isntfirst){$indentmin=$indent;$indentminl=$indentl;$isntfirst++;}else{if($indentl<$indentminl||$indent
eq""){$indentmin=$indent;$indentminl=$indentl;}}}$isntfirst=0;foreach(@in){$lineend="";if($opt->{"toggle"}){$iscomment=$isfirstofpair=$isntfirst=0;}if(chomp){$lineend="\n";}unless(/\S/){unless($opt->{"comment-whitespace"}){$out.=$_."\n";next;}}unless($isntfirst){$isntfirst=1;foreach$delimiter(@{$c{"$type"}}){$isfirstofpair=1-$isfirstofpair;$delimiterq=quotemeta($delimiter);if($isfirstofpair){if(/^\s*$delimiterq/){$iscomment=1;$start=$delimiter;$startq=$delimiterq;}}elsif($iscomment){$finish=$delimiter;$finishq=$delimiterq;last;}}}if($opt->{"uncomment"}){$iscomment=1;}if($opt->{"comment"}){$iscomment=0;}if($iscomment){s/^(\s*)$startq(\
)?/$1/;s/(\
)?$finishq(\s*)$/$1/;$out.=$_.$lineend;}else{if($opt->{"first-column"}){$out.=$start;unless($indentmin){$out.="
";}$out.="$_";if($finish){$out.="
".$finish;}$out.=$lineend;}else{s/^$indentmin//;$out.=$indentmin.$start."
$_";if($finish){$out.=" ".$finish;}$out.=$lineend;}}}print$out;'
"$TM_FILEPATH"
STDIN: Selected
STDOUT: Replace Selected
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
Similar to other commands that ship with TM, but escapes spaces for the
URL. There is probably a better way to do this, but this works.
Before running command: Do nothing
Command: open http://dev.mysql.com/doc/mysql/search.php?q=`echo
$TM_SELECTED_TEXT | tr " " "+"`
Standard Input: None
Standard Output: Discard
Enjoy and share your improvements please.
TextMate 1.0.2 writes stuff like this into my console whenever I close
a document window:
2004-12-22 14:31:27.473 TextMate[590] Another workaround for GCC
Any comments on what that's about?
I'm trying to get the ruby version of the (Un)comment command running on
my box, and I'm getting the following error:
/Users/wneuman/Library/Dev/TextMate/comment.rb:1: undefined method
`extname' for File:Class (NameError)
You say that the script requires Ruby 1.8, and I should be fine there as
I've got 1.8.1 installed...
Of course, the amount of Ruby I know would fit handily in my back pocket
-- even if I had stuffed my back pocket full of marbles. handkercheifs,
and gum wrappers beforehand, so I might just be doing something stupid
here. Any ideas on how to fix this?
William D. Neumann
---
"There's just so many extra children, we could just feed the
children to these tigers. We don't need them, we're not doing
anything with them.
Tigers are noble and sleek; children are loud and messy."
-- Neko Case
Think of XML as Lisp for COBOL programmers.
-- Tony-A (some guy on /.)
Hi,
Here's another feature request: Could you make selecting newline
characters a bit easier?
At the moment it is virtually impossible drag-select some text and the
newline character of a line that is followed by a non-empty line.
For an example of how it could be done better is TextEdit. If you select
a text there and drag a distance past the newline character, the newline
character is also included.
Thanks, Jeroen.
An improvement on my earlier post.
Now you can just execute a portion of your sql the whole thing and jump
to errors:
Before running command: Do nothing
Command: [your path to mysql if not in bash's path environment
variable]/mysql -u[your username here] -p[your password here]
Standard Input: Selected Text or Entire Document
Standard Output: Show in separate window
Pattern: ERROR (\d+) at line (\d+): (.*)
Format String: $3
Line: 2
Here is a command that will compile and jump to the line of the file
with the error:
Before running command: Do nothing
Command: cd [directory where build.xml is located]; ant [your target to
build source];
Standard Input: None
Standard Output: Show in separate window
Pattern: .*/(\w*.java):(\d+):(.*)
Format String: $1 $2 $3
File register: 1 Line: 2
Someone can improve on this to get the column and more error
information too. That would be nice.
Hi folks,
I missed a command from BBEdit that let you comment and uncomment
text magically for different languages with the same keystroke
(Text->Un/Comment), so I wrote a version for TextMate. If there is
enough interest, I will release commented source code and make it
into a nice .tmbundle. It currently only supports perl, php, html,
plist and tex. It is trivial to add support for other languages,
which I'll do on request (or you can easily figure out yourself, I
think... if you do, send me an e-mail so I can update mine!).
If the selection's first line is a comment; if so, it uncomments the
rest of the selection.
If not, it comments the whole selection, line by line. It tries to
keep the selection's indentation.
It parses the filetype from the filename ending to figure out what
are comments. If a language has more than one kind of delimiter pair,
it will use the first pair in the list for commenting, and will
search for all listed pairs for uncommenting. Notice this last
feature improves on BBEdit's Text->Un/Comment functionality. The
delimiters are stored in $a in the format "a,b,c"=>[$first, $last],
where each of the file endings .a, .b and .c will use that delimiter
pair. Roll your own!
This version is actually better than BBEdit's, in my opinion, because
1. it can uncomment many different comment formats for silly
languages like PHP that support several; and
2. it places comment delimiters at the original level of indent (and
not the first column like BB does); and
3. we can all customize it.
Textmate is powerful!
best wishes, Eric
--
To install it as a command:
Before: do nothing
Command:
perl -e
'$a={"pl,pm"=>["#",""],"plist,c"=>["/*","*/"],"html,htm"=>["<!--","-->"],"tex,ltx"=>["%",""],"php"=>["#","","/*","*/","<!--","-->","//",""]};while(($k,$v)=each(%$a)){foreach(split(/\s*,\s*/,$k)){$c{"$_"}=$v;}}$_=shift@ARGV;($t)=/\.(.*?)$/;($s,$f,@etc)=@{$c{$t}};$b=0;while(<STDIN>){push@in,$_;($in)=/^([
\t]*)/;$inl=0;foreach$j(1..(length($in))){$ch=substr($in,$j-1,1);if($ch
eq"
"){$inl++;}else{unless($inl%4){$inl+=4;}else{$inl+=$inl%4;}}}unless($i){$ind=$in;$indl=$inl;$i++;}else{if($inl<$indl||$in
eq""){$ind=$in;$indl=$inl;}}}$i=0;foreach(@in){if(chomp){$n="\n";}unless(/\S/){$o.=$_."\n";next;}unless($b){$b=1;foreach$d(@{$c{$t}}){$i=1-$i;$d=quotemeta($d);if($i){if(/^\s*$d/){$y=1;$s=$d;}}elsif($y){$f=$d;last;}}}if($y){s/^(\s*)$s(\
)?/$1/;s/(\ )?$f(\s*)$/$1/;$o.=$_.$n;}else{s/^$ind//;$o.=$ind.$s." $_
".$f.$n;}}print$o;' $TM_FILEPATH
STDIN: Selected
STDOUT: Replace Selected
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
Sometimes you want to execute the SQL contained in the current file via:
Before running command: Do nothing
Command: [your path to mysql if not in bash's path environment
variable]/mysql -u[your username here] -p[your password here] <
"$TM_FILEPATH"
Standard Input: None (because $TM_FILEPATH is specified above; you
could use just selected text too with $TM_SELECTED_TEXT)
Standard Output: Show in separate window
If you have line numbers showing in the gutter you can quickly find any
syntax errors that mysql returns.
Simple. Useful.
After reading peoples comments about ftp programs last week I tried
yummy ftp and I am very close to buying it. I love that I can select a
remote file and hit cmd-B to open it in textmate. Is this the killer
feature people where asking for?
Does anyone else have reviews for this product?
Later,
Eric
PS. I liked it so much I remapped my open in text editor in PathFinder
to cmd-B as well so most of the time I am ready for a quick edit.
I've posted the latest Perl bundle to
http://math.sfsu.edu/hsu/textmate/. Changes do not include
recognition of Coffee Services. :)
They do include:
(12-20-04)
Martin Vetter added [] and () to the Perl folding syntax.
__DATA__ now highlights to the end
q qq qw qx quoting is nicer
Noah Daniels submitted bug fix to color POD starting with ^= and
not just ^=head1
Noah Daniels also submitted bug fix for $#foo being counted as a comment.
Known problems: here-docs not quoted, many autoquotes not
highlighted right, e.g. hashkeys in => notation.
best wishes, Eric
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
Textmate is looking awesome (I just tried it Friday for the first time)
and though I own a copy of BBEdit, I think I may switch. But there are
a couple of things still missing, IMHO.
First, the Perl syntax bundle doesn't handle POD (=begin, =cut, etc.)
yet. I very quickly hacked in support for simply =begin and =cut as
block comments, but it would be ideal if it could do as good a job as
BBEdit's syntax coloring for Perl/POD.
Second, I do miss BBEdit's integration of certain things in its script
menu - 'find in reference' (really just shelling out of perldoc -f) and
'view POD' (just shelling out of perldoc), as well as the ability to
execute in the debugger. It would be nice to be able to, within a
project, execute things like 'perl -d <filename>' and such - or for a
C/C++ program, run it in gdb. I realize this can be done in Textmate
using the Automation->Commands menu, so perhaps what I'm saying is that
a few more built-ins would be nice :)
Finally, for the syntax bundles, the non-uniformity of color schemes
between bundles (I routinely work in projects involving Perl and C
code) could stand to be improved - ideally, a way to graphically change
the colors for the syntax bundles would be nice, too, rather than
editing the bundles. For example, rather than specifying the RGB values
in each syntax plist, have an indirect color code - for example,
"keyword" or "comment" - and then in TextMate have a preference that
allows you to specify colors for all of those, globally.
Anyways, TextMate is looking great. Keep up the good work!
--
"Failure is not an option, it comes bundled with the software" -DefCon
10
Noah M. Daniels
ndaniels(a)mac.com
...Remote file or URL was invalid"
...is the message I got when I try :
"TextMate-->Preferences-->Software Update-->Check Now"
(TextMate v1.0.2 (2004-12-10))
Is it a known issue, or does it come from me?
Best regards,
--
Jo <W:00°04'37" ; N:47°15'36">
1....'....12.....'....24.....'....36.....'....48.....'....60.....'....72
I'm working with a project whose files are on an SMB share. The sort
order of files and folders is not alphabetical, making it crazy
difficult to find files :)
Have I somehow messed up the order? Can I reset it to alpha?
Projects on my local disk are ordered alphabetically as expected.
cheers
drew.
Hi,
Following advice of some people, i'm giving TextMate a try.
There is a feature i don't find in TextMate: hard wrapping. I'm
editing big XML files and i've not figured how to automatically cut
the lines when they reach the right column.
I know about Soft Wrap, but i don't want to use it as the document
will be sent to people who are using different text editors: i don't
want they see a paragraph as a single long long line.
In fact, i'm a Emacs user and i need something like 'auto-fill-mode' :
when the line reaches the right margin, Emacs insert a newline.
To achieve the same thing with TextMate, the only way i've found so
far is to reformat the paragraph or the selection, which is not very
productive.
Is there something to automate this process or should i live with it?
Best regards,
--
Jaco
Please consider at some point changing the soft wrapping algorithm so it
indents to the same level as the first (non-space/tab) character in the
line. Anyone think this would be a *bad* idea (in which case perhaps it
could be a preference)?
-- Russell
P.S. this mailing list is now available from news.gmane.org as news
group gmane.editors.textmate.general.
We released version 1.0.5 of Yummy FTP today which fixes the remote editing crash,
provides full VMS support, and a handful of other nice things.
If anyone wants to beta test future versions, or if you just have a question, please don't
hesitate to contact us.
Best regards,
Jason
Jason Downing
----------------------------------
Yummy Software
Software so good you could eat it. Yum!
www.yummysoftware.com
----------------------------------
> Roy:
>
> Yeah fugu is the bomb. Trouble is, I have a couple people who still use
> standard ftp. Does Fugu do straight FTP?
>
> Russell:
>
> Thanks, I'll ask them!
>
>
>
> Chris
>
> On Dec 16, 2004, at 8:00 AM, Roy D. Todd II wrote:
>
> > Have you tried Fugu? The 1.1.1 RC2 client integrates with TextMate
> > well. It also uses the systems underlying FTP and SFTP commands in
> > order to have rock solid connections. I've had great luck with it.
> >
> > Roy
> > On Dec 16, 2004, at 12:18 AM, Chris Schwan wrote:
> >
> >> Where do we get the 1.0.5 betas? I also was about to buy Yummy, and
> >> cant keep the app open during edit mode.
> >>
> >> Chris
> >> On Dec 15, 2004, at 3:08 PM, Russell E. Owen wrote:
> >>
> >>> In article
> >>> <809FD7DC-2C71-11D9-8B82-000A95D4B654(a)rgbdesignstudio.com>,
> >>> Eric Curtis
> >>> <ecurtis(a)rgbdesignstudio.com> wrote:
> >>>
> >>>> After reading peoples comments about ftp programs last week I tried
> >>>> yummy ftp and I am very close to buying it. I love that I can
> >>>> select a
> >>>> remote file and hit cmd-B to open it in textmate. Is this the killer
> >>>> feature people where asking for?
> >>>>
> >>>> Does anyone else have reviews for this product?
> >>>
> >>> Many graphical ftp clients will allow you to edit a file on a remote
> >>> system using the editor of your choice -- a fact that suggests that
> >>> ftp/sftp support in an editor is not very important.
> >>>
> >>> My personal favorite ftp client is Fetch, but that does not support
> >>> sftp, so I tried out Yummy FTP and bought it. I feel it is less
> >>> mature
> >>> than Fetch, but reasonably well designed and shows great promise.
> >>> Also,
> >>> I was impressed with the support. However, the main reason I bought
> >>> it
> >>> was VMS support (not something likely to matter to most of you, but
> >>> if
> >>> it does, there aren't many options).
> >>>
> >>> I've run into a few snags, including a crash in 1.0.4 using edit
> >>> mode,
> >>> but that's fixed in the current 1.0.5 betas, and 1.0.5 should be
> >>> released any time now.
> >>>
> >>> -- Russell
> >>>
> >>> _______________________________________________
> >>> textmate mailing list
> >>> textmate(a)lists.macromates.com
> >>> http://lists.macromates.com/mailman/listinfo/textmate
> >>>
> >>
> >> _______________________________________________
> >> textmate mailing list
> >> textmate(a)lists.macromates.com
> >> http://lists.macromates.com/mailman/listinfo/textmate
> >>
> >>
> >
> > _______________________________________________
> > textmate mailing list
> > textmate(a)lists.macromates.com
> > http://lists.macromates.com/mailman/listinfo/textmate
> >
>
> _______________________________________________
> textmate mailing list
> textmate(a)lists.macromates.com
> http://lists.macromates.com/mailman/listinfo/textmate
>
>
I imagine that this might have been covered before, so forgive me if so, but
is there any plans to build a file differencing tool into TextMate? I'm
talking about something akin to the interface that BBEdit provides, or Xcode
for that matter. I find that's the only reason I pop back to BBEdit now, the
ability to step through the differences line by line and copy the changes
between the files is very useful.
Regards
Chris Jenkins
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
Here's an item that bugs me a lot, and there is probably not any
solution, but just maybe...
Often I'm editing text in a textarea on a web page, and I'd like to
edit it in my Favorite Real Editor. Of course I can select all, copy,
go to editor, open new, paste, edit, select all, copy, find browser
window, select all in the textarea, paste.
Is there a way to make this easier? Like hit a key and the editor
opens a window with the text. When I close (and save) the results are
returned to my browser window, and so am I.
I suppose there might be some hack where I could select text, hit a
keystroke (or something) and have the select text appear in the editor,
then if the default were to select all+copy when closing the window,
...
Anyway, some better solution to this problem would be really great.
A specialized hack might be to have the txmt: protocol thing integrated
so that the editor could fetch text via HTTP and know where to POST the
text upon completion of the edit. This may be a complete waste of
development effort since webdav is the right and proper solution here.
(By the way, I haven't used webdav to any extent really.)
This whole thought-stream was launched when I started looking at wikis
again. I love the ease-of-use of wikis, EXCEPT for editing in HTML
textarea blocks.
Hi all,
textmate launches dreamweaver MX '04 when opening php files from the
project drawer. When I open '.inc' files it launches subethaedit! The
file opens in both dreamweaver and in a TextMate tab.
Anyone know how I stop TextMate doing this?
Thanks
Paul
The line numbers in the gutter don't always update correctly.
TextMate version: 1.0.2 (v1.0.2b10)
Steps to replicate:
Type in a few long lines, that get soft wrapped over multiple lines.
Go to the beginning of the third "soft" line, and press enter.
Go to the beginning of the second "soft" line, and press enter.
Expected result: line numbers get recalculated, so that the third line
gets number 3
Real result:
Here are two things I find obtrusive in TextMate, one of which is
probably just me not finding the right function.
1. I would like to see TextMate windows not going off the screen when
they are opened, or under the dock. I use a pretty small screen
(compared to lots of you) at 1024x768, and I like my windows to be full
size (and not go under the dock). Maximizing a TM window sizes it
perfectly - but then opening a new window offsets both downward and to
the right, resulting in a partially obscured window and a petty bug.
2. Is there a way to insert a template from a bundle somewhere into an
empty file or into a file create outside of a project? A menu item to
let me insert the xhtml strict template would save me a lot of time,
and seems like something that TM should have.
Anyone have any input on either of these little bothers? Am I just
completely missing something? Thanks!
Kjell
I've been using TM since it came out and I should have reported this earlier.
It seems that TM is overly agressive with regards to caching a
directory listing int he "Open" dialog box. I have files that get
generated ( or that I create externally) that I want to edit in TM,
but if I've already been in that directory in the current TM session,
then I won't see the new files. I haven't figured out how to get TM to
refresh this list. Any ideas? Or is this a bug/feature?
Thanks,
Patrick
Jeroen wrote:
> Although I have not really found a proper way to do code boxes. I
>settled for the solution I
>have now.
Your code boxes look beautiful! I realized by accident that if you
simply indent text, then it shows up as <pre></pre> text, so that's
how I ported the ShellScriptCorner page. Not as nice looking, but
easier.
Let me note that though the wiki is slightly annoying to use,
Textmate made it a lot easier!! In Omniweb, I just select all and
command-Escape and edit the textbox in TM, save and close to go back.
It makes life a lot easier.
- Eric
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
These tmbundles are intended to cover the languages as roughly defined
by Ada 95, Fortran 77, Fortran 95, and GNU Pascal.
I'm not an expert at any of these languages, but I believe the folding
for Ada and Pascal is useful.
As for Fortran folding, I didn't even try. I'm happy to add folding
support if someone will tell me where best to start and end the folds.
(Or, of course, you're welcome to modify the tmbundle and upload it
yourself :).
http://www.cjack.com/tm/Ada.tmbundle.ziphttp://www.cjack.com/tm/Fortran.tmbundle.ziphttp://www.cjack.com/tm/Pascal.tmbundle.zip
The wiki has been updated accordingly.
Share and enjoy,
Chris
After reading about various wiki's (and trying a few) I ended up
choosing PmWiki as suggested by Fred.
The new Wiki URL is: http://macromates.com/wiki/pmwiki
It has a link to a static HTML version of the old wiki before the
accident including all the textile pages. The textile pages are
up-to-date, but the HTML export was done the 12th December, so edits
after the 12th of December are not in the HTML version.
I haven't imported the textile pages into PmWiki, since they'd have to
be converted, and I'm not sure how easy I can automate this process.
So I'm thinking that maybe I should just leave the static pages and
import them manually over time (as they are needed), which also allow
for some restructuring of the wiki, which I think was probably overdue
(break down most of the big pages and create a better structure).
I'm really terrible sorry about this, and I hope that it's not viewed
as lack of appreciation for the many contributors -- I really do
appreciate the work that has been put into the wiki!
With this new wiki it also means that I can and will take an active
role maintaining the software side of things (which I previously
thought I'd outsourced, but let's not point any fingers here... ;) ).
Kind regards Allan
I have two requests that I would REALLY like to see coming soon in textmate:
(1) the most important !!! (and I am probably not alone in that): bring back the proper behaviour for CTRL-Y (yank).
Coming Emacs and using this command in all the Apple programs, I always find myself trying it in textmate, to no avail.
CTRL-Y should cut lines, one after the other, and put them in a buffer. I would recommend that it uses the soft and hard-wrap lines the same way, in a transparent manner.
I have adopted textmates last October as my sole text editor, but I miss sorely CTRL-Y
(2) Indented reformatting.
It would be most useful if the formatting of paragraphs following the indentation of first line. This way, we can format text in a latex file, for example, with the proper visual look.
So, if there is 3 spaces before the first character in the first line of the paragraph, the whole paragraph should be formatted with 3 white spaces in front.
(3) Intelligent-tab in programming-language modes
This is also a feature that I love from emacs and that I miss here. While in a programming mode, hitting TAB anywhere on the line shifts the whole line by a tab (SHIFT-TAB does the same in reverse). This makes it very easy when programming to add loops, etc.
I look forward to having those included in textmate. An otherwise very nice editor.
Greetings,
Normand Mousseau
Hi.
I'm not sure if there is some minor adjustment I can make to fix this
.... but after installing 1.0.2 my PHP auto-indenting did not work
anymore. Here is the pattern from the PHP.plist file that was working
fine in <= 1.0.1 :
increaseIndentPattern = "^.*(\\{[^}\"']*|\\([^)\"']*)$";
any suggestions? I know the bundle is active because my custom syntax
highlighting works.
kumar
On Dec 14, 2004, at 3:04, Brian Lalor wrote:
I'm cc'ing the mailing list for this one.
> A note I made atop the XSLT node and my entire [[Brian Lalor]] node
> have been nuked. Should I take it personally? Perhaps it's time to
> implement a more robust wiki, a la Confluence ($$) or SnipSnap?
David finally found the time to merge the rollback patch into instiki
but in the process zapped all pages from after november the 5th
(apologies on his behalf for not updating the wiki with this info).
I have a backup of all the current pages, so they are not lost -- but
there is no easy way to import them, so I do think this is the chance
to move to another wiki.
I have no experience with other wiki software, a few things that would
be nice:
o run under apache (to allow for robots.txt and fine-masked
authentication)
o some wiki-spam prevention
o page history with rollback of course ;)
o would be preferable if the syntax is textile for compatibility
o and preferable also if it can import pages easily
If there are any suggestions, it would be nice to know how they fit
with the above requests.
I love column typing, but i dont use it as much as i want because I
rarely have things formated in a way that'll allow using it.
I think it'd be great to be able to just alt-click a bunch of places
to enable column typing (no need to be the same char. num in each
line), and do the column typing in the places you clicked (of course
then it wouldnt really be *column* typing, but i think it's a very
intuitive enhancement...)
Regards
Duarte Carrilho da Graca
Awhile back I seem to remember Allen suggesting he could create a
TextMate protocol (e.g. txmt://path/to/my/file). I've come to the
conclusion that if this was available, I would use it a lot.
Here's one example:
I use Markdown syntax for most of my writing nowadays, but once I've
written something, I want to view it looking nice in a web browser.
Invariably, I need to edit the file later. I have three options: I
could put up a text area and edit it in the web browser. I could launch
my ftp program and Edit Externally... the file. Or I could
automatically launch TextMate, my editor of choice, with a simple
txmt:// link on the web page.
Best, Eric
Sorry, didn't realise the message was not in its own thread - started
again here.
On 13 Dec 2004, at 17:24, David Wooten wrote:
> I'm trying to figure out a clever little trigger mechanism for Running
> a Command sort of "invisibly". I'd like to assign a certain command to
> the comma "," key, for example, and yet have the comma appear in the
> current TM window, thus running the said command whenever I happen in
> the natural course of events to type a comma ;). Now the closest I've
> come is to "echo" the comma and send the results to the current
> window, but of course this also gives me the output from the command
> which I wish to be discarded.
I came across a similar problem when writing a php command completion
tool (http://ian.ardes.com/phpcc).
The way I solved it was to write two separate commands, one outputting
as a snippet, the other as a tooltip.
I then wrote a macro to run both of these commands, and bound this
macro to the desired key.
Cheers,
ian
Main editor window cannot handle inputs from input method properly.
When typing Japanese characters, no characters were displayed and I
could
not type characters anymore(includes ASCII chars) until I move cursor
to another line. Other input methods than Japanese, Hangul and Chinese,
seems to have same problem. All other widgets, project drawers, tabs,
dialogs and menu items work fine.
Thanks,
Kazuo Saito <ksaito(a)cobratwist.org>
PS:
Are there any plan to add localizations? I'm translating .nib files
into Japanese actually.
Requests
- incremental search, I would like Cmd-W to close the window, even if it
*is* still in I.S. mode
- it would be nice to be able to refresh syntax hightlighting styles without
having to relaunch TextMate, and have it redraw the open windows (so you
could edit, refresh, and review effects).
Help..
- in HTML-PHP style, I somehow can't get the {} pair to indent anymore if I
hit enter in between them :-( looked at the syntax files but that regex got
too complicated for 5 AM..
Regards,
Martin
Uhmm.... how do I start column typing? Can't find it in the menu's...
Sorry for something which is probably straightforward, but I really
can't seem to find it.
--
Joost Schuttelaar
Hello,
I'm trying to open all .txt files with TextMate. In the finder, I select a
.txt file, hit Control+i to get info. Then I select TextMate as the app to
open it with, then I click "Change All". After clicking "Change All"
TextMate disappears as the "Open With" app and is replaced by the text: "Not
applicable". If I close the info box and double click on the .txt file, I
get this error: "The operation could not be completed. An unexpected error
occurred (error code -10660)." If TextMate is already open, a double click
on the file in the Finder opens fine. But if TextMate is closed, it shows
this error.
Does anyone know how to fix this?
I think it may have been caused by renaming the beta versions of TextMate to
names like "TextMate1.01b3". Maybe the Finder got confused about which app
was THE TextMate to open with. I now only have the newest 1.02 version in
the Apps folder.
Any help much appreciated. Thanks.
Simon
I'm a newbie textmate user, and unfamiliar so forgive me if this has
been covered before.
When double-clicking on whitespace to select and then moving the mouse
to text (to select by word) it's very annoying to me that the word at
the other end of the whitespace is selected. I've seen this behavior
in M$ products and it drives me nuts. Am I the only one?
To me it's obvious that if I double click something and then move left
that it's wrong for something rightwards to become selected.
I'm sure I'll learn to cope, but I thought I'd ask about it.
I'm still getting used to it, but I think I like TextMate. :)
I installed the SQL bundle, but it didn't do it for me. At some point
I'll have to go make a syntax file that supports Oracle PL/SQL (since
that's what I edit mostly these days).
cheers
Patrick
Hi,
I'm using TextMate for my Getting Things Done (GTD) stuff. Is anyone
else out there doing the same? I'm just getting started and would love
to see how others are using TM for GTD. How do you set up your file
structure? How do you name and keep track of your files, actions, and
projects, etc.? I can see how it would be useful to be able to do such
things as link from a URI in a text (markdown) file directly to a
browser. As well as things like creating links to other local (project)
files ala voodoo pad, and moving chunks of text to other files whilst
sprinkling them with some meta data.
Then they are things like aggregating lists to create contextual lists
and so much more I can imagine but not conceive of programatically.
I just found this:
http://www.rousette.org.uk/blog/archives/2004/11/28/rails-gtd-
application/
and I know bsag has other discussions about TM GTD in her blog. As well
as Daniel Von Fange's neat little tricks:
http://www.braino.org/blog/archives/001512.phphttp://www.braino.org/blog/archives/001440.php
Admittedly I haven't played much with these, but I do remember having
some problems with TM finding my Ruby install.
-t
I'm resending this letter from the 3th of November just as a friendly
reminder and for all those who have joined the list since the
previously mentioned date.
----------->8-----------
There is really only one rule (apart from normal netiquette) I want you
to uphold:
When you write a _new_ letter to this mailing list, _don't_ use “reply”
on an existing letter (to get the To: filled in).
It screws up threading!!!
If you're using Mail.app, you can control-click the “To” of an existing
letter and select “New Message” to get a compose window with the “To”
header filled in.
Threading is a very useful feature, and especially for me with this
mailing list, since it's basically an archive of user feedback, and I'd
like for the table-of-contents to show _every_ thread, which it
currently doesn't, when one thread contain 2-3 _different_ subjects,
because people have used reply (then it only show the first subject).
So PLEASE remember _not_ to use reply (for new letters)!!!
Was there any resolution on the subject of canceling the incremental
search via the navigation keys? I believe that I never heard any
support for leaving it as it is, with several supporters for having
only backspace edit the search string. Is this on your todo list, or
will it stay as it is?
Thanks,
Wayne
Hi,
I'm using TextMate for my Getting Things Done (GTD) stuff. Is anyone
else out there doing the same? I'm just getting started and would love
to see how others are using TM for GTD. How do you set up your file
structure? How do you name and keep track of your files, actions, and
projects, etc.? I can see how it would be useful to be able to do such
things as link from a URI in a text (markdown) file directly to a
browser. As well as things like creating links to other local (project)
files ala voodoo pad, and moving chunks of text to other files whilst
sprinkling them with some meta data.
Then they are things like aggregating lists to create contextual lists
and so much more I can imagine but not conceive of programatically.
I just found this:
http://www.rousette.org.uk/blog/archives/2004/11/28/rails-gtd-
application/
and I know bsag has other discussions about TM GTD in her blog. As well
as Daniel Von Fange's neat little tricks:
http://www.braino.org/blog/archives/001512.phphttp://www.braino.org/blog/archives/001440.php
Admittedly I haven't played much with these, but I do remember having
some problems with TM finding my Ruby install.
-t
Thanks to Xavier Noria for his bug list for the Perl bundle. I have
fixed some of them in a new version (see the wiki, or my page
http://math.sfsu.edu/hsu/textmate for the archive and details.
Here are the fixes:
adjusted $foo{bar} so the first brace isn't highlighted
q qq qw qx quoting recognized
POD recognized (from =head1 to =cut)
__END__ __DATA__, __FOO__ all recognized
added Perl to One-liner command
Known problems:
many autoquotes not highlighted right: here-docs not quoted,
hashkeys in => notation.
I invite anyone else to take a crack to getting the autoquotes right,
in the cases that Xavier noted. (I am travelling for the next three
weeks!)
The problem with doing here-docs right is that the start and end
delimiters change with each case, so we'd have to use backreferencing
in the 'end' parameter, and I don't think that's currently possible.
- Eric
ps. I wonder how hard it would be ( maybe for 2.0! :) ) to have TM
simply use vim syntax files, or some other well-worked format...
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
Paul Nordstrom August wrote:
> FTP in the drawer... yes please! (Hope that's SFTP as well.)
There's a way to fake it somewhat :)
Open the files from the FTP server as you would normally, they're then
stored in /private/tmp/501/Cleanup at Startup/ or so as files. If you
put those files in a project *and* open tabs for them in the project so
they are read, you can close the original windows, and only work on
what's in the project.
Alas, you cannot successfully save, close and open the project lateron,
and moving things around in folders won't work either; I only use it
when I know I'll be editing the files for an hour or more or so.
Regards,
Martin
Hello
Maybe this is not a bug, but when I open a .ini file from the project
drawer, one click doesnt open it - i have to double click it - and then
it opens in a new window instead of the same window as the rest of the
files in the project. Is this a bug?
Regards
Duarte Carrilho da Graca
Allan,
> Added a dock menu with New, New Project, and Open….
Thanks so much for adding this! Certainly one of the features I
personally missed from SubEthaEdit. With that said, I wonder if it might
make sense to make the menu more consistent with SEE? For instance, SEE
has "New File" instead of "New". They also use "Open file..." instead of
"Open.." IMHO, I think that SEE's wording/ellipses choices look better,
but that may be familiarity talking.
> The Text -> Change sub menu now also appears in the context menu (when
> there is a selection). Also, suggestions for spellings no longer
> appear if the selection contain newlines or tabs (previously it only
> looked at spaces).
This is also a welcome change. However, I think that instead of
"Change", which is ambiguous, you should use "Convert" or "Format" as in
the attached Service menus.
Thoughts?
Chris
--
Do the evolution. Get Firefox!
<http://spreadfirefox.com/community/?q=affiliates&id=5&t=4>
Quote of the moment: /If you can't describe what you are doing as a
process, you don't know what you're doing./— W. Edwards Deming
I just built beta 11. If there are no problems this will be released
later today as 1.0.2 which should be the last in the 1.0.x series,
meaning that I'll shift priorities a bit and focus on larger
improvements for the 1.1 release.
Basically it just means that having the 1.0.2 out as “official” with
most obvious fixes done, I'll be more comfortable rewriting major parts
of TextMate even if it means the source will be in a non-functional
state for a couple of days -- but I'll still release betas as often as
it makes sense, and I'm aware of the requests expressed on this list.
was wondering if TextMate could throw a warning if the key-equivalent
you're assigning to a command will wipe out a pre-existing
key-equivalent. From what I've observed, if you add a key-equivalent
[that already exists] to a command then the command works --as
expected-- in that key-equivalent, silently overriding what was there
before. Hopefully not something too difficult? I guess that would be
helpful for macros too.
Kumar
Hi Allan,
If possible, could you make the Replace field the next tabindex after
the Find field? Right now it lands on the Sigma button, meaning I have
to double-tab to get to the Replace field.
Thanks!
Chris
--
Do the evolution. Get Firefox!
<http://spreadfirefox.com/community/?q=affiliates&id=5&t=4>
Quote of the moment: /"Accept that some days you are the pigeon, and
some days you are the statue."/— David Brent, Wernham Hogg
I woundered if it was possible to change the shortcut for "Insert
closing tab". cmd-opt-. isn't working on my keyboard layout. As I
understant it, opt-'.' is '>' so cmd-opt-'.' is understood as cmd-'>'
I get this problem all over the system.
Anyway, how about just cmd-'.' ? I know it's a reserved shortcut for
cancel but in a sense, it 'stop' a block. And there is no use for a
cancel in text editing. And beside, cmd and '.' and very close
toghetter while opt is all the other way of the space bar on small
keyboards ( original g4 and I think powerbook/ibook too )
> Date: Mon, 6 Dec 2004 13:10:05 +0100
> From: "Fred B." <fredb7(a)starflam.com>
> I started using Fugu with this release.
> Connecting locally to my server and editing using TM working fine.
Just so you know, rc2 is out now. It has fixed some problems that rc1 had.
Carl
HTML folding does not work properly in a very simple hand-written HTML
page. This is a movie depicting what happens:
http://www.hashref.com/textmate/tmbug_html_folding.mov
There I try to hide three blocks:
1. The "body" CSS element is correctly folded
2. The "style" tag is not
3. The "head" tag is not
-- fxn
Python folding seems half implemented, it does not work. As you can see
in this shot:
http://www.hashref.com/textmate/tmbug_python_folding.png
There's no mark for classes for instance, and more important if you
click on the marks to fold functions nothing happens.
-- fxn
I love the scratch macro and the ability to replay it with a keyboard
shortcut. How about a "replay last used macro"?
E.g., let's say I have a saved macro that I don't want to assign a
keyboard shortcut to, but which I do want to use over and over again
for a stretch in a document. Right now I've got to pick it out from
the menu each time.
If we had a "replay last used macro" I could just hit that keyboard
shortcut repeatedly. It could probably even replace "replay scratch
macro" and still have the same effect when the last used macro
happened to be scratch.
Thoughts?
A few issues in the syntax highlighting done by Perl's bundle.
The first one I think it's typically hard to get right: here-docs are
not recognised. This not only means that they are not colourised as
strings, but that their content can fool the rest of the highlighting,
for instance if there's an unbalanced quote. (Sometimes a fake comment
can help there though.)
POD sections are not recognised either, so not only they are not
coloured but Perl keywords are highlighted in regular English (for, if,
while, ...).
On the other side, hash elements are no correctly highlighted. In
$foo{bar} = "baz";
the red for variables goes beyond the "{" and stops at the "r":
$foo{bar
If "bar" is quoted the highlighting is correct though, curlies in black
and the string in green.
In the broken example I'd expect the curlies in black, and the key in
green because it's autoquoted by Perl. Green to the left of =>s would
be good as well, as words there are also autoquoted. Both conventions
for autoquoted stuff are followed by CPerl and the Perl mode for Vim.
q(), qq(), and their variants are not highlighted as strings either.
-- fxn
I just purchased TextMate and found some apparent bugs editing Perl and
Python. Which is the right address to report them?
-- fxn
PS: I would have liked new releases could have a new trial period. I
bought a license without being able to compare the current version with
the initial one.
>I just purchased TextMate and found some apparent bugs editing Perl and
>Python. Which is the right address to report them?
The language bundles are currently maintained by volunteer work. I
contributed the Perl bundle and according to
<http://wiki.macromates.com/textmate/show/Bundles102>, a bunch of
people contributed different Python bundles. Probably the best place
for bundle bug reports is this mailing list, with a subject like Perl
Bugs or something else clever to divert people who don't care.
What are the Perl bugs? They might be due either to my bundle or
underlying problems with TM.
- Eric
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
Hi,
I would like to highlight the syntax as shown in the attached picture.
However, this matches the wrong brackets. Anyone any idea how I could go
about to better highlight this?
I guess it boils down to a not powerful enough syntax highlighting scheme
though :(. The thing I want to do is something like:
- match commands (begin with '\' followed by a word
- this can be followed by [\w+]
- and this can be followed by {.*}
And what I would like to do is apply the global patterns to the '.*'
mentioned above, and if nothing global matches, then apply a color.
Jeroen.
PS. I seem to remember something about using groups to define different
colors in a pattern, but I forgot how that works. Can anyone tell me how
that works and/or add that to the wiki ? :)
brilliant!
> Added history for find and replace strings. Currently it doesn't store
> options in the history (like regular expression or case sensitive)
That helps a lot... Can we save certain ones (esp grep searches) and
give them a name somehow (someday!)?
On reading the change notes in b10 I discovered the context menus for
selected text -- never used them previously but I love them.
Amazing progress as usual. Thanks Allan.
p.
sorry, I'm not quite sure I understand, are you saying that it does
work for you, or it doesn't? I've installed all the latest updates now,
but there is no change, it still doesn't launch, just appears in the
dock briefly for a split second and then vanishes again. I don't get a
crash message either.
I'm running 10.3.6 on a G4 dual 1.4Ghz.
weird.
Chris
Begin forwarded message:
> idem for me (Mac OS 10.3.6, last security updates done)
Is there a way left to move the cursor to the top of the window? Pageup
used to do this, and while I understand that it's not HIG or like other
apps do it, I was just getting used to it :-)
Regards,
Martin
Greetings folks,
recent $'er for this great editor. Longtime vi user, but always wishing
for a highly configurable editor that was more os x-integrated.
Couple questions/suggestions:
Any way to make a Command which can work with the $TM_FILEPATH variable
-- except with a .pdf extension? This is good really only for opening
the .pdf file in e.g. TeXniscope for the first time. …or another
method?
Also -- after running a little pdflatex Command on a file, I'm finding
that there's no really optimal output method. I'm often working on a
12", so a full window devoted to the results (which I generally only
need to see if there's an error) is a little bulky, especially as the
focus moves to the said new window. The tooltip output looks promising
(it disappears at the touch of a key), but it seems to appear with the
top left corner at the cursor -- which often leaves the bulk of the
window off the screen.
Thanks, thanks, thanks for TextMate!
David
I do like the indented paste feature but find that it's one of the
features that I'm constantly turning on and off, depending on what I'm
working on. It would be nice if this feature were moved out of the
preferences and back into the Text menu where's it more readily accessible.
Thanks!
Chris
--
Do the evolution. Get Firefox!
<http://spreadfirefox.com/community/?q=affiliates&id=5&t=4>
Quote of the moment: /If you can't describe what you are doing as a
process, you don't know what you're doing./— W. Edwards Deming
>Has this been brought up as a feature request? skEdit's (i'm using it
>while I wait for my Paypal deposit) tidy functionality is very well
>thought out. I'd like to see something similar in TM.
Here is my current kludge to get two HTML Tidy commands: one replaces
a window with its Tidy-ed version, and another just produces a window
with clickable error output. Note that (bug? feature?) if HTML Tidy
thinks there are errors in your document and you do a 'replace' then
it will place the errors at the top of the document. You can fiddle
with the Tidy flags to avoid that.
Also note that my version only runs on the last saved version and not
the current one. That can also be tweaked...
Anyway, get HTML Tidy from http://tidy.sourceforge.net/ then install
it someplace convenient. I put the command-line version at ~/bin/tidy
Report Errors Command:
Before: nothing
Command: ~/bin/tidy -e "$TM_FILEPATH"
Stdin: None
Stout: Sep window
Pattern: line (\d+) column (\d+) - (.*?)$
Format: $3
Line: 1
Replace Document with Tidy-ed Version Command:
Before: nothing
Command: ~/bin/tidy -bicq "$TM_FILEPATH"
Stdin: None
Stout: Replace doc
Pattern:
Format:
Line:
Works great for me!
- Eric
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
I just opened a 1.5M XML document in TM. My XML syntax isn't all that
lean, and it takes a while for TM to highlight everything and become
responsive. Currently, I do not know of any way to open a file without
syntax highlighting. That'd be one nice thing to have... The other
would be for TM to pop up a little dialog if highlighting hasn't
completed after, say, 10 seconds and give the option to abort the open,
continue highlighting (until done), or open without highlighting.
--
__ ____
/ / / __/ Brian Lalor
/ _ \/__ \ blalor(a)bravo5.org
/_.__/____/ http://bravo5.org/
hi,
at first i must say that textmate definitely rocks, it is really THE
missing editor i was searching for. and its a not unimportant reason
why i bought my ibook.
but this doesn't mean its already perfect i still like to see some
features or at least small changes. :)
for example:
- parenthesis highlights (or smart typing highlights) like in komodo.
i have been using activestate komodo quite a long time but because it
was a bit to big and slow and not extensible enough i don't use it
anymore, but one thing was really cool: the parenthesis highlighting.
in textmate you have to roll over the parenthesis with the caret to
get it highlighted, in komodo you just have to be near it and it gets
highlighted (normally it gets red and bold), i like this more than
always have to move with the caret forward and backward, its
especially more comfortable in heavy nested statements or lisp :). so
i would it like to see implemented this way in textmate.
- simple formating in tool tips, probably like in html so that one can
make bold, underlined and italic text, this would be very nice because
bigger tool tips would be better readable.
- better placement of tool tips. if you have a really big tool tip
(or just a normal big one) and your caret is a bit to near to the
right of the screen, the tool tip is shown out of the desktop, i found
this a bit useless sometimes and i want to suggest to place tool tips
a bit more user friendly.
thats it, i also would like to see some other features like the
right-click-menu in the dock and a user adjustable color-system, but
this already have been mentioned and i don't want to repeat them again
and again.
thanks for this great tool.
--
Torsten Becker
I wish I could format the output of TM's commands in html, and make
html links able to launch other TextMate commands !
Thus one could display error reports, stats, links and stuff very
nicely !!
I would also like to be able to use a TextMate webkit window that would
be called from somewhere else.
In order to debug my php scripts, I currently have a script watch php's
log using kernel notifications (kqueue) and trigger a cocoa window
alert on each error.
I wish this window could be an interactive one, in Textmate. Thus I
could jump directly to the error by clicking a link, etc...
Possibilities would be unlimited !
Dominique PERETTI
http://www.lachoseinteractive.net
I would like to be able to automatically run a script, when a certain
event happens (such as, a file save), depending on the file-extension
(and maybe also depending on the project).
For example, what I really like to do:
If I save a file that ends in .rb, I want to automatically run a
command that does a "ruby $TM_PROJECT_DIR/test/unittests.rb". If it
fails, it could send me a notification through growl
(http://growl.info)
Hello,
I am really starting to love textmate. I want to add functionality
that will either comment or uncomment the selected text. Right now i
have two commands; one that prepends '# ' to the line and one that
strips the first '# ' on the line. I would really like to have this
handily accessible under one command and have it automagically decide
wether or not I want to comment or uncomment the line. I am sure that
others have added this sort of functionality. Anyone have a graceful
solution?
While I am here does anyone have any handy python editing
commands/macros?
--dfc
Douglas F. Calvert
http://anize.org/dfc/ .::. GPG Key: 0xC9541FB2
A mystic in the sense that I am still mystified by things...
hi,
because the homepage of the wiki is a bit down i post this to the list.
i did build 2 bundles and want to share them, probably some find them
usefull :) :
- mips bundle: syntax-highlighting for mips assemler which you
probably need when you write something for spim
- graphviz bundle: syntaxhighlighting for dot files, this is maybe
usefull when you configured textmate as graphivizs external editor and
you want colored keywords.
more information and preview pictures are at
http://wiki.macromates.com/textmate/show/TorstenBecker
--
Torsten Becker
Hi
If I save a file from TM to ~/Documents/ and then move it from finder
to ~/Documents/ivar/ I would love it if TM could sense that move (I
think it does when using projects).
Just like SEE TM could ask something like "This file has been moved. It
will be saved to the '~/Documents/ivar/' folder, or you can specify
another location.".
kind regards
ivar
>On the subject of anime and icons; when I bought TextMate, the first
>thing I did was replace the icon with the Fuchikoma (from Ghost In The
>Shell) icon from the World Of Aqua 4 icon set by Icon Factory.
>
>http://iconfactory.com/preview.asp?type=search&id=155&query=fuchikoma
Hah! That's the icon I'm using too! The red makes it stand out, it
looks like a robot and it's cool! - Eric
Would it be possible to distribute the TM bundles separately (maybe the
way Konfabulator does, updating the "official" ones when a new release
comes out)? I don't do any C++, PHP, or ASP coding, so I don't see any
reason to keep those bundles around; they get replaced every time I
upgrade TM, however.
--
__ ____
/ / / __/ Brian Lalor
/ _ \/__ \ blalor(a)bravo5.org
/_.__/____/ http://bravo5.org/
Hi
I'd like to see something like SEE:s way of letting you switch between
different "File Encodings".
I think it's the best way of switching encodings so far!
I might have missed something but right now all I know of is the
"Re-Open With Encoding:" menu which I rarely use. Mostly because I
don't need to change file encoding that often but secondly because it
forces me to save my file to be able to switch encoding.
kind regards
ivar
ps. I really(!!) like b8 and the cleanup of menus!
>I am hoping I¼m just missing something obvious... Is there some kind of
>list of functions/methods? I.e. Similar to BBEdit or SEE¼s popup function
>list?
Here's my kludged version of it for Perl using TM
commands, which pops up a separate window listing
all the subroutines (i.e. lines that begin with
'sub ').
Make a command:
- before: Do Nothing
- Command: grep -n "^sub "
- Std In: Entire document
- Std out: Show in separate win
- Pattern: ^(\d+):(.*)$
[this parses out the grep output so we can identify the line part]
- Format: $2
- Line:1
This idea can be tweaked to fit the language of
your choice. I think you can pipe it cleverly
through sort to get the subroutines alphabetized.
good luck, Eric
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
>> So basically if you hit an arrow key which will not make the cursor
>> move
>> within the search string it aborts.
>
> IMHO this is a mode, eg the meaning of the arrow key will change
> whether the cursor is in the search string or at an end. Moreover the
> user focus is on the occurences hilighted in the file, rather than on
> the field at the bottom of the window. Since that occurence is
> selected, it seems coherent that the arrow keys would do what they
> usually do: exit the selection. Also that behavior will be familiar to
> Emacs users.
>
> Fixing using backspace shouldn't be so much of a hassle since search
> strings are typically short, and as the results are incrementally
> displayed, the user can detect errors early.
>
> -- D
my first impression on that issue was: of course there's a need to be
able to navigate within the search string using the cursor keys, after
all that's the way osx behaves in any kind of text input field with the
focus (even in incremental searches, like in itunes).
but then i tested it myself in textmate and found that this behaviour
isn't necessarily what i expected here, because the search string's
corresponding part in the document was highlighted and i thought it
would be intuitive using the cursor keys now to directly navigation in
the document.
so i no longer have a definite opinion with it. gui or not to gui,
that's the question ... ;-)
___✍
larsen
Sorry I forgot to mention that i-search requires two new key binding
entries which you'll need to manually add if you made a local copy:
"^s" = "ISIM_incrementalSearch:";
"^S" = "ISIM_reverseIncrementalSearch:";
I named my methods the same as the ISearch InputManager/Plugin. So if
you already have this installed, the key bindings from your "global"
key bindings file should already make it work, _except_ that ISIM use
control-r for the reverse search, TextMate is using that for 'execute
line', which is why I choose control-S.
Maybe this is why reverse search doesn't work for you Wayne?
Regarding aborting the search with movement keys, that would pretty
much make it impossible to go back and make edits in the search string
(other than backspace), but maybe no-one does that?
Has this been brought up as a feature request? skEdit's (i'm using it
while I wait for my Paypal deposit) tidy functionality is very well
thought out. I'd like to see something similar in TM.
Following up on a post from a week or so ago, I've created a "mysql"
snippet to run MySQL commands within TM. (This probably works best if
you have a ~/usr/.my.cnf file configured with a default login and
password on localhost.)
The snippet simply is the following: /usr/local/mysql/bin/mysql
${1:database} -e "${2:SELECT}"
... so I hit mysql, tab, then enter the DB name and then the command.
Some sample queries are appended below.
My problem is that the output begins directly after the final " in the
-e statement. What's the easiest way to insert a carriage return here?
Or is this better run as a command and not a snippet?
I've already got macros to convert DESCRIBE TABLE output into all sorts
of PHP elements... TM is great :)
Paul
> /usr/local/mysql/bin/mysql iedb -e "show tables"
> Tables_in_iedb
> clients
> firms
> iedbdata
> irt_metadata
> metadata
> sections
> stock
> /usr/local/mysql/bin/mysql iedb -e "describe
> metadata"Field Type Null Key Default Extra
> field_id int(11) PRI NULL auto_increment
> section_id int(2) YES NULL
> category varchar(100) YES NULL
> subcategory varchar(100) YES NULL
> section varchar(100) YES NULL
> subsection varchar(100) YES NULL
> field varchar(255) YES NULL
> descr tinytext YES NULL
> type varchar(100) YES NULL
> avail varchar(100) YES NULL
> comments text YES NULL
> fieldcode varchar(100) YES NULL
> /usr/local/mysql/bin/mysql iedb -e "select * from
> clients"clno fname lname job account_balance
> 10 sam smith auditor 5525.75
> 20 james jones manager 8960.25
Just downloaded the new beta to see what everyone was talking about,
but ctrl-s does nothing for me (no line in status bar, and if i hit
ctrl-s then start typing, it is just inserted as text). Going to
Textmate->About shows that I am definitely using 1.0.2b8....is there
something that I am doing wrong?
ben
I was wondering if it would be possible to not have the page scroll when a
string being searched for is found on the currently visible page.
I find that when this happens it causes me to think that the found string is
outside of the visible region and so I try to locate it's context within the
document. Somethings it's only 10 lines away but it may not be obvious
because my mental map of the document is disrupted.
Many other apps do not normally scroll if the found string is within the
visible region.
Thanks,
Ed Wong
I just downloaded the new beta...
Allan and team, I have to say I am growing more and more impressed with every release. Amazing work.
=====
http://www.velodev.com/
Hi,
Just a small request: please provide a feedback menu when dragging
seperate files into a project that are masked by the default file pattern?
I was trying to drag a file beginning with . into a project and it didn't
work, nothing happened. It's that I know of the existence of the default
file mask that I understood what happened, but other users might not know
about this...
Jeroen.
The new beta looks *very* nice. The preferences and menu
reorganization are great, and the incremental-search is oh-so-great!
Keep up the good work, Macromateys!
--
__ ____
/ / / __/ Brian Lalor
/ _ \/__ \ blalor(a)bravo5.org
/_.__/____/ http://bravo5.org/
Downloaded, installed. I do C-s and get nothing.
I have a heavily-remapped keyboard (and a MS Wireless one, at that), but resetting it to the defaults produced no changes. I scrolled through the menus, and saw no conflicting commands, and checked my MenuMaster config for conflicts.
Anyone else seeing this?
According to Ollivier Robert:
> > Very minor nit, when one select the Preferences menu, no tab is selected
> > and the window is bare till one tab is selected.
>Weird: hitting ctrl-s doesn't do anything here :(
I have the same problem: I don't get anything in the status bar
(using a British keymap)
--
Jackie Chappell
jmchappell(a)mac.com
Fugu with TextMate is fab; I'm using it now in preference to Cyberduck.
The new beta is amazing!
> Added incremental search. Press ctrl-s to open a text field on top of
> the status bar. When you enter something in this text field it will
> immediately try to find it in the text. Press escape, tab, return, or
> enter when you're done. The search is case sensitive if the string
> entered is in mixed case, otherwise it's case insensitive. The search
> will wrap around, and it will start from the caret. It's a forward
> search, use ctrl-S to make it a backwards search. While the text field
> is up, you can press ctrl-s to go to the next match or ctrl-S for the
> previous match.
cool! I can't believe how fast this is progressing... And the new Prefs!
cheers, Allan!
Paul
Allan wrote:
> TextMate v1.0.2b8 (2004-12-01) ==============================
>
> Added \U and \L escape codes to the (regex) format string. Everything
> following these escape codes to the next \E escape code will be converted
> to upper- or lowercase.
Great! All our dreams come true: we asked for it and we got it!
Thanks a lot,
--
Jo <W:00°04'37" ; N:47°15'36">
1....'....12.....'....24.....'....36.....'....48.....'....60.....'....72
>And what the Line box does I'm not sure.
When you put the number of the correct capture register (in my case,
the first grouping), TM recognizes it as a line, and (1) you can
click on the line in the separate window and jump to it in your
original window and (2) the line number isn't printed in the window.
- Eric
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
I'm growing more and more familiar with the new application now that my network is cooperation
with it. But, I have one minor hang up. I see all the examples on the website with black
backgrounds, green text, dark grey backgrounds with lighter text.
How do you alter this setting?
Thanks.
=====
http://www.velodev.com/
I've made some changes to my Java bundle; in particular, there's now a
snippet to ease the creation of getters and setters, updated keywords
in the Java syntax definition, and a new template for new classes.
My subversion repository has been resuscitated (kind of...); the
bundles are now available here:
http://telly.bravo5.org/svn/repos/TextMate/trunk/Bundles
Thanks,
B
--
__ ____
/ / / __/ Brian Lalor
/ _ \/__ \ blalor(a)bravo5.org
/_.__/____/ http://bravo5.org/
I've discovered a rather annoying problem when using Textmate with
(more than) two projects open, one of which is large. When I cmd-tab
to TM the active project appears immediately, but it takes a couple of
seconds before the other projects appear behind it. If during this
time I alt-tab out into another application, after a couple of seconds
(or when I wave the mouse) the other projects will appear in front of
the active application, but textmate is not active (ie. when I type it
still goes into the other application, but I can't see what's
happening because TM is in front of it).
Any fix would be much appreciated!
Hadley
Allan,
When I have lots of tabs open the ones that don't fit on the tab space gets
shunted off to the ">>" menu. This is fine except now when I edit this file,
there's no way of showing that it needs saving.
This is very minor since I've been in the habit of saving early and often
ever since I worked in an office where the power went off on a semi regular
basis :), but could you perhaps put an "*" or something beside the file name
in the menu to indicate that a save is pending? Just to be consistent with
the tab's "x" indicator.
Thanks,
Ed
With TextMate 1.0.2b5, when hitting ^-D while at the start of a line, it
does duplicate that line but the first version now misses the first
character.
-----
Hello World!
^-D
ello World!
Hello World!
-----
Someone else could reproduce this.
Eep?
/MS
I am hoping I¹m just missing something obvious... Is there some kind of
list of functions/methods? I.e. Similar to BBEdit or SEE¹s popup function
list?
I have used TM very little so far, but one thing that attracted me was the
much more ³native² or ³OSX² feel of it, as compared to say BBEdit. We use
SubEthaEdit for specific things (collaborative editing only), but BBEdit has
reigned so far. Yet, I don¹t really like BBEdit. It just feels old (even
the new 8.0), and it still seems WAY behind at least the editors I use on
Windows and Linux (these are primarily Visual SlickEdit (for just about
anything), IDEA for Java work, and Visual Studio .Net for Windows C++ work).
While I realize TM is not an IDE, I thought it was targeted at programmers,
so this kind of thing seems like one of the more standard features to
expect.
Aside from that, I¹m starting to get some time to play with it, and the
shell integration aspects seem super cool.
One other thing I¹d really like to see is the equivalent of the ³bbedit w²
command line syntax, so that I can use TM as my Perforce editor.
Anyway, so if I¹m just totally missing it, or there is an alternative way,
let me know, otherwise, consider it a feature request :)
I'd like to implement some automated method for creating getters and
setters for private fields in Java classes, but I'm not having any luck
figuring out how to do it.
My first thought was to set a bookmark where new getters and setters
would be inserted in the file and then put the cursor on the line
declaring the field to be got/set. (Typically, methods and fields are
separated by at least a constructor, and usually the methods are
declared after fields in the same order that the fields were.) I'm
unable to do this because bookmarks aren't exposed as variables to
commands/macros/etc. This also doesn't scale if there's more than one
bookmark.
Does anyone have any suggestions on how to implement this?
Thanks,
B
--
__ ____
/ / / __/ Brian Lalor
/ _ \/__ \ blalor(a)bravo5.org
/_.__/____/ http://bravo5.org/
I updated the PHPDocumentor [ http://phpdoc.org/ ] snippet bundle for
PHP 5 constructs. The commands are still useful for PHP 4 too. It
also has an auto-installer (bash script) that sets the default value
for @author in a separate text file so you don't have to edit the
snippets. You should run the install script and replace the old bundle
if you had it installed before.
Download:
http://farmdev.com/downloads/PHPDoc_1.1.dmg
btw .... anyone know what is happening with the main page of the wiki?
There was a place for post-1.01 bundles but I can't find it anymore.
was going to modify a download link I had up there.
-Kumar
On Mon, 29 Nov 2004 21:03:14 +0100, Sune Foldager <cryo(a)diku.dk> wrote:
> On 29. nov 2004, at 17:45, Josh DiMauro wrote:
>
> > [i-search...] As to the command key: please, let's keep it ^-s. It's
> > consistent
> > across multiple applications, and I'm already having to learn too many
> > new commands as it is, thanks.
>
> But of course this doesn't work on keymaps where ^ is dead, such as
> danish :-/.
I meant ^ as in the control key. Your layout really kills the control
key? Or just the carat (^) key?
Regardless, Allan's idea of linking to the keybinding of the i-search
plugin is genius. It can be edited if it's not what you like,
fortunately.
--
Josh
http://del.icio.us/jazzmasterson/
(forwarded because I was stupid and replied directly to Sune, sorry.)
> Date: Sun, 28 Nov 2004 20:48:11 -0500
> From: Josh DiMauro <jdimauro(a)gmail.com>
> That's pretty much it... but the advantage is less the shorter find
> string, and more the ability to fine tune by either narrowing or
> widening the search with a couple keystrokes, without having to reopen
> a dialog box. The difference is subtle, but (I feel) important.
> Incremental search seems to be one of those things that makes a subtle
> difference in reducing resistance to use. It's not so much that I need
> it to do all my searching. It's more that, when I don't have it
> available, I search less, and that makes me less efficient.
Incremental search changes the way you do searching. Using Firefox or
Mozilla, on a web page I can just type '/' and then the thing I'm
looking for. cmd-f and filling in a dialog box is requires much more
cognitive effort because of the two context switches required (into
the dialog box and back). Many times I've wanted to type '/something'
and then realized I needed to do cmd-f etc... and decided just to
page-up or page-down instead. May I suggest cmd-/ for incremental search?
Carl
I came across this thread, and although it's already been discussed on
this list, thought I'd share for the sake of completeness:
http://typographi.com/000744.php
Chris
--
Do the evolution. Get Firefox!
<http://spreadfirefox.com/community/?q=affiliates&id=5&t=4>
Quote of the moment: /If you can't describe what you are doing as a
process, you don't know what you're doing./— W. Edwards Deming
Hello,
I noticed that a lot of the syntax highlight bundles use different
colours, and on top of that also other decoration such as underline and
italics.
My experience is that italics in most fixed-width fonts does not look
that good and is bad for readability.
The other thing is that the italics is mostly superfluous: the aim is to
differentiate text from surrounding text and most of the time, this is
already achieved by using a different colour and using italics as well
does not really help.
So I propose that authors of syntax highlight bundles use italics
sparingly and only if it really has extra value to use it.
How do other users feel about this? And does anyone else have tips for
increasing usability of syntax highlight bundles?
Jeroen.
Hello. New user, here.
I'm loving TextMate so far, although I've only used it for about 12
hours. :) And I googled the mailing list archives for an answer to a
question I had, but couldn't find it. Thus, I ask you:
I'm an addicted user of the i-search cocoa plugin, which duplicates
Emacs' isearch functionality, with the same keystroke: ^-s forward,
^-r backwards.
http://michael-mccracken.net/blog/blosxom.pl/computers/mac/programming/iSea…
However, I find that this doesn't work inside TextMate, and that makes me sad.
Can you help make me not sad?
Thanks. :)
--
JoshD
http://del.icio.us/jazzmasterson/
Hello, folks. Pardon the length of this email, but I wanted to throw my
hat into this ring.
I've just downloaded TextMate, and it has taken much restraint to
suppress the constant urge to toss that ugly icon into the Trash. I'll
make no apologies for the fact that I find it hideous, and if it were
up to me, I'd start over from scratch with a completely new design.
Alas, I am not a designer, so I cannot give you a mockup. But I would
like to get a description of my idea out into the open, so that someone
with artistic skills could give it a go.
A Mac OS X application icon is supposed to show the type of document
the program works with, and a tool that one might use to work with that
kind of document. See TextEdit, AppleWorks, and Preview. However since
there are many apps that do not exactly follow this guideline -- I'm
thinking of iTunes, Safari, Mail, and Address Book -- I think we have a
little room for interpretation. But I am still in favor of keeping the
same visual style and perspective used in the Apple icons.
I envision the finished icon as mostly white. The "document" part of my
icon idea is two sheets of white unlined paper, at the familiar angle
(see TextEdit), which look like they could be homework assignments or
test papers. I envision that text is hand-written on the papers -- but
it should be made clear from the indentation and varying line length
and such that it is programming code, not paragraphs of text. There
should be red markings on it, indicating where corrections have been
made, and possibly a red hand-written and circled A at the top of the
page, indicating the grade this assignment has theoretically received,
or just a checkmark or some other indication that the document is now
A-OK, thanks to TextMate.
The "tool" part is where I think we can depart from the recommendations
a bit, given the state of other Apple icons. I can't get along with the
current robot, so I suggest a happy anime cartoon boy. In anime, as in
other cartoons, characters often have superpowers or hidden abilities,
and this guy's power therefore is sprucing up your document quickly and
efficiently without getting in your way. He's standing proudly to the
right side of the papers, legs slightly apart, arms folded in front of
him, a red marker clearly visible in his hand, and with a stereotypical
spiky outrageously-colored anime hairstyle, possibly partially hidden
by a backwards-turned baseball cap. I see him wearing long white pants
and a white shirt or sweatshirt (and if only MacroMates had a logo, it
could be printed on the sweatshirt). I see the hair as being the icon's
primary source of color, but this could prove to be too little color,
so the shirt and/or pants may have to get some color too. The color of
the SubEthaEdit icon changed from blue to green with the 2.0 release,
and iTunes' icon has changed color with every major version as well;
the hair and/or clothing colors of this icon could also be changed
across TextMate versions if desired.
Document icons should be easy to make based on this idea -- just the
marked-up paper by itself, not at an angle, with the customary turned
page corner.
So that's the idea. If we have any designers out there wanting to
tackle it, please go for it! I'm of course available by email for
further discussions of this idea, and I'll try to monitor the list as
well.
--
ryan schmidt // hello at ryandesign dot com
As we've been discussing the TM icon lately, and I'm one of those who
isn't keen on the current icon, I thought I'd do some research.
When placing a new brand into an existing market, one of the things to
identify is the values presented within the brands of your competition.
For icons, the overriding value to consider is that of colour.
I'm no designer, but I've grabbed together a bunch of OS X editor icons
and placed them on a colour wheel:
http://allinthehead.com/assets/img/osxeditorcolours.png
As you can see, the main focus is on blues and greens. These colours are
already over-used and should be avoided. Strong yellow and red have also
already been claimed, although there's no strong orange in use.
The main gap on the wheel is obviously the pinks/purples and the cyan
end. Cyan is tricky to get right, as it tends to either drift into blue
or green, or contrasts badly against white.
Therefore, I think that TextMate should have a pink/purple icon.
drew.
hello,
I am running the latest textmate beta and when I hit apple+f no find
menu pops up. however apple+shift+f brings up a dialog box. has anyone
esle experienced this?
--dfc
Douglas F. Calvert
http://anize.org/dfc/ .::. GPG Key: 0xC9541FB2
A mystic in the sense that I am still mystified by things...
Allan Odgaard wrote:
> I'm doing one or two more 1.0.2 beta versions and then I'm starting
> 1.1 and putting all the minor stuff on hold.
>
> I may send a list of what 1.1 will be about or perhaps use the wiki
> for a more public to-do (not decided on this yet -- I don't mind an
> open process).
>
> This also means that if you have something that frustrates you _a lot_
> with the current versions and you think it's easy to fix, you may want
> to mention it -- but if it's already been mentioned a few times,
> chances are that it's postponed because it's not a minor thing, or
> it'll automatically be done in the 1.1 overhaul.
OK, this single thing irritates me A LOT !!
Being a beta user, I have yet again updated TM and after doing so, my
finely tuned Snippets, Commands, Macros, Templates, etc etc menus are
being filled with things that I don't use.
So what I would ask for and hope would be easy to implement is:
Give *PRIORITY* to my bundles, that are in
~Library/AppSupport/TM/Bundles rather than those that are in the
TM.app, or alternatively the ability to switch of the TM.app bundles.
This could ideally be controlled by a preference checkbox in the prefs
window, that gives turns on the TM.app bundles or not. Default = On.
Apologies for yet again boring you with the minor stuff. :)
Kind regards,
Mats
Re: 1.0.2b7
- The web preview looks great.
- the scrolling past the window edges works great.
- Open new untitled pref seems to work great.
- Thumbs up!
The new color hack (which reads in colors) is marvelous. It is saving
me lots of time and pain.
I updated my show invisibles hack <http://math.sfsu.edu/hsu/textmate>
to have subtler colors and play nicer with ASCII xA1-xFF. Don't know
what to do about Unicode, but I'm sure someone can extend my simple
idea.
- Eric
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
Hi there,
Is there a translationscript for Text to HTML like in BBEdit
(Translate) and ignore < and /> ? Example: ö -> ö
That would be great.
thanks,
Detlef Hoge
Hi mate,
Just saw your email on the archives... any chance of making that syntax
file available to me? I've been mucking about with it much as you did i
imagine, but don't quite get how to edit them and have them load. I
really want PHP & HTML syntaxing at the same time...
Thanks,
john
> Allan,
>
> Thank you for your help !!! Very much appreciated.
>
> >> As it is right now, I have a choice of highlighting for HTML or for
> >> PHP, BUT NOT both at the same time.
> >
> > No, the "HTML (PHP)" does do this. But the colors of HTML is toned
> > down significantly.
>
> Ahh, the perils of editing syntax files without understanding things
> fully. I made a colour change to the "HTML (PHP)" syntax file and
> stored it in the AppSupport directory, so it overrode your file, and in
> doing so it created plain black text on white background. : (
>
> I have now spent a good few hours tweaking my colours and have HTML
> with PHP; with CSS; with JS highlighting working just as I want it.
>
> Although time consuming, it has been a very good process to go through,
> and I have learnt a lot about the syntax structure. As a result, I am
> very impressed by the inherent power in the syntax format.
>
>
> My only concern now - as I have migrated to a dark background - is that
> the cursor is invisible over the edit window. Perhaps something that
> you are already aware of and working on. (Or perhaps is remedied by
> some to me unknown setting).
>
> Kind regards,
>
> Mats
>
>
Regards,
John Cleary
==
Founder, OziMac
john(a)ozimac.com.au
http://www.ozimac.com.au
==
Hi,
I do like TM's syntax highlighting a lot, but I think it's annoying
having to tweak their color schemes to my liking all the time. I think
the parser bundles should tell TM the kind of a piece of text (comment,
reserved word, string, etc) instead of font style information, and TM
should give me a way to apply a custom stylesheet to all that info.
So I would like to have one file containing my custom stylesheet that
tells TM to display all comments (regardless of language) in green, all
strings in purple, except for perl, where I'd like my strings to be
blue. You get the idea.
How does that sound?
Cheers,
-Ralph.
BTW, that's the feature request I wanted to add to the wiki before I
broke it..
I would like to have a $TM_BUNDLE_PATH available in a command, that
points to the directory in which the current command is stored. For
example, $TM_BUNDLE_PATH would point to
/Applications/TextMate.app/Contents/SharedSupport/Bundles/HTML.tmbundle
for the Refresh Safari command.
This would make it easier to make more complex commands (just let your
command execute $TM_BUNDLE_PATH/my_fancy_script.sh) or pack in some
extra resources.
I love the color picker (awk version)! That is a great little hack
which should probably come standard. One thought: it would be even
cooler if one could select text that was a color like #00ff00 and
have the color picker open with that color selected. For those of us
who need translating *to* colors as well.
I love this program... the power of Cocoa and Unix together at last... - Eric
PS. I like the key/gear icon.
PPS. Yes, icons are something everyone can have an opinion on (I was
alluding to the bike shed piece when I wrote that). On the other
hand, a lot of people on this list really like the program and want
to contribute in their own way. Some of us can hack Perl syntax
files, some of us can be wiki gardeners, others of us can show our
affect by contributing visual ideas. There's More Than One Way To
Contribute To It. As long as we know to back off at the end and let
Allan make the decision...
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
1. Here is my attempt to hack a 'show invisible characters'
capability. I made a syntax bundle called 'Show Invisibles' that
colors spaces, tabs and ASCII characters below \x21 and above \x7F
different colors. I posted the bundle to my web site at
<http://math.sfsu.edu/hsu/textmate>. Install it and switch to as a
syntax highlighting to find the gremlins.
2. I also updated my Perl bundle to have auto-indent and to highlight
file test operators. Other changes noted on history page.
3. I think this has been mentioned, but when one drag-selects past
the top or bottom of a window, usually the window should scroll in
that direction, and TM 1.0.2b5 isn't doing that.
- Eric
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
Hi everyone,
Great discussion about the icons (though I agree it's perhaps the least
important aspect of TM). During a bout of insomnia I fancifully thought
up one that would just be "\B", as in "escaping BBEdit" :)
More seriously, I found myself opening BBEdit yesterday just for the
web color palate. Does anyone know of a similar swatch picker (perhaps
standalone) that would work within TM? Generally I use only a few
colors, but I'm color-coding cell backgrounds based on numeric scales
and need to see the whole "spectrum" as it were to help choose them.
Thanks for any tips...
Paul
OK, I know this has been brought up before and that Allan is working on
new implementations for sometime in the future, but I just want to make
sure the following is considered as well. Trying hard to be as
succinct, logical and realistic as possible here, so apologies if I'm
not.
1. GUI ISSUES:
1a) Snippet Editor Window
Looking at the Snippet, Command & Macros Editor windows, there is
essentially three different design concepts implemented there. Of the
three I think the Command Editor is the better functioning concept,
albeit not perfect. By making the 'entry NSBox view' fixed in size it
enables the user to resize the window and thereby automatically resize
the table view (NSScrollView) making it easier to read the full Command
names and their triggers.
The main problem with the Snippet Editor window is that the table view
(NSScrollView) is not resizable. However, this could be improved
relatively quickly by:
-- implementing a NSSplitView functionality (split view resizing of
window parts)
-- or making the NSBox view (the gray background box) fixed size as it
is in Command Editor window. (Probably faster to implement)
This 'simple' change would make using the Snippet Editor much better.
For further improvement ideas in the Snippet Editor window, see point 3
below, as they are more context dependent.
1b) Project Drawer & Image files
Working mainly with web development and graphics/images, I think it
would be great if you could see the image displayed in the main editor
window, or alternatively opened by Preview rather than any other app
regardless of the Creator Code of the image file when you double-click
the filename. This should ideally be a preference option, where you can
turn it on or off.
The file formats in question are: .jpg, .png. .gif. .pdf
2. BUNDLES MANAGEMENT:
2a) Too many syntax files available in the "Syntax Highlight as" menu
Being a bit of a 'boring' developer that only works with PHP, HMTL, CSS
& JS I find that I essentially only need my own .tmbundle that contains
all four of those languages. I therefore want to be able to turn off
the unused bundles, or alternatively keep the unused bundles further
down in the "Syntax Hightlight as.." sub-menu. Sort of like this:
[ -> = sub-menu ]
Syntax Highlight as ->
Syntax Status Editor == (GUI see below)
-- DIVIDER --
XHTML
PHP
CSS
JS
-- DIVIDER --
Disabled Syntax Files ->
ASP
<snip>
Unix Shell...
I know that this could be partly achieved by naming my commonly used
bundles differently and renaming the others, but I shouldn't have to do
that.
2b) GUI Solution to Syntax Management:
A Snippet Editor type window where the available Syntax bundles are
listed on the left, and in the right hand side view we could display a
default bundle sample code template which is highlighted in the window,
so that we can see if we like the syntax colouring. Below it, we would
have one button "Disable/Enable" with toggle status for
enabling/disabling each bundle.
A quick & dirty mock-up can be found here: [
http://www.imediatec.co.uk/TM/Bundle-Manager-GUI.jpg ] It should give
you a good enough idea about the whole concept.
Perhaps a .plist version could be implemented first ??
3. SNIPPETS STRUCTURE:
3a) Snippets Numbering:
All snippets in /<something>.tmbundle/Snippets/ are numbered as 010,
020, 030 and so on with 10 increments for each snippet.
Why increment by 10 each time ? Why not by 1 for each new snippet ?
Why use numbering at all, since the available snippet files can be
displayed according to alphabetical order and then - see points below -
could be reorganised according to the users own choice and the display
order could be stored in a .plist file ?
Why oh WHY change the snippet numbers when I have numbered them as 010,
011, 012 ? Aarrrgh!! :(
(My idea behind numbering them that way was to create my own structured
Snippets with sub-groups with space to add new snippets in between.)
3b) Snippets Organisation:
As I have suggested on the wiki "Feature Requests" page, the snippets
would be better if they were structured in categories, where each
category is a sub-menu item.
When I create new snippets now, I give them a pseudo category
identifier such as "PHP " or "XHTML " and then the snippet type id.
This helps me keep my snippets fairly organised, but they still stay
out of alphabetical order, mainly due to the Custom.tmbundle issue
addressed above.
However, the biggest problem with my Snippets Menu is that it is too
long for my screen (1600x1200) so I have to scroll the menu in order to
get the bottom values. Moving to sub-menu categories would improve this
drastically.
Making the table view in the Snippet Editor GUI into an NSOutlineView
(as partly implemented in the Project Drawer) where we could have these
sub-groups, toggle the view of their content and so on.
3c) New Snippets Save location:
When you create a new snippet it is stored into
/App..Support/TM/Bundles/Custom.tmbundle/Snippets/ which are
prioritised over the active bundle's snippets. My issues with this
structure are:
-- I want to choose where I want my new snippet to be stored, as it
most likely will be in relation to the current .tmbundle that's being
used, and I find it better - in my mind - to add language related
snippets in the language bundle they belong to.
-- In the Snippets Menu, I would want my active .tmBundle Snippets to
be top of the list, not the other way around.
The same would be applicable for Commands & Macros as well. That way,
by saving all commands, Macros & Snippets related to the specific
language/bundle, they are not available when we disable the bundle as
suggested in point 2 above.
In the GUI, this would work by selecting the current snippet category,
and then clicking "New Snippet" button. Sort of like this works in
Project Drawer.
3d) Snippet Re-Ordering in Snippet Editor window listing:
What would be ideal in the Snippet Editor GUI, is the ability to drag
around snippets and re-order them that way. Newly created snippets are
always added to the bottom of each snippet group they are created
within, but can then be moved by the user to the position they would
want. (Think iTunes playlist for a good example of this)
OK, that's it for now. Hope I haven't wasted my or your time.
Kind regards,
Mats
-- -- -- -- --
"For those who aren't familiar with OS X, it is a full implementation
of BSD Unix with a Macintosh front end, which is to say world class
inside and out. OS X is faster, smarter, prettier, and easier to use
than any version of Windows."
by Robert X. Cringley, Feb, 2002 [ http://www.pbs.org/cringely/ ]
Hi,
Another one for the pile...
Not sure if this has been picked up before but the following steps
demonstrate a bug in the folding logic:
1. Create a TM new document
2. Past in the following test php code:
function test() {
/* multiline
comment
*/
some stuff...
}
3. Set the syntax highlighting as PHP
4. Notice that it correctly identifies the start and end of the
function as a folding block as well as the start and end of the comment
as a nested folding block
5. Do Cmd-Alt-0 to collapse everything or click on the fold by
'function ...'
You should find the text from some stuff... onwards is not collapsed.
If you first collapse the comment (using F1 or clicking on the icon)
you can then collapse the function without problems.
I might be wrong, but I don't think this is a problem with the PHP
bundle, as it is correctly identifying folds.
Cheers,
James
I've noticed that if I create a new, blank document and then drag a
text/html file onto the doc, TM will overwrite/fill up the empty
document with the contents of the dragged file. Since my goal in
creating the new file and then dragging another one on to the doc was to
copy and paste between them, you foiled my plans!
Can you just leave blank docs in their current state when I drag a file
onto the doc?
Thanks!
Chris
--
Do the evolution. Get Firefox!
<http://spreadfirefox.com/community/?q=affiliates&id=5&t=4>
Quote of the moment: /Teeth never inflate when you inhale, cause that
would look really stupid./— Davezilla
Yep, an icon is something everyone can have an opinion about. I
don't like the default one, not just because it looks awkward to me,
but mainly because the colors are very invisible to me, and it's hard
to find in the dock. For a while I used a replacement icon from the
World of Aqua IV of the red robot from Ghost in the Shell, and I'm
currently using the 'braces' icon.
I don't think I have to love an icon, but I should be able to find it
quickly in the dock.
- Eric
--
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu(a)math.sfsu.edu
http://math.sfsu.edu/hsu
Alas I'm using "/" as an arithmetical operation in a MySQL statement
and it renders the rest of the code (until a subsequent "/") as a
RegExp! I thought it was commenting out until I looked at the bundle:
{ name = "Comment"; foregroundColor = "#9933CC"; match =
"^\\s*--.*$"; },
[snip]
{ name = "Regular Expression"; begin = "/"; end = "/";
foregroundColor = "#CCCC33";
patterns = (
{ name = "Interpolated String"; match = "#\\{([^\\}]*)\\}";
foregroundColor = "#aaaaaa"; },
{ name = "Escaped slash"; match = "\\\\/"; foregroundColor =
"#CCCC33"; }
);
},
This is a shame b/c I was enjoying the SQL syntax colors... this
renders them unworkable when using the maths... Is there a way to
change the RegExp syntax to allow "/" as divisor?
thanks!
Paul
PS to Fred B -- any relation to Agnes? :)
Has anyone developped an Ada syntax/snippets/coloring bundle? A friend of
mine would be very interested...
--
Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto(a)keltia.freenix.fr
Darwin snuadh.freenix.org Kernel Version 7.6.0: Sun Oct 10 12:05:27 PDT 2004
Hi there,
Is there a translationscript for Text to HTML like in BBEdit
(Translate) and ignore < and /> ? Example: ö -> ö
That would be great.
thanks,
Detlef Hoge
Show project drawer appears to be broken. I can hide the project drawer, but
once it's hidden I can't show it again. This occurs with existing and new
projects.
Ed Wong
I'm not sure what the correct definition for this is, but here is what
I am trying to do:
I am trying to remove (delete) the empty space or move the cursor to
the beginning of the next HTML tag in an existing HTML document, that
sort of looks like the examples below:
With the cursor immediately after the first <p> tag:
By pressing Alt-Shift-del (not backspace) deletes all space up until
the text "this" in Code Example A:, but in Example B: we delete only
one line of text, and has to press it twice, in Example C: we end up
deleting all the space including the first < in <code>
With the cursor immediately after the end of the paragraph text block
('text'/'tag'):
By pressing Alt-Shift-del here, deletes as above, but also deletes the
</ of the closing tag.
I do not know if this is an issue to do with some hidden
characters/spaces/tabs in the files I am working with, or whatever, but
it is irritating.
So, is there some way that this behaviour can be changed ??? Hidden
prefs in a .plist file ?
IF not - or as an immediate alternative - how would I create a regex &
Macro that would delete all the space (including tabs, new lines,
carriage returns etc ) up until the first < tag ??
I would be very grateful if someone could point me in the right
direction here.
Example A:
<p>
this is a simple paragraph text
</p>
Example B:
<p>
this is a simple paragraph text
</p>
Example C:
<p>
<code>this</code> paragraph begins with an html tag
</p>
Kind regards,
Mats
I can't seem to find where the dictionary is specified in text mate?
I am using it for Latex and in the installation on my portable Mac
spell checking (in US English) works,
but the, as far as I can tell identical, installation on my desktop Mac
I do not get misspelled words high-lighted, but right clicking on a the
misspelled word offers me the suggested better spellings
How could I specify sometimes a different dictionary (Uk English,
French) Mail knows about the different dictionaries....??