I've just started using TextMate for perl editing and I noticed today
when I opened up a file that this line of code confusing the syntax
coloring...
if ($link eq '' || $user eq '' || $user =~ / / || $link =~ / /) { ... }
TextMate saw a string starting at the first ~ and never stopping.
I looked through the bundle and I found what seemed to be the problem
here...
{ name = 'string.regexp.find.perl';
match = '(?<!\\)((~\s*)?\/)(\S.*?)(?<!\\)(\\{2})*(\/)';
captures = {
1 = { name = 'punctuation.definition.string.perl'; };
5 = { name = 'punctuation.definition.string.perl'; };
};
},
The \S there is matching any non-whitespace character so it doesn't
like the space character being used between the //. I changed that
match line to this and it seems to have fixed it for me...
match = '(?<!\\)((~\s*)?\/)([\S| ].*?)(?<!\\)(\\{2})*(\/)';
Is there any reason that's not a wise change to make?
Thanks for any info,
Dallas
Hi all,
I think I’ve finally managed to get a statically linked build of
SVNMate working, which means that it should work on any system
without problems. Maybe.
Apologies if you tried to install it previously and had problems.
Download at the same place: http://ciaranwal.sh/2007/10/10/svn-plug-
in-for-textmate
Ciarán
Hi,
would it be possible to add support to the
chktex semantic LaTeX checker? it's a nice
program that checks for structural errors
in the latex file and is able to spot errors
in many situations (unmatched braces etc).
It is more advenced than lacheck and last
version 1.6.3 compiles perfectly on Mac OSX.
The ideal would be to produce an HTML view
with links to the offending lines (and to
have an additional button "Chktex" alongside
"Re-Run pdflatex"... etc
Thank you,
Piero
Hi,
I 'finished' the recoding of TMTOOLS. If someone has a bit time
please give me a feedback about the functionality, bugs, wishes, etc.
Please note: The version 0.9 is still beta, i.e. please be careful
while testing it. By myself I use it every day while working, and it
helps me a lot; at least for me ;)
I also wrote a tentative help file for it very quickly.
To install the plug-in download it, uncompress it, and double-click it.
http://email.eva.mpg.de/~bibiko/downloads/textmate/
TMTools.tmplugin.zip (111kB)
(it should be universal - if not please give me a hint)
For help have a look at this page (utf-8 encoded!)
http://email.eva.mpg.de/~bibiko/downloads/textmate/tmtoolshelp.html
or type in an empty TM document (after installing ;):
"$TMTOOLS" help me
and press CTRL+R
A short demo:
http://www.bibiko.de/TMTOOLS_demo_01.mov (10MB)
Up to now TMTOOLS contains 106 shell commands which interact with TM.
some examples:
"$TMTOOLS" get windowOriginAndSize
"$TMTOOLS" get currentWord '{only=tail;delimiter=" ():.";}'
"$TMTOOLS" set spellCheckerLanguage '{to=en_GB;}'
"$TMTOOLS" set windowSize '{width=100;height=200;}'
"$TMTOOLS" set grammar '{to="Ruby";}'
"$TMTOOLS" call template '{name="From Clipboard";}'
"$TMTOOLS" show projectDrawer '{onEdge=0;}'
"$TMTOOLS" complete usingDictionary
'{lang="da";showInternalListFirst=yes;}'
"$TMTOOLS" use nsstring '{initWith="たてもの";
toGet="canBeConvertedToEncoding:"; with="8"; }'
The command "$TMTOOLS" do onKeyDownAfterDelay is still experimental.
I tested it a lot, and it works.
This command installs an event manager which will execute any shell
command after a delay of X seconds if no other keyDown event occurs
within X seconds.
The following example will save the current document in /tmp after
5sec if there is no further key pressed. (A kind of AutoSave function
while non-typing)
If one presses ESC (stopkey=53) one destroys that event handler. For
more details see help.
Furthermore it can be used to display suggestions for the code
completion à la XCODE (see demo).
"$TMTOOLS" do onKeyDownAfterDelay "{
delay="5";
repeat=no;
startAtCall=no;
shell='\"$TMTOOLS\" get textString > /tmp/\"$TM_FILENAME
\".txmtbkp;say \"document was saved\"';
stopkey=53; }"
Best,
Hans
Hi,
I finally got a macbook and Textmate about a month ago, primarily for
ruby/rails development.
I looked at the various screencasts, and the one on the rails bundle
shows some features like the mdct (migration drop and create table)
and mrac (migration remove and add column) which use schema.db to
generate code in the migration's down method to recreate the table or
column being dropped or removed.
The rails ruby bundle which came with TextMate doesn't seem to have
these. I did find what seems to be the bundle demoed on the
screencast at the syncPeople web site, and installed it, but it seems
to replace the 'standard' bundle which came with TM (the names differ
though).
What's the status of this/these bundles?
By the way, I wrote another mini-bundle which has one command which is
a 'magic' snippet for adding an item to a rails test fixture. It also
works by reading db/schema.db
The code for the command in the bundle can be found in an article on
my blog. I had planned to add the bundle as a resource to the
article, but it seems that typo(my blog engine) doesn't seem to
support uploading bundles.
The article is at
http://talklikeaduck.denhaven2.com/articles/2007/10/09/my-first-serious-tex…
I'd appreciate any feedback on this textmate command.
--
Rick DeNatale
My blog on Ruby
http://talklikeaduck.denhaven2.com/
Hi,
I wonder if it would be possible to tell TM (2.0) to execute a
specific tmCommand on some events like:
-TM starts : execute a autostart script
-TM quits : before quitting execute a script
-TM looses its focus to an other App
-TM gets the focus
-for each TMPROJ, specify an autostart script and a shutdown script
Maybe also:
onRightMouseDown
onLeftMouseDown
etc.
This behaviour could be set in TM's Preference.
Esp. if one develop a plug-in for TM one has to restart TM very
often, and it would be nice if my window settings (code documents,
bundle editor opens with the last edited item, etc.).
I tried to write a plug-in for that, but for me it's a bit tricky. I
got rid of onOtherMOuseDown, etc. but to start a script if TM starts,
well I have no idea to do that because no document is open if the
plug-in will be initialized. Or has someone an idea?
Regards,
--Hans
Hi,
I don't know if someone else is interested in this, but the TMTOOLS
plugin has very nice side-effect ;)
Now I can write quite easily my own dialog/menu/monitor in HTML,
meaning a tmCommand with output 'ShowAsHTML', with my favorite tasks.
see demo: http://www.bibiko.de/TM_HTMLDIALOG.mov (1.5MB)
--Hans
I've been using pdfsync with Skim, and notice that every time I hit the key combo for pdfsync in TM, Skim reloads the document (this is obvious because Skim now displays a progress sheet). Would it be possible to avoid telling Skim to revert the document unless it's actually changed? That would speed up syncing quite a bit, I think. Skim's displayLine command should handle opening it if necessary, also. If I stare at textMate.py a bit more I might be able to figure it out on my own.
thanks,
Adam
I was a long-standing user of emacs for my LaTeX documents, and I
have recently switched to TextMate, but I miss some features of
emacs. In particular:
pressing TAB in an environment (or in math mode, or inside
parenthesis) move the cursor out of the environment (math mode,
parenthesis). In addition pressing tab when in sub/superscrit takes
the cursor out of the superscript and removes the curly brackets if
the sub/superscript contains a single character.
For inserting symbols I were used to the RefTeX way, i.e., pressing a
key (` in the original setting and ! in my customisation) followed by
a letter produces a (LaTeX) symbol. So for example typing !a produces
\alpha and !A produces \forall.
I wonder if there are ways to replicate the behaviours in TextMate.
All the best
Guido
--
Dr Guido Governatori
School of Information Technology and Electrical Engineering
The University of Queensland
Brisbane, Queensland, 4072, Australia
Phone: +61-(0)7-336 52907
Fax: +61-(0)7-336 54999
http://www.itee.uq.edu.au/~guidohttp://www.governatori.nethttp://www.defeasible.org
I'd like to automate the date entries for a journal I write in "LaTeX"
and have come up with this snippet:
\subsection{${1:`date +%A`, `date +%d` `date +%B` `date +%Y`}}
which gives me the date as follows in my files (example):
\subsection{Wednesday, 10 October 2007}
It works--that is, it gives me the spaces I want between the elements of
the date, but it looks cumbersome to me to invoke the date command
repeatedly to get these spaces and I wonder if someone could supply a
more elegant way to get the same result.
Thanks.
--Gildas Hamel