I'm having trouble creating a custom snippet that, for me, would be really
useful.
I want to set up a snippet to create an unordered list nav from a plain text
list, e.g.
foo
bar
coo
tar
I'd like to highlight the whole list, hit a key combo, which would wrap each
list item in <li>, wrap the whole lot in <ul>, and even wrap the text within
each list item in <a href=""></a> for good measure.
Can anyone help?
Many thanks in advance.
Hello list,
First mail to the mailing list, just by textmate yersterday ;-)
Is it possible to jumb to the directly to a function in ruby mode ? (as
we can do in java/eclispe by pressing command key on the function name)
thanks
Arnaud
I've got many projects which have lots of files with same names, like
index.php in every directory or sets of files like class/foo,
template/foo, data/foo, etc.
This often leads to having many tabs with same name and makes switching
difficult.
Are there solutions to this problem? Other than ⌘T, which requires typing?
Ideally I'd like to have parent directory name on tab ("foo/index.php" or
apple-style "index.php--foo").
--
regards, porneL
I am trying to remove line breaks (is this the same as a hard
paragraph return?) from a selection. In bbedit, I go to edit >
remove line breaks. I can't find anything like this in Textmate—
could someone point out the obvious?
Thanks,
Steve
I'm using the Xcode bundle with a fairly complex project layout --
the bundle can not find my Xcode project. I would rather not set an
absolute path to it. This patch allows setting TM_XCODE_PROJECT to a
path relative to TM_PROJECT_DIRECTORY.
If TM_XCODE_PROJECT does not start with a "/" a relative path is used.
-- Daniel
The latest TextMate (1.5.1) broke TmCodeBrowser (empty display), and
a small change was required. Please update TmCodeBrowser from here:
http://www.cocoabits.com/TmCodeBrowser/
Gerd
Just want to aplogize to all for the multiple posts that went to the lists.
I vey rarely use the gmail web interface and I guess it really shows. ;-)
Sorry for the multiple posts.
-Ron
P.S. Web browsers are no substitute for a good mail application. ;-)
(For Brad, mostly),
I have a slight issue with posting the blog on WordPress. I'm using a
standard template, and I'm able to connect to the blog's XMLRPC
("Fetch Posts" works like a charm). However, when I try to post, I
get the following:
/usr/lib/ruby/1.8/xmlrpc/create.rb:195:in `conv2value': Wrong type
NilClass. Not allowed! (RuntimeError) from /usr/lib/ruby/1.8/xmlrpc/
create.rb:106:in `methodCall' from /usr/lib/ruby/1.8/xmlrpc/create.rb:
105:in `collect' from /usr/lib/ruby/1.8/xmlrpc/create.rb:105:in
`methodCall' from /usr/lib/ruby/1.8/xmlrpc/client.rb:408:in `call2'
from /usr/lib/ruby/1.8/xmlrpc/client.rb:399:in `call' from /Library/
Application Support/TextMate/Bundles/Blogging.tmbundle/Support/lib/
blogging.rb:363:in `post_or_update' from /tmp/temp_textmate.D5IM07:3
I'm at r3460. Any ideas?
Shiran
That did the trick. Thanks for a great and useful bundle.
Shiran
> OK-- found the issue and checked in a fix for it (revision 3461).
>
> Thanks,
> Brad
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
In my attempt to shoehorn together a Lang Grammar for Textpattern from
scratch ( "scopeName = source.txp" , and NOT "text.html.txp" ) I ran
into a couple of problems.
I also took a peek at how it's done in the MT Bundle, but I decided,
it's best to start from scratch.
Note.:I'm not a programmer, just a beginner of TM, usually as I
understood, this should then go into the developer mailing list, but
since I am not a developer, I decided then to post first here.
I'll summarize my observations and obstacles below:
1) grammar Scope consideration
Textpattern's syntax is very similar to Html, there is single tags (self
enclosing ) and container tags.
However, the total code blocks, used in forms and pages can get rather
complex, since in many cases you can have funny nested language
constructs that can not be matched with any of the present grammars
regex constructs.
EXAMPLE.: <li <txp:zem_nth step=1
of=2>class="odd</txp:zem_nth><txp:zem_nth step=1
> ><txp:if_article_list>activea</txp:if_article_list> </txp:zem_nth>
<txp:zem_nth step=1 of=2>"</txp:zem_nth>><txp:permlink><txp:title
/></txp:permlink></li>
(Note.:Note the second bracket after the zem_nth closing tag, the code
sample for Txp form above will parse a perfectly valid XHTML, once the
request is returned from the Server)
You can see the pref snippet that I used to test the above below.:
Sample.:
{ name = 'keyword.control.txp';
match =
'(["|\s]?<txp:.+\s/>["|\s]?|["|\s]*?<txp:.+>["|\s]*?|["|\s]?</txp:.+>["|\s]?)';
},
(works, but not with the complex constructs, like mentioned above.)
Problem.: Some of these instances make it difficult to construct the
regular expressions.
Possible Solution.: Could be excluded with negates whenever occurs
(That would be rather hackyish and not elegant)
2) Furthermore the reason, why I opted for a "source txp.scope" rather
then the other easier and integrable solution and attempt everything
from scratch, is that there is not a real hierarchy between html and txp
forms and pages, so I thought it would be more expandable and extensible
in that way.
Question: Is that so ?
Or am I terribly wrong ?
3)Question: Is the p.list format going to change to a xml format for the
Language grammars. ?
4) I made two variants of a preliminary bundle for the Grammar, would it
make sense to submit those to repository, once they reach an acceptable
stage ?
5) I'm a little perplexed with the Theme Editor, and in particular the
context of Theme names, Theme Scope names and the corresponding scope
selectors in the Language Grammar and prefs.
For Instance, for the above p.list value/pair keyword.control.txp, I did
not have a blank element of keyword control in the list.
I thought at first, that (after reading the manual ) I should have a
blank keyword control element (in the Fonts and colors pane ) and then ,
for my above purpose, I create a keyword.control.txp scope selector,
that I style for the above purpose, but that doesn't appear to seem so.
Is it correct to suspect that the element names themselves are
irrelevant for the inner functioning of the language grammar ?
I hope that this was not too long and thank you in advance for reading
this and possibly have an answer to my questions.
So for I am pretty much amazed with the editor.
regards, marios
- --
marios at CSSDelyrium
requests
http://www.consking.com/contact
________________ __ _
/ ___/ __/ __/ _ \___ / /_ ______(_)_ ____ _
/ /___\ \_\ \/ // / -_) / // / __/ / // / ' \
\___/___/___/____/\__/_/\_, /_/ /_/\_,_/_/_/_/
/___/
-----BEGIN PGP SIGNATURE-----
Comment: This might change in the future
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEb5b18tSzPOYuZvQRAiZQAKCwWFXNOAKxOT5tWGfLlbYaIQV/WgCffa8u
esaTuzI4S4IbS7pS1oP/d/c=
=Yz4x
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
For a new language Grammar I have set up a couple of test bundles that
try different variations of a grammar style, so I stumbled over some
'cases' where an actual name rule at the pattern root level of the
syntax would not be recognized at all.
EXAMPLE.:
{ name = 'entity.tag.plugin.single.textpattern';
match =
'<txp:[a-z]{3}(_([a-z0-9]{1,15}))(_([a-z0-9]{1,15}))?\s{,4}(\w{1,45}="\w{,15}"\s{,8}){,7}/>';
},
Basically I want to use the above rule to isolate any single self
enclosing language plugin tags tags from regular txp language tags and
give it a scope.
It doesn't work, I tested the above reg ex with find/replace and it does
what I want, but it doesn't work inside the Language grammar.
For the rest of the tags, I use the usual word boundaries rules with a
piped group of tag names, as in html.
So I suspected, that something like that is not allowed maybe.(Onigoruma ?)
NOTE.: I didn't use any back references there,just to simplify the case
What am I doing wrong?I'm using cutting edge with all bundles installed.
Are there any limitations, about regexes in a Language syntax at all,
that I don't know about ?
regards, marios
-----BEGIN PGP SIGNATURE-----
Comment: This might change in the future
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEecTQ8tSzPOYuZvQRAvFfAKC0GqIf+7jSwwA/QSxJ4s855PFe2QCeLyXQ
ZFDWslm9wtXRuIKriJZZa/E=
=VGAC
-----END PGP SIGNATURE-----
I have enabled the Smarty bundle, but have an issue.
I use <% for open, and %> for close. Im not sure exactly all the
places I need to change this in the smarty bundle, or what the proper
format would be. I tried playing around in the bundle, but no matter
what I did I couldn't seem to get it correct.
If anyone could provide some guidance, that would be very helpful :)
Eric Coleman
Hi everybody,
do not get me wrong about this post, but I was wondering if someone
could
help me writing this TMscript. Or maybe it is honest to say write
this script.
The idea is the following:
- I have a big LaTeX project, so I divided the report in several
documents.
- Let's say:
- master.tex
- part1.tex
- part2.tex
- Basically master.tex includes all following documents, so in case I
would typeset
the master.tex file I would get the whole document.
- There is a TM-function which allows me to set the master file in my
project, so that
typesetting any file (for example part1.tex) actually typesets the
master.tex file.
- But this takes time so it would be nicer to typeset just the file I
am working on right now.
- My Idea is:
1) change the first line of part1.tex (and or part2.tex) to %%
TM_LATEX_COMMAND%% Head include %%
2) add a line in the master.tex somewhere after \begin{document} : %%
TM_LATEX_COMMAND%% Head %%
3) when typesetting the script looks for the line (see (2)).
4a) if there is no "%%TM_LATEX_COMMAND%%Head%%" it will go on like
it does right now
4b) if there is the line "%%TM_LATEX_COMMAND%%Head%%" then I takes
the lines before
" %%TM_LATEX_COMMAND%% Head %% " and puts them on top of the
typsetted file. It also
adds an \end{document} and then typesets all.
- what I do not know is how pdfsync works then, but since I do not
know how to write this little
script I could not try out.
It would be great if someone could help me or send the website where
this is already posted.
However, I would also appreciate some helpful comments on how to
write the script by myself.
Tanks
Christoph
~~~~~
Christoph Biela
cbiela(a)gmail.com
TeXShop has a neat solution for this: it lets you set a master
document manually (which is no big deal for larger projects). This
way, if you hit LaTeX in any of the documents, the master documents
gets LaTeXed. This should be a piece of cake to add to TextMate …
although I still use TeXShop to compile and check my LaTeX documents.
Max
> On 27/5/2006, at 16:03, Aristide Grange wrote:
>
> > Thank you for having explained me how to solve this stupid-but-big
> > problem with search/replace in TextMate! [...]
>
> Just FYI the problem comes not from stupid code but from data
> structure trade-offs.
Thank you for your very interesting explanations about the data
structure you use. My intervention on the topic was initially
motivated by the fact that Chris mentioned the same (stupid) problem
on a 3.7MB XML file:
> The big mistake was to try and do a Find/Replace of all ">" with ">
> \n".
> Whoah. It's been using all the CPU and beachballing for over 30
> minutes now,
> with no obvious way to interrupt it...
From my point of view, the problem of Chris was including two
independant matters: 1. slow global replacement; 2. global reparsing.
I was surprised that your reply to him (well, the kind one) focused
almost only on parser considerations. It was not perfectly clear for
me that your promise of future improvements on "half a dozen other
things which do affect the performance" included the one I care
about. So, I thought it was necessary to insulate the first problem,
with which I have to deal on a daily basis: global replacement on
plain text. Obviously, I knew it had "nothing to do with the language
parser": it was precisely my point...
Then, Paul came with a great solution to this very problem: filter
the document through a magic perl command. Since them, I am happy,
and I guess TextWrangler will not encuber my dock for a long time now.
But his reply makes a second (probably stupid too) question to pop
into my mind: since there is such a performance issue with the
builtin global replacement of TextMate, why not just delegate the
work to perl, directly from the shiny and so convenient Find window?
And if, for some reason, it is not always possible, why not offer
this as an option through some cute check box?
Concerning the "marketing" considerations of Daniel, I second that.
My own experience, as an old BB et al. registered user, is the
following: in the past, I have given TextMate at least three (too)
short tries. Each time, I thought: "it is not for me, because 1.
there is no incremental search; 2. global replacement is too slow".
The drawback with TextMate is that its real superiority and its
amazing features are not very prominent. This "tact" has several very
important advantages too, e.g., the interface is not bloated and the
learning curve is so smooth. But I have had to force me to try
TextMate during one plain week *before* I finally fall in love with
it. BTW, I don't remember if I registered before or after I
accidentally discovered it does offer incremental search (the manual
is rather allusive on this point). So I think it would be a killer
marketing idea to help the switchers to figure out how they can use
TextMate as efficiently as their favourite text editor. Apple has
made something like that for the Windows users (and we all know that
Apple never makes any marketing error ;-). Perharps some dedicated
annex in the documentation?
Cheers,
A.
Originally when I installed Textmate it offered to put in the link for the
"mate" command which I chose to do. The mate command worked from terminal
until the next day when I fired up my computer and suddenly it stopped
working. So I went into the "Help" menu, "Terminal "Usage" option and
clicked the "Create Link" button for /opt/local/bin, it gives me an error
"Couldn't create link: /opt/local/bin/mate filed ... bad address". If it
use any of the other paths I get an error the the operation is not
permitted.
Not sure what to do. Isn't mate just a symbolic link to the actual
textmate.app in applications?
Thanks for nay help on this.
> Actually, I didn't do it correct there either :)
>
> osascript &>/dev/null \
> -e 'tell app "Backdrop" to activate' \
> -e 'tell app "MenuShade" to activate' \
> -e 'tell app "TextMate" to activate' &
Fantastic, works great.
> Sorry, should have been:
>
> osascript 2>/dev/null \
> -e 'tell app "Backdrop" to activate' \
> -e 'tell app "MenuShade" to activate' \
> -e 'tell app "TextMate" to activate' &
Wow, that is totally bizarre.
The only way this DOESN'T hang TextMate is if I set the Output to
"Show as HTML". Ideally, I'd discard it, but that hangs the app.
Bizarre.
I tried the following command:
osascript -e 'tell app "Backdrop" to activate'
osascript -e 'tell app "MenuShade" to activate'
osascript -e 'tell app "TextMate" to activate'
which causes TextMate to hang because (as Allan told me)...
> because you send an event to TM, but TM won't respond as
> it is busy executing the command, so the command will stall
> (waiting for TM, which waits for the command.)
He suggested:
> osascript 2>/dev/null & \
> -e 'tell app "Backdrop" to activate' \
> -e 'tell app "MenuShade" to activate' \
> -e 'tell app "TextMate" to activate'
Which returns the following error:
> /bin/bash: line 2: -e: command not found
So I ask you who know more than I, what is the key to unlocking this one?
Thanks in advance.
> Text => Filter through command...
> perl -pe 's#~\n#\n#'
Dear Paul,
Thank you for having explained me how to solve this stupid-but-big
problem with search/replace in TextMate! The workaround you suggest
works fine and faster than TextWrangler. And, believe it or not, I
would not have found it alone: my command-line skills are beyond
mediocrity. However, I suspected I missed something...
:-)
I hope your kind answer will help some other newbies too.
Thanks again!
A.
This may have gotten lost in the last thread, but with the new
~/Library/Application Support/TextMate/Pristine Copy/Bundles folder,
where is the best place to check out the bundles/themes/plugins from
http://macromates.com/svn/Bundles/trunk ?
The directions say to check them out to /Library/Application
Support/Textmate, but the release notes (and Allan's previous email),
said the place for new bundles is the "Pristine Copy" folder. Is that
folder just for bundles? What about the rest of the items that are
currently in /Library/Application Support.... ?
(now I do:
cd /Library/Application Support/Textmate
svn up
to update. Should I move that TextMate folder into.. um... ?? and svn up there?)
Thanks!
John
I'm checking out Textmate as a screenwriting application, using the
screenwriting bundle. It looks great, and fast, and cheap. But I have a
couple of questions. Apologies if they're old chestnuts and please point
me to archive posts, wiki or whatever if that's where the answer lies.
1. I'm using a 12 inch iBook and the mandatory font for screenwriting
(believe me it is mandatory, and using a different one isn't a
possibility) is Courier 12pt. However it's uncomfortably small on my
screen. Is there anyway of zooming it up a bit, or do I have to just use
a larger font size for editing then whack it down again when I print?
Not a disaster if that's the only answer, but I'd like to know if
there's a way round it.
2. I've imported a Final Draft script from a text file, and the
'dialogue' paragraphs need new formatting applying. From a brief fiddle
around, it looks like every paragraph needs changing to the 'style' (not
quite sure if this is the right terminology, but I hope you know what I
mean), then reformatting - ie ctrl-4 then ctrl-q in the screenplay
bundle. I'd *really* like not to have to do this manually. Is there a
search-and-replace stylee way of automating it.
All help and suggestions welcomed.
Matt Hurst