Hello, everyone.
I have written a more Xcode like completion extension for tm_dialog. My
guess is that this is of interrest to more people than me. The code has
not been commited yet, but I have made a screencast to show of some of the
functionallity.
[ http://mail.mac.se/joachimm/TextMateCodeCompletionEnhancements.mov ]
, right now I am looking for suggestions for the programmatic and user
interface.
what I have so far
"$DIALOG" -f -p '{suggestions = ({title = "foo";filterOn = "foo";},{title
= "bar";filterOn = "bar";snippet = "(${1:hello}, ${2:again})";});
mutablePrefix = "fo"; staticPrefix = "";}
as you can see you need to populate an array called 'suggestions' with
dicts with the keys 'title' and 'filterOn', the key 'snippet' is optional.
you also have to give the keys mutablePrefix which is the prefix when you
launched the command. plus the optional staticPrefix which is handy when
you are completing things that are multipart such as objective-c methods
(it is not really necessary since filterOn does not have to have the same
prefix as title).
Once the command is running it should work as follows.
* an alphanumeric key press appends to mutablePrefix, there by potentially
limiting the list of candidates.
* a tab press inserts the longest common prefix among the candidates, this
will ofcourse never limit the list in itself, but can quickly be followed
up with a alphanumeric keypress, thereby saving lots of typing.
* a return inserts the current selection in the list, plus its snippet key
if there is one.
* delete removes a char, if this moves the caret before the beginning of
the search prefix the dialog goes away
* up/down moves in the list
* any other key closes the dialog and hands control back to TextMate.
What are your thought, am I missing something that could be useful for
your language?
Thanks in advance.
Joachim Mårtensson
I'm using the LaTeX bundle from SVN, updated daily (currently at
r8019). One of my documents has the following line of text, which
causes the syntax highlighting to misfire:
\textbf{Top row} - Manifold Pressure (`` HG) and Fuel Pressure ($
\mathrm{lb/in^{2}}$).\\
The fact that the quotes are not closed seems to be the problem.
But, I believe this is a perfectly legal usage, if you want to use an
abbreviation for "inches".
Kevin Horton
Ottawa, Canada
I think it would be very useful for TextMate to identify the type of a
script file based on the shebang line. This would be particularly
useful for scripts without suffixes. In my opinion, an identification
made this way would take precedence over one done based on the file
suffix.
For example if the first line of the script named "do_some_stuff" was
"#!/bin/env bash", then the file type would be a Bourne Shell script
file and Shell script (bash) syntax would be turned on.
Dear All,
I recall that the Blogging Bundle has never been able to handle Movable
Type's conception of "Categories" (ditto for BlogMate, I think).
However, I also recall that the developer hoped that this would be
ameliorated with future versions of MT. With the major update to MT4.0,
I still don't seem to get category information on the posts. Any ideas
for fixes or workarounds?
Thanks,
Andrew
Hi,
I saw a thread on this in the forum, but I still have this problem. I
just installed revision 1405 and activated the bundle. It registered
successfully. But in Safari 2.0.4 it does nothing. I saw a post saying
this combination works, but not for me. Any ideas?
Thanks
Hi All: I'm a new Textmate user. (I love it.) Was trying to use
the blogging bundle with a Typepad blog. I'm having difficulties
trying to get it through the first test fetch of recent posts.
I've been working with Typepad support for the past few days as I
assumed the problem was on their end. They're pushing back to
Textmate now. They claim Typepad supports the metaWeblog XML-RPC API
in their Knowledge Base: a search for "metaweblog api" and it returns
an article called "TypePad and Desktop Clients" at an obscenely
unreadable URL.
(http://support.typepad.com/cgi-bin/typepad.cfg/php/enduser/
std_adp.php?p_faqid=87&p_created=1125520929&p_sid=5-
AnQzJi&p_lva=&p_sp=cF9zcmNoPTEmcF9zb3J0X2J5PSZwX2dyaWRzb3J0PSZwX3Jvd19jb
nQ9NCZwX3Byb2RzPSZwX2NhdHM9JnBfcHY9JnBfY3Y9JnBfcGFnZT0xJnBfc2VhcmNoX3Rle
HQ9bWV0YXdlYmxvZyBhcGk*&p_li=&p_topview=1)
The only Typepad discussion I found on the Textmate mailing list
search was this old unanswered post:
http://article.gmane.org/gmane.editors.textmate.general/11960/
match=typepad
I found no discussion in the original post comments that helped either:
http://macromates.com/blog/2006/blogging-from-textmate/
My setup line looks like the following:
# Blog Name URL
Once More Unto the Breach http://stephenrwalli@typepad.com/t/
api#000001
It prompts me for a password, then returns:
Received Exception: HTTP-Error: 302 Found No posts are available!
I've also tried:
http://stephenrwalli@typepad.com/cgi-bin/mt/mt-xmlrpc.cgi#1http://stephenrwalli@typepad.com/cgi-bin/mt/mt-xmlrpc.cgihttp://stephenrwalli@typepad.com/t/apihttp://stephenrwalli@typepad.com/t/api#1http://www.typepad.com/t/api [which prompts for both username and
passwd and returns Invalid Login (403)]
I would assume I should receive a post or two per the demonstration
video. I'm not a constant blogger, but have 4 posts in the last 30 days.
Are there places I haven't looked yet?
Ideas? More information I can dig out?
kindest regards,
stephe
Stephen R. Walli
mailto: stephen.walli(a)gmail.com
mobile: +1 425 785 6102
skype: stephen.walli
IM: stephenrwalli at AIM | YIM | Hotmail OR stephen.walli at gmail
blog: http://stephesblog.blogs.com (Once More unto the Breach)
podcast: http://stephenrwalli.libsyn.com (Once More unto the Breach
podcasts)
flickr: http://www.flickr.com/photos/stephenrwalli
Hi,
If I edit a file which is considered "external" to my subversion
repository (think plugin in a Rails app) and then run the Commit
command from the Subversion bundle, it will include that file in the
commit process. But of course this will fail because I can't update a
file that isn't in my repository (it's external). I can uncheck the
check box every time but that is kind of a pain.
So I dug around in the Subversion bundle and changed line 94 of
svn_commit.rb to this:
status_command = %Q{"#{@svn_tool}" status --ignore-externals #
{(a)paths_to_commit.quote_for_shell_arguments}}
That just adds the "--ignore-externals" option so I no longer have
this problem. It makes sense to do this because the normal "svn
commit" command doesn't include external files. It would be great if
this change could be made to the original bundle so this ugly hack
won't be necessary. Thanks.
Regards,
Ryan
Hi there,
How come this file renders fine in safari b3 and webkit (screen grab below),
but preview in textmate gives this:
Or this:
Safari shows it fine as:
--
If you have an apple and I have an apple and we exchange apples then you and
I will still each have one apple. But if you have an idea and I have an idea
and we exchange these ideas, then each of us will have two ideas. - George
Bernard Shaw
Hello,
From the archives I see threads about a MT bundle for Textmate.
> From: Brad Choate <brad@...>
> Subject: Re: Bundle for Movable Type templates
Where might I find this bundle? Does such a bundle do syntax high-
lighting, or, instead, is this an interface to a blog API, for
example to upload posts to a blog...?
I am looking for a syntax high-lite so that I can avoid editing
templates in a web browser... :)
Thanks for any hints!
Cheers,
DK
Is there a way in TextMate to create tag pair highlighting? I'm
basically still a novice with customizing TM. Here's what I'm thinking:
Basically I go through a lot of old code that is littered with nested
table, tr, td and span tags. It makes it difficult to find a tags
"pair". It would be nice to invoke a key command on a tag (be it
HTML, XHTML, PHP, Etc.), either the beginning tag or end tag and have
it highlight the corresponding tag. And to take it one step further
it would be nice to have a slightly different key strong highlight
the corresponding tag and all the contents between them.
Can anyone point me to a bundle that does this or a way to create it?
Thanks.
Josh
I'm using TextMate mostly for XHTML/CSS work.
I recently switched to a Mac Pro from a Mac Mini and now have a
proper Apple UK keyboard.
unfortunately the # is lurking under opt+3 and I find that an awkward
key combo for such an often used character.
I've tried using TextPander with some success but it won't expand a
snippet when the caret is not in empty space, so getting h3#header1
requires some jiggling.
are there any snippets or shortcuts I'm missing in TM that will
append a # to an element in CSS without me having to contort my
fingers to get option+3 so often?
TIA
Hi,
Anybody make Markdown Extra <http://www.michelf.com/projects/php-
markdown/> work with TextMate? Not sure if other people think the
extra syntax is helpful, but I do.
As this is written in PHP, I'm not sure how it can be implemented.
Another possibility is to use Maruku <http://maruku.rubyforge.org/>,
which is written in Ruby. Anyone here have any needs to these
Markdown add-ons? I'm now trying Textile now, but prefer Markdown.
Takaaki
--
Takaaki Kato
http://samuraicoder.net
Hi,
I'm looking for a way to export all the text from my .tex files, or
just one -
(actually I want to use it to create tagcrowds of my work >> http://
www.tagcrowd.com/ - to give it a try and for some designing touches)
I wonder if there is some way to do this, something like picking all
content that fits a certain scope like "string" - or something and
export it into a pure plaintext file.
I agree this feature would probably not be able to export \footnote's
and \marginnote's but anyway -
Do you have any idea if there already is something like this - or if
it is possible at all?
Thanks a lot - and enough for today
flo
Hi,
I've got a problem..
Using the instructions from the manual and from the mailing list, I
hit the Info-button in my project drawer (without having any file
selected) and set the
TM_LATEX_MASTER to
> /Users/flo/Desktop/DiplomArbeit/070627_da_draft01/da_draft01.tex
From now on, whenever I hit "Typeset and Preview" I get the
following error in my Preview-WIndow:
> Error locating external viewer: ‘/Users/flo/Desktop/DiplomArbeit/
> 070627_da_draft01/da_draft01.tex’
I've tried saving my masterfile "da_draft..." as relative and
absolute path, but both showed the same error.
In my external viewer, PDFView everything is fine and gets properly
compiled.
Why is this so? And is there something I do wrong? Anyway to fix this?
Thanks
Flo
I've got a couple questions:
Can it parse the document and generate a list of completions based on
what you've typed?
(Thomas' completion command does this very well.)
Can it do this on unsaved documents?
How are these rules defined? (the easier this is the better)
Hello,
I'm curious why these instructions <http://macromates.com/textmate/
manual/bundles#getting_more_bundles> direct the User to create a
local svn repo in the Apple System's (/) Library area as opposed to
the User's (~) Library area. Is there a reason that it must be
installed at the System level instead of the User's "Application
Support" hierarchy?
Cheers,
DK
On Aug 15, 2007, at 08:00, Alex Ross wrote:
> I agree that prefixing all re's is not ideal.
>
> So, we have five options:
>
> 1. Match all raw strings unambiguously as regular expressions. We
> will sometimes have false-positives.
>
> 2. Match raw strings that are arguments to methods from the re
> module. We will sometimes not match raw strings that are regular
> expressions, but can be pretty well guaranteed to never have a
> false-positive.
>
> 3. Require some prefix to a raw string to "turn on" regular
> expression matching. This has an extremely high probability of
> removing false-positives and false-negatives, but at the cost of
> additional CRUFT.
>
> 4. A combination of 2. and 3. Match raw strings that are arguments
> to re.compile and raw strings prefixed with (?#) as regular
> expressions, but no others.
>
> 5. Don't match re's at all.
>
> It would seem there is no perfect option. I propose that we put it
> to a vote, and perhaps appeal to our BDFL Allan.
>
> –Alex
>
> My vote would be for 4, but I'll add two more options:
>
> 6. Parse r' and r''' but not r" and r""" (or vice-versa) as regexes.
>
> 7. Parse the "r" prefix, but not the "R" prefix, as regexes.
>
> The last option is probably the simplest. I don't think I've ever
> seen the "R" prefix in use and didn't even know it was an option
> until I just read the spec moments ago.
>
> j.
>
6. and 7. are really variations of 3 - which 'special' prefix do you
use to turn highlighting on or off, and what is it's default state?
I have incorporated them below.
>> The last option is probably the simplest. I don't think I've ever
>> seen the "R" prefix in use and didn't even know it was an option
>> until I just read the spec moments ago.
>>
>
> I've never seen 'R' in use either, but I'm sure somebody, somewhere is
> doing it. I think 6,7 are going to be too confusing.
I think that it's no more confusing than having r'(?# as the lead
prefix, having R' instead, or having r' turning regex highlighting
ON, and R' disabling it. It also has the benefit that it's easier to
read, and since there doesn't seem to be a standardized common-use of
R', making it the 'I'm not a regex raw string' marker is reasonable.
> And adding a no-op "signal" to raw strings that will later be used as
> regexes just to turn on some coloring seems very unPythonic in that:
>
> It is ugly.
> It is implicit.
> It adds complexity.
> It detracts from readability.
> It is not the obvious way to do it.
Partially true - but this is not a language definition, nor Python
code, but something different - a highlighter FOR Python. The
underlying code that makes up Python is very unpythonic.... and it
certainly will make it MORE readable in TextMate, as then it will be
highlighted correctly!
I vote for 4 as well. Method number 2 will cover the most common use
cases of regexes, and will keep the regex using folk (like me) happy,
without highlighting non-regex raw strings, and keep that group
happy. Part 3 is more touchy...
Once we start to get to the edge cases, such as feeding in a raw
string defined in one line into an re.compile in another line, either
we:
a - Never highlight - keep raw string users happy, annoy regex
users quite a bit,
b - Highlight when a prefix turns it on - obscure and a bit ugly,
but keeps raw string users happy, annoy regex users much less, but
still a little,
c - Highlight by default, but adding a prefix can turn it OFF, e.g.
R instead of r - again, obscure and a bit ugly; annoys raw string
users slightly, keep regex users happy, or
d - Always highlight all raw strings as regexes - annoy raw string
users, keep regex users happy - which is what we have now.
I use regexes quite a bit, but I could foresee a case where I might
want a raw string non-highlighted. If we change it at all, I would
vote for 4c.
Nick
Hi
(I'm preparing a talk so I am actively testing
and running into problems, sorry...)
Again on the issue LaTeX Watch-Beamer:
could someone please reproduce the following issue:
- save a file containing only
\documentclass[10pt]{beamer}
\begin{document}
aa
\end{document}
- invoke LaTeX Watch
- modify something (add "bb") and save
- check what's happening: on my computer,
the .aux and .pdf files are refreshed twice
a second! in other words, LaTeX Watch
continually updates even if I change nothing
(after the first change and save)
I guess this is a conflict with the pgf package.
But how? This is especially annoyng in
case of errors since the requst to show the log
is repeated every second or so...
Thanks,
Piero
I just need to vent on a quirk that keeps tripping me up.
I can bring focus to the drawer. I can navigate up and down with arrow keys.
I can even select all files with cmd-a,
yet, if I hit return on a highlighted file (intending to open it) it inserts
a new line in the focused tab.
?? is it me, or is that inconsistent ??
--
dc
-----
David Clark
Database Developer
Institute for Community Inclusion (http://www.communityinclusion.org/)
david.clark(a)umb.edu
(617) 287-4318
On 8/16/07, Tobias Jung <newsgr(a)tobiasjung.net> wrote:
> At 15:31 Uhr -0400 15.08.2007, Charilaos Skiadas wrote:
> > this Applescript was utilizing the dictionary that Transmit had
> > set. In other words, Transmit has told AppleScript that it
> > understands words like "upload", "current session" etc. I guess
> > YummyFTP doesn't understand some of these words.
>
> Thank you; now it's obvious to me why it doesn't work.
>
> Kind regards,
> Tobias
>
Im sure you can ask developer (as license owner) to add AppleScript
support you need. At least they can tell you is it planned or not. Or
point you to workaround of any kind...
Hi everybody,
I just noticed that if you “Show Information” on an element of a project,
there is this option “Save as absolute path”.
Apparently, when checked, I can move my .tmproj file to another location and
TextMate keeps track of the elements of the project.
This is great !! I was really frustrated that I had to “redefine” my TM
projects whenever I moved the .tmproj files somewhere else…
So, unless I miss a major drawback, I would like very much that this option
be checked by default…
TIA
--
View this message in context: http://www.nabble.com/-FeaReq--Absolute-paths-in-projects-tf4278617.html#a1…
Sent from the textmate users mailing list archive at Nabble.com.
Hi
Sorry! I posted in the wrong thread by accident.
Shame on me. I repost here:
Label completion does not work anymore for me.
I get an error
/tmp/temp_textmate.vTWc4N:4:in `require': no such file to load
-- /Library/Application Support/TextMate/Support/lib/LaTeXUtils.rb (LoadError)
from /tmp/temp_textmate.vTWc4N:4
There is an alias LaTeXutils.rb in the Application Support
in the /Library, and indeed it points nowhere (since when?)
But:
- if I replace the alias with a new one pointing at the true
LaTeXutils.rb inside the LaTeX Bundle, I get a new error
/tmp/temp_textmate.cwZcvm:6: uninitialized constant LaTeX (NameError)
- if I delete the alias altogether, I get the old error.
So clearly there is some trouble with directories,
but I did not change anything recently,
apart from updating religiously via svn.
Any help?
Piero
I did a google search for a git bundle for textmate a while back and
found several hits, one of which (I thought) was a git bundle that
was being worked on by Allan. I can no longer find any trace of this
anywhere.
Was Allan working on a git bundle? Is he still? Is anyone else?
I would switch to git in a heartbeat if textmate had support for it.
After some minutes I'm using LaTeX Watch (which BTW is
simply wonderful and makes writing in latex a
pleasure. Try it!) the Skim CPU cycles go up to 35% (also
when both TextMate and Skim are not active or in
the backgroutnd).
At the same time the process "ATSServer" goes above 20%.
Pretty puzzling since this should be the ATSUI - Apple
Type Service thing, how is this related with TeX?
Am I the only one experiencing this?
Thanks
Piero
Yummyftop is announcing a new release, will be this think working?
2007/8/16, Tobias Jung <newsgr(a)tobiasjung.net>:
> At 15:31 Uhr -0400 15.08.2007, Charilaos Skiadas wrote:
> > this Applescript was utilizing the dictionary that Transmit had
> > set. In other words, Transmit has told AppleScript that it
> > understands words like "upload", "current session" etc. I guess
> > YummyFTP doesn't understand some of these words.
>
> Thank you; now it's obvious to me why it doesn't work.
>
> Kind regards,
> Tobias
>
> ______________________________________________________________________
> 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
>
On Aug 16, 2007, at 7:24:45 AM, Tony Crockford <tonyc(a)boldfish.co.uk>
wrote:
> is there a good workflow tutorial for the solo developer using
> Mercurial with TextMate for managing website builds and changes?
>
> if I learn about it and write one, will anyone be interested in
> reading it, or are we mostly team developers?
I don't know of such a tutorial, Tony, but I would definitely be
interested in helping create one. I've been using mercurial with a
few of my sites for a few months now, and it's been working out
great. There are still a lot of features I don't use, but as a fellow
solo developer I'd be happy to share my workflow and the tips I've
discovered if you'd find that helpful.
I've installed the Mercurial extension in Trac, which puts a pretty
web-based GUI on each of my sites' repositories, and lets me compare
before and after changes side-by-side, and even keeps track of
project goals and even includes a project-based wiki.
I love TextMate, and pretty much live in it while I'm working, but I
use the command line to issue Mercurial commands. It's probably just
me, but I find that more flexible and easier to use than the
Mercurial Bundle. No a big deal, since I need to ssh to the web
server to issue the hg update command anyway.
Feel free to email me directly, so as to not clutter up this mailing
list.
Cheers,
- Dave
I (finally) added a commit button to the status page, but I don't have
much time to test it thoroughly. So instead of waiting a few years, I
commit it and wait for feedbacks. If there is any problem we'll fix
them or revert.
One noticeable change:
Status now acts on selected files instead of working copy.
--
FredB
Hi,
I've been using TM to develop flash apps for a few months now, and
whilst I like the integration with MTASC provided by Alé I have found
one serious problem with the way it preview the flash movies.
If you build a movie in MTASC and it pops up in the textmate preview
browser, you can interact with it, do whatever, it's all fine. When
you close the preview window it appears that the flash continues to
run after you've closed the window. Whatever renders the HTML (I
presume some part of the Safari core or WebKit) doesn't close itself
down properly when the window is closed.
This is a problem as one of the apps I am working in is fairly CPU
intensive, so after I've built with MTASC once and previewed it,
after I close the window everything is still running at 100% cpu as
the flash app is still churning away in the background.
Is there any way to cleanly remove the browser preview when the
window is closed? To totally destroy the environment it created
during that preview? Or at least is there some way to find and
terminate the flash player that is running in it?
Gaby
--
Junkets for bunterish lickspittles since 1998!
http://www.playr.co.uk/
Hello all,
I am new with TM (and quite new with Mac anyway) and I like it a lot!
I used WinEdt for LaTeX and Matlab. It has a very nice feature: If
you are typing an umlaut like ä, ü, é, etc. it writes in TeX-code
\"{a},\"{u},\'{e} etc. to the tex-file, while the umlaut is still
seen in the editor. The advantage of this is obvious: You don't have
to care about the encoding, you can share the file easily and the
spellcheck works still fine. This feature could be interesting for
html as well.
Moreover, since one like to see greek letters like "α" (UTF8: CE B1)
instead of \alpha an automatic replacement in the editor (while still
writing \alpha to the tex-file) would be very nice, too!
I didn't found any discussion about this topic in this forum. Is this
of interest for you? Is there a solution already? I would be very
pleased about this feature.
Best regards
Matthias
On Aug 14, 2007, at 08:00, textmate-request(a)lists.macromates.com wrote:
>
> From: Steve Lianoglou <lists(a)arachnedesign.net>
> Date: August 13, 2007 14:03:56 EDT
> To: TextMate users <textmate(a)lists.macromates.com>
> Subject: Re: [TxMt] Re: Python bundle syntax highlighting bug
> Reply-To: TextMate users <textmate(a)lists.macromates.com>
>
>
>>>> I think you are probably right. Does anyone else have an
>>>> opinion on this?
>>>
>>> I agree this doesn't seem right, and can produce some confusing
>>> results. On the other hand, it's very nice to have regex
>>> highlighting.
>>
>> I prefer to trade-off false-positives for the nicety of regex
>> highlighting.
>>
>>> Wouldn't it be possible to have the first string located within a
>>> re.XXXXX('') pattern be highlighted as regex? Am I wrong, or are
>>> those the only places where regex appear?
>>
>> s = r"...."
>> pattern = re.compile(s)
>>
>> is always, possible, if contrived. I think re.XXXXX is an
>> interesting suggestion though.
>
> I'm in the same boat with Jay.
>
> I think it's kind of nice to have special highlighting for regex's.
> I'd settle for it only being switched on when we have re.*
> (r"regex" ... ) if the "always a regex w/ r" " really isn't
> suitable for others.
>
> -steve
>
>
>
>
> From: "Alexander Ross" <alex.j.ross(a)gmail.com>
> Date: August 13, 2007 14:35:16 EDT
> To: "TextMate users" <textmate(a)lists.macromates.com>
> Subject: Re: [TxMt] Re: Python bundle syntax highlighting bug
> Reply-To: TextMate users <textmate(a)lists.macromates.com>
>
>
> I agree that it's very nice to have highlighted re's if possible.
>
> What if we did something like matching r"(?#) … " as a regular
> expression string? The would give us something explicit to match,
> but it would also mean you'd have to add it to any of your preexisting
> re's.
That sounds like a very good idea. It would be pretty easy to find
regexes and sub in a '(?#)' comment marker (I had to look up what
that one was!) so one would have regex syntax highlighting in
existing code, while keeping the 'raw strings are just raw strings'
folks happy. For those who complain that r'(?# might just be the
beginning of some particular, non-regex raw string, well.... too
bad! ;)
On a side note, it may be nice to keep a documented list of such
'extra' features (above and beyond the straight language definition)
in the Python bundle somewhere; for instance, the appearance of
folding markers when a triple quote is followed by text, followed by
a <return>, followed by another triple quote. This regex
highlighting feature would also qualify - otherwise, it would not be
known to a new Python + TextMate user unless they stumbled across it
by accident or investigated the grammar in detail...
>
>
>
>
>> I'm more and more convinced as time goes on that we should just
>> stop trying to interpret raw strings as regexps.
>>
>>
>
> I think you are probably right. Does anyone else have an opinion
> on this?
>
>
Well - as you pointed out previously, raw strings were introduced
into Python for the specific purpose of making writing regexps
easier. If we don't interpret raw strings as regexes, what will we
interpret as regexes in Python, then? Or will we just ditch regex
syntax highlighting from Python altogether?
Perhaps we need some sort of obvious marker on the same line to
indicate that a raw string should be interpreted as a regex. Regexes
in Python are pretty obvious when being used - a very common way is
to compile a regex via re.compile([raw string]), and the other common
way is to call other functions in the regex module, ala re.findall
(r'\bFig\b'), for instance.
So, perhaps raw strings should only be interpreted as regexes when
directly preceded by re.[function]( - while this would not get
everything we might want to be interpreted as a regex, it would
capture some of the most common use cases.
Nick
Hello,
I ripped off RakeMate to make MavenMate. Same kind of deal, allows
you to run maven2 tasks from within TextMate. Should it be put in the
Bundles repo?
http://ldaley.com/downloads/Maven.zip
- LD.
Ciao Folks,
at first I would like to offer my thanks for the great work on the new LaTeX
bundle. It's a big step forward especially in the area of displaying the log
after compilation. I really missed that compared to TeXShop.
Tonight, while playing around with the new "%!TEX root" directives to define a
master file, I noticed that Auto-Completion for \cite{} etc. using ALT+ESC only
works recursively if the master file is still specified using the
TM_LATEX_MASTER variable either in a project or global. the %!TEX directive does
work for compilation but not for completion as it seems.
Is this a correct observation or rather a bug on my side. I am not sure, if it
would even be possible to enable recursive search using only the directives. If
that is the case, I guess it would be best to mention that in section 2.3 of the
bundle help as advantage of the TM_LATEX_MASTER variable.
Just my two cents ;-)
Best Wishes
Bastian
Hello, I when trying to commit using the latest version of the CVS bundle
and the latest version of TextMate as of August 14, 2007 I am getting the
following errors:
/Library/Application
Support/TextMate/Bundles/CVS.tmbundle/Support/cvs_commit.rb:99: undefined
method `keys' for []:Array (NoMethodError) from /Library/Application
Support/TextMate/Bundles/CVS.tmbundle/Support/cvs_commit.rb:99:in `call'
from
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/Builder.rb:227:in
`_nested_structures' from
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/Builder.rb:149:in
`method_missing' from /Library/Application
Support/TextMate/Bundles/CVS.tmbundle/Support/cvs_commit.rb:99 from
/Library/Application
Support/TextMate/Bundles/CVS.tmbundle/Support/cvs_commit.rb:97:in `call'
from
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/Builder.rb:227:in
`_nested_structures' from
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/Builder.rb:149:in
`method_missing' from /Library/Application
Support/TextMate/Bundles/CVS.tmbundle/Support/cvs_commit.rb:97 from
/Library/Application
Support/TextMate/Bundles/CVS.tmbundle/Support/cvs_commit.rb:25:in `call'
from
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/Builder.rb:227:in
`_nested_structures' from
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/Builder.rb:149:in
`method_missing' from /Library/Application
Support/TextMate/Bundles/CVS.tmbundle/Support/cvs_commit.rb:25 from
/Library/Application
Support/TextMate/Bundles/CVS.tmbundle/Support/cvs_commit.rb:19:in `call'
from
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/Builder.rb:227:in
`_nested_structures' from
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/Builder.rb:149:in
`method_missing' from /Library/Application
Support/TextMate/Bundles/CVS.tmbundle/Support/cvs_commit.rb:19
File(s) not modified; nothing to commit.
If anyone has experienced something similar or have any information that can
help me start using CVS, please let me know.
Regards,
--Matic Code
Hi,
would it be possible to change the definition
{ name = 'meta.escape-character.latex';
match = '\\$';
into
{ name = 'meta.escape-character.latex';
match = '\\$|(?<=\\)\n';
The problem is that a backslash followed by a newline
is not recognized by the first definition.
Piero
Looks like svn revert is broken in the last build. If I try to revert
a file there's an error that says require fails in line 3 of
revert_file.rb, which is:
require ENV['TM_SUPPORT_PATH'] + "/lib/ui"
-- fxn
Hi, only since early this morning, whenever I call for Bibdesk-
Citekey-Completion using "F5" TM freezes, shows the ball and I'm left
waiting without anything happening.
And I'm pretty sure I didn't change anything since last night, when
everything just worked fine.
Bibdesk-Completion works in other apps like before.
Any ideas?
Flo
Hi,
I'm developing a bundle for Stata/Mata, and I want to define a
grammar such that Ctrl-Alt-B can select an entire function. I would
appreciate any pointers.
Here's an example function:
real matrix y_null(real scalar rho, real scalar T) {
real matrix y
real colvector e
real scalar t
y = J(T, 2, 0)
// use the inverse CDF method to draw from N(0, 1)
e = invnormal(uniform(T, 1))
y[1, 2] = (1 - rho^2) * invnormal(uniform(1, 1))[1, 1]
for (t = 1; t < T; t++) {
y[t, 1] = rho :* y[t, 2] + e[t]
y[(t+1), 2] = y[t, 1]
}
y[T, 1] = rho :* y[T, 2] + e[T]
return(y)
}
And here are the relevant excerpts from the grammar:
patterns = (
{ name = 'meta.function.mata';
begin = '(?x)
(?=
^\s*
((transmorphic|numeric|real|complex|string|
pointer)\s+)? # eltype
((matrix|vector|colvector|rowvector|scalar)\s+)? #
orgtype
(\w+)\(.*\)\s
+ # function name
\{$
)';
end = '(?<=^\}$)';
beginCaptures = { 5 = { name = 'entity.name.function.mata'; }; };
patterns = ( { include = '#base'; } );
},
{ include = '#base'; },
);
repository = {
base = {
patterns = (
...
{ name = 'storage.type.eltype.mata';
match = '\b(transmorphic|numeric|real|complex|string|pointer)\b';
},
...
);
Now, in most regards, this works fine. The name of the
function--"y_null"--shows up in the symbol list, and the contained
scopes are identified correctly. Also if I cycle through Ctrl-Alt-B
when the cursor is not on "real" or at the beginning of the line, the
whole function is selected. However, if I hit Ctrl-Alt-B either at
the beginning of the first line or within "real", it fails to
recognize the meta.function.mata scope. That is, on the first
keypress, TextMate recognizes the storage.type.eltype.mata scope and
selects "real", but on the second, it skips right to the source.mata
scope and selects the whole program instead of just the function.
Here are the results from Ctrl-Shift-P:
With cursor at the beginning of "real"/beginning of line --
source.mata, meta.function.mata, storage.type.eltype.mata
With cursor within "real" -- source.mata, meta.function.mata,
storage.type.eltype.mata
With cursor anywhere else in the function body -- source.mata,
meta.function.mata, other scopes from the base repository if relevant
With "real" selected (by Ctrl-Alt-B or manually) -- source.mata
Any ideas on how to workaround this? It's annoying, because if you
navigate to a function via the symbol list, it puts the cursor at the
beginning of the line by default.
Thanks!
Michael
One thing I use snippets for is as a simple, convenient memory aid; for
example, I currently have (most) of the Ruby standard exception types as
snippets with the tab trigger "exception". So I type in "exception",
tab, and get to choose which of the exceptions I really want to use.
However, defining and maintaining (in case changes are wanted) such a
large number of small snippets is sorta annoying when going through the
Bundle Editor. Is there a way to have multiple snippets in one file,
including the various settings such as tab trigger, keyboard shortcut, etc.?
Thanks,
Ken
Done searching and looking through the help, and some Googling, and I
still can't find any info on how to put snippets/commands/etc. into
menus. I know this can be done (the Ruby plugin, for one, does it), but
I just can't figure out how. Probably very obvious too, sigh...
Thanks,
Ken
Hi,
Mail has this thing where by when you are typing and you are not sure
of the spelling of the word (or even if such a word exists) you
can press <esc> before yo complete the word & it gives you a pull
down of various choices. Is this something that can be incorporated
in the text scope of textmate?
(note: i know of ctr-apple-D which can check for the word in
dictionary but that is not the functionality I need in this case -
ie, since that assumes you already know how to spell the word...)
Thanks
danstan
ps; interestingly the Mail functionality doesnt seem to work within
a sentence.
I hit some wild key combination and now my PHP bindings seem to be
gone. The bundle shortcuts work, but there's no syntax highlighting,
no code folding, nothing. I cannot figure out what I did. Any
thoughts?
--
Wells Oliver
wells.oliver(a)gmail.com
When I use a command that has this statement
require "#{ENV["TM_SUPPORT_PATH"]}/lib/dialog"
I get an error:
/tmp/temp_textmate.rl42pL:3:in `require': No such file to load --
/Users/barbara/Library/Application Support/TextMate/Support/lib/dialog
(LoadError)
from /tmp/temp_textmate.rl42pL:3
I'm not a programmer -- I just used the example from the TextMate book
for the dialog box, and it worked until this last update to Version
1.5.6 (1414)
How can I fix this, please?
TIA for any advice,
Barbara
Alex Ross wrote:
Anyway, the grammar thinks that you're LaTeX code is a regular
expression. My suggestion would be to remove the "r" from before
your doc-string. Is there a particular reason you are using them?
This code is from a co-developer who has been getting into automatic
conversion of docstrings to Latex files. I'm not sure if the "r" is a flag
for the package he's using or it's just superfluous, but will try removing
it. Thanks for the suggestion.
Anand
Hi all,
In the following, everything after the \in is highlighted grey as if it were
a comment.
Thanks for all the good work!
Anand Patil
def half_normal_like(x, tau):
r"""
half_normal_like(x, tau)
Half-normal log-likelihood, a normal distribution with mean 0 and
limited
to the domain :math:`x \in [0, \Infty)`.
.. math::
f(x \mid \tau) = \sqrt{\frac{2\tau}{\pi}}\exp \left\{ {\frac{-x^2
\tau}{2}}\right\}
:Parameters:
x : float
:math:`x \ge 0`
tau : float
:math:`\tau > 0`
"""
# try:
# constrain(tau, lower=0)
# constrain(x, lower=0, allow_equal=True)
# except ZeroProbability:
# return -Inf
return flib.hnormal(x, tau)
Right now both Thunderbird and MacSoup use their own readers/editors for
email messages and posts. Is there a way to change that default to use
TextMate instead?
Thanks.
- Dushan
Hi there,
I am looking for the definition of invalid.illegal.math.tex
of the LaTeX Bundle. Can't find it in the “LaTeX” language
grammar…
I got this when I write an equation which spans several
lines… Rather annoying…
TIA