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