Hi all (Brad especially, I guess) -
Now that Textpattern has new xml-rpc support (http://textpattern.com/
download-rpc), I thought I'd give it a try with the blogging bundle.
When I specify my XMLRPC URL (mydomain.com/rpc/) and run the "fetch
post" command, I get the following error after entering my password:
/usr/lib/ruby/1.8/xmlrpc/client.rb:543:in `do_rpc': Wrong
content-type (RuntimeError)
from /usr/lib/ruby/1.8/xmlrpc/client.rb:409:in `call2'
from /usr/lib/ruby/1.8/xmlrpc/client.rb:399:in `call'
from /Library/Application Support/TextMate/Bundles/Blogging.tmbundle/
Support/lib/metaweblog.rb:28:in `getRecentPosts'
from /Library/Application Support/TextMate/Bundles/Blogging.tmbundle/
Support/lib/blogging.rb:498:in `fetch'
from /tmp/temp_textmate.7ihCLB:3
Any ideas? Have I perhaps failed to configure something properly? It
(the xmlrpc support) does seem to work with MarsEdit.
-Alan
Anybody yet to make a Diff bundle command that compares the top two
windows? It's a drag to make a new project and drop two files in,
especially since often my windows are unsaved documents.
I tried but failed ... my AppleScript know-how dunno how. I couldn't
figure out how to get the contents of the top two windows. Can anybody
do that?
Tnx, Q
the new begin and end patterns allow me to highlight the background
(I do it in my Blackboard color theme)
the new patterns are... well, you know what they do. the link pattern
is pretty raw, feel free to improve it.
merge and commit, I'm away from my main puter so here I've got a
silly read-only working copy.
{ name = 'comment.documentation.java';
begin = '(^\s*)?/\*\*';
end = '\*/(\s*\n)?';
patterns = (
{ match = '\*\s*(@(param|throws))\s*([a-z]\w+)\s*';
captures =
{ 1 = { name =
'keyword.other.documentation.params.java'; };
3 = { name =
'keyword.other.documentation.value.java'; };
};
},
{ name = 'keyword.other.documentation.link.java';
match = '{@link\s+\S*\s+(\S*)}';
},
{ match = '\*\s*(@[a-zA-Z0-9_-]+)\s*';
captures = { 1 = { name = 'keyword.embedded-
docs.params.java'; }; };
},
);
},
Currently, you can successfully use TextMate to build an Xcode target
into a user defined build directory (via user.pbxuser), but you cannot
run the resulting executable.
I'd like to propose the following change to the Xcode bundle: if a
SYMROOT is defined in userBuildSettings use that as the directory
instead.
Thanks,
Kimon
PS I know not Ruby, please modify as needed
Hey all, I just noticed an omission in the Ruby grammar. I checked the
Ruby grammar's comments to see if there was any mention of this, but I
didn't see anything; perhaps I just missed it. In any case:
def show#{suffix}
@#{singular_name} = #{class_name}.find(params[:id])
render#{suffix}_scaffold
end
(This example is from the Rails source, in action_controller's
scaffolding support.)
All of those #'s become comments; not one of them actually is.
I'm bringing this up partly for posterity (I'm anal-retentive and
would deeply love the Ruby grammar to be perfect (: ) but mostly
because I'd like to use this syntax mechanism without TextMate making
it look like it's not actually code... (:
I'm gonna take a look at it, but if anybody else has a quick fix
before I commit anything, they're welcome to it.
Rob
I was frequently selecting a word and finding it in the project so I
thought I would automate the 3 command sequence (control w, command e
and command shift f, return) by using a macro. Unfortunately the
find in project part is not recorded within the start/stop macro. I
guess this is because it brings up a dialogue box? Any way around
this or maybe I have overlooked some built in command that does this?
Dave.
I have an Xcode project with a non-default [SYMROOT][1]. The run
command seems to disregard this and expects the project to be laid
out like:
foo/
Project.xcodeproj
build/ # <-- SYMROOT
which it should not do. Can someone fix this?
[1]: http://developer.apple.com/releasenotes/DeveloperTools/Xcode/
XcodeBuildSettings.html
-- Daniel
"style" snippet unneccessarily adds CDATA block.
CDATA is only needed for content that uses "<" and "&" very often, but
these characters aren't used in CSS syntax at all. They might occur
sometimes in URLs and string constants, but parametrized images and
generated content are used rarely enough that CDATA can be dropped from
snippet.
--
regards, porneL
I notice that for certain commands the 'Documentation for word /
Selection (man)' is unable to find the man page for some commands
while typing 'man foo' seems to work.
For example 'asr' returns the man page formatted quite nicely in the
html window.
However on my system (MacBook Pro, running 10.4.6 w/dev tools, and
cutting edge TextMate) the documentation for hdiutil and rsync
couldn't be found.
Do I need to modify my shell configuration? or the command in someway?
My apologies if this has been discussed before, briefly searching the
list didn't seem to turn anything up.
Thanks
Peter
Hi everyone,
I have two questions on coloring the text in textmate.
# How do I turn off the background coloring when I turned it on once?
Of course I could use the same color as the main background color.
But than
I need to change them all again.
# I would like to color the scopes "entity.name" and
"entity.name.section"
but somehow that does not work. Textmate only applies the rule for
"entity.name"
Thanks in advance
Christoph
~~~~~
Christoph Biela
cbiela(a)gmail.com
… when you can see "svn up /Library/Application\ Support/TextMate" in
your terminal window, much more often than you call your girlfriend
… when you select text, hit " and start screaming because the stupid
application is not as smart as textmate
… when you are desperately trying to find alternatives to
applications because "Edit in textmate" doesn't work with your old
Hi. I've just started playing with Objective C and (obviously!) want
to use TextMate to edit my code. I saw the rather cool demo in Allan's
2nd Obj-C screencast [1] of how to reformat a method signature, but it
didn't work for me.
I tried it with the following example:
+ (id)dateWithString:(NSString *)description calendarFormat:(NSString *)format
locale:(NSDictionary *)locale
{
}
and found that the results came out like this (having removed everything
in the file prior to the method definition):
+ (id)dateWithString:(NSString *)description
calendarFormat:(NSString *)format
locale:(NSDictionary *)locale
Do I need a specific version of the TextMate, the Objective-C bundle, or
some other supporting files to make this work?
I'm running build 948 of TM, and have just upped by Objective-C bundle
this evening (the one shipped with 948 didn't define the format method
signature command).
Cheers,
Graham
[1] http://macromates.com/screencast/objective_c_part_2.mov
Hi everyone!
Maybe you noticed my Bundle already, but for those who haven't.
The GetBundles Bundle is the easierst way to get and update Bundles
from the Macromates SVN Repository.
press CTRL + CMD + I a dialog apears and you can choose the Bundle
you want to install.
To update every Bundle just press CTRL + CMD + U
Download the Bundle and extract it to ~/Library/Application Support/
Textmate/Bundles.
You don't need to install Subversion, the executable is included in
the bundle.*
http://sg.validcode.at/files/GetBundle.tmbundle.zip
*This maybe causes issues on Intel Macs so please report.
Thanks!
Basti
Hello:)
Sorry for my bad english
After \catcode`\{=1 nothing any more is recognized; syntax coloring
is lost
and with (l'article) or {l'article} syntax highlighting is lost; the
first symbol ( or { is not found any more
Thanks for your great soft
Alain Matthes
Hi Sylvain, Eric,
Thanks for your replies. The ._ files are the resource fork, as you
pointed out, which is why "find" and other commands can't see them.
The 10.4 "tar" command includes them automatically, and doesn't seem
to provide a way to turn them off. :-( Fortunately, "rsync" does, so
I solved my particular problem by doing an "rsync" of the project to
/tmp and then tarred it up there.
Thanks again for the pointers.
Regards,
Chris.
Hi all,
When I "tar" up a TextMate project directory, I get a ._<filename>
file for each file I've opened in TextMate. I've had a look at one of
these files on another system, and it appears to contain TextMate's
last caret position information for the related file. The problem is
that I can't seem to exclude these files from the tarchive using the
--exclude or --exclude-from parameters to "tar". Further, if I try to
use "find" to generate a list of the ._ files, the ._ files are never
in the list. Similarly, they don't show up in the output of "ls", and
can't be deleted with "rm".
Has anyone been able to successfully exclude these files from "tar"?
Is there any way to delete them?
Thanks,
Chris.
Hi there,
I'm trying to create a drag command on the HTML bundle to have
TextMate insert a <script src="..." /> snippet whenever I drag a .js
file on a HTML file.
I've duplicated the "Insert CSS" snippet but whenever I try to change
the File Types to 'js' the text field clears itself...
Any ideas what may be happening? Is the drag command stuff borked? It
seems to fail only with .js files (I have a drag command I created
some time ago for .as files and it works perfect...)
I'm using TextMate 1.5.1 1031 on 10.4.6 PPC
Thanks in advance...
a!e
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Just a quick question if there is an estimate on when templates will
be available again in the bundles editor. I just lost one of mine
(made a slight modification and now it is no longer available --
though it still is in the bundle) and would like to make a few
additional templates.
Thanks
Robert
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
iD8DBQFEfdUL0ZwlS5OIzRcRAm0EAKCAGG2fbIrI1aF6mfnm9BkvE+GY5wCguClL
SzCLAQ6cxy67MQFsro+gafE=
=I4WN
-----END PGP SIGNATURE-----
Is it possible to get the folder contents of the drawer? What I'm
wanting to do is be able to search for a definition in a file
contained in one of the folders in one of the groups in the drawer.
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
On 27/5/2006, at 4:17, Allan Odgaard wrote:
> But when speaking of the parser and other text editors (that you
> bring up): the performance difference is a) psychological because
> TextMate does not redraw the first page of the document before the
> entire document has been parsed b) because TextMate does something
> very different compared to the editors you mention and c) it
> generally has more complex grammars (try put PHP in an HTML here
> doc in a ruby script embedded in Erb tags in an HTML file -- unlike
> other text editors, TextMate handles this gracefully.)
>
Data: a 2.5 MB text file (plain text / no coloration / 225800 lines,
none exceeding 30 characters) structured as follows:
> ABACA~
> ABACULE~
> ABAISSABLE~
> ABAISSAIENT~
Problem: Replace all the 225800 occurrences of "~\n" by "\n" (iMac G4
800 Mhz, 1GB ram, 10.4.6):
TextWrangler: 30 s (gracefully interruptible)
TextMate: who knows? (forced to quit after 15 mn)
Looks like there is some psychological issue here, indeed.
;-)
I do love TextMate. But for such search/replacements, I couldn't live
without TextWrangler.
Cheers,
A.
It's not that I have to choose it manually the first time which
bothers me, but that TextMate FORGETS the settings sometimes. So
files that have been already saved in the correct encoding are
misinterpreted by TextMate to use UTF8.
Also, the other part of the problem seems to be that TextMate assumes
that UTF8 is used when it's not sure which encoding the file uses
instead of respecting the settings in the prefs.
Max
PS This is just a minor, but annoying bug of mine, I'm a big fan of
TextMate :-)
>> Problem: Replace all the 225800 occurrences of "~\n" by "\n" (iMac
>> G4 800 Mhz, 1GB ram, 10.4.6):
>> TextWrangler: 30 s (gracefully interruptible)
>> TextMate: who knows? (forced to quit after 15 mn)
>
> What happens if you replace '~$' with '~' instead?
Good idea! I thought using regexp would be slower somehow, but:
Problem: Regexp-replace all the 225800 occurrences of "~$" by ""
TextWrangler: no difference
TextMate: 4 mn
It seems that the search engine of TextMate performs far better on
single lines...
Thanks!
A.
Hi,
I've been playing with TM 1.5.1 (948) and wanted to see how it handled XML
files on my 1.67GHz Powerbook.
The file I needed to mess with was a 3.7MB FO file with some long lines
(over 10000 characters and some over 100000.) The formatted objects were
generated by an XSL processor which didn't care about long lines ;-)
Because it had a .fo extension it was opened as Plain Text.
Scrolling around would cause a beachball on some of those really long lines.
(Soft wrapping was on.)
I used the popup to switch to XML. This caused a beachball for about 2
minutes, and subsequent attempts to scroll often beachballed too. Soft
wrapping seems to have got turned off by this switch, which is consistent
with the line numbers in the margin.
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...
It is a bit distasteful to bring up other products ;-) but TextWrangler did
that Find/Replace in about 2 seconds. Going to XML mode in TextWrangler was
instantaneous.
Are these known problems? I googled for a bit but couldn't find anyone
reporting similar things.
Is there any chance these might get addressed in the 1.5.x codebase? I want
to love TM but currently cannot :-(
Cheers,
Chris
I have posted here before on the topic of encoding issues.
I still have problems with TextMate loading files as UTF8, although I
have set latin1 as standard encoding in the prefs (I have disabled
`use for existing files' though). This is particularly annoying since
I have to manually save every file again just to check whether
TextMate uses the correct encoding.
Thus I would propose to introduce a feature which sets the encoding
globally for one project if the user wishes to. Just add a checkbox
(one encoding for this project) and the same two options you have in
the file save dialog box (encoding and linefeed). If a user still
wants to create a file with a different encoding, he can still choose
to do so in the file save dialog.
This feature would really help speed up my work since I *have to* use
latin1 as standard encoding for LaTeX documents (it's what my co-
workers use) and UTF8 for the webpages I create.
Thanks.
Max
I experience a somewhat strange behavior with footnotes using
MultiMarkdown -- in fact, footnotes stopped working all of a sudden.
Thus,
Text[^fn]
[^fn]: Footnote text
evokes the error message "Use of uninitialized value in substitution
iterator at /Users/sbr/Library/Application Support/TextMate/Bundles/
Markdown.tmbundle/Support/bin/MultiMarkdown.pl line 1582, <> line 1."
MultiMarkdown at line 1582 is handling footnotes, but I cannot figure
out what's wrong. As said, this worked before... And yes, I reverted
to the version in the svn repository to ensure MultiMarkdown is not
contaminated.
Did anyone else experience this before? Any help is greatly appreciated!
Thanks and regards
- Stefan
One of the things that still puzzles me about how people use TextMate
is how they navigate the source code.
I can navigate quite fast on both Emacs and Vim using etags (or
ctags). You just basically put the cursor over a function call, and
press M-. (or Ctrl-]) and that takes you to the definition of the
function. To go back to where you were, you just press M-* (or Ctrl-
g) and you're back.
I know about the Ctrl-] command in textmate that brings up an HTML
list of things to click at, but that is really slow. Besides, I don't
know how to go back to were I was. I also know about 'Find in
Project' but that is _extremely_ slow (although it seems that if you
do a Project Folder it's faster?). At any rate, it still doesn't
solve the navigation issue.
What I've found is that whenever I'm writing new code, and I know
what I'm writing, I can use TextMate and I'm faster on it (due to
snippets, context-sensitive commands, etc, etc). But when I'm
_reading_ code and trying to understand functions, I'm much, much
faster in Emacs or Vim.
Maybe I don't know about some better way of finding stuff?
How are people in the list navigating codebases?
Thanks,
-Oscar
--
pgp fingerprint: BC64 2E7A CAEF 39E1 9544 80CA F7D5 784D FB46 16C1
I do a lot of programming in the IDL (Interactive Data Language). It
is an interpreted language that is very good for scientific
programming and data visualization. I've been using Emacs and the
idlwave mode for editing. I'm trying TextMate to avoid the overhead
that comes with emacs.
At this point I've developed a language grammar that works for
styling the text. I'm having trouble, however, with indentation
rules. A typical IDL construct looks like
if a gt b then begin
y = sin(z)
endif else begin
y = sin(x)
endelse
or, alternatively,
if a gt b then y = sin(z) else y = sin(x)
The keyword begin starts an indented block, the keyword end... ends a
block.
I've tried
/* preferences */
{ decreaseIndentPattern = '\bend(if|else|for|while|case|repeat)?/b';
increaseIndentPattern = '\b(begin|case|function|pro)\b';
}
Which results in indenting:
if a gt b then begin
y = sin(z)
endif else begin
y = sin(x)
endelse
You can probably tell I'm a regular expression neophyte, so any help
would be greatly appreciated.
Thanks
-----------------------------------------------------------
David A. Gell, Ph.D. David.A.Gell(a)umich.edu
University of Michigan
Space Physics Research Lab
2129B Space Research Building phone: 734.763.6221
2455 Hayward Street fax: 734.615.9723
Ann Arbor, MI 48109-2143 mobile: 734.657.6824
Hi,
This is more a regexp question rather than TextMate so it is a bit OT,
but I'll try anyway since I know that there are som clever regexp heads
on this list...
I'm trying to figure out a way to parse a string with an expression, so
that I can filter out subexpressions to build up a structure of
expression objects.
An example expression:
((print == MIB) >> (color == Black));
Our expression structure is built up so that everything is an
expression with a recursive structure (Expression = expression operator
expression):
((print == MIB) >> (color == Black));
(print == MIB)
(color == Black)
print
MIB
color
Black
Additionally, from this list, each variable is also an expression
(print, MIB, ...)
I guess that some regexp magic would be some great tool here, but I
can't seem to figure out the correct approach, and thus need some
starter help.
Any idea of how to approach this? Programming language shouldn't
matter, since it anyway would be some recursive structure to dig down
the structure, but for reference I can say that I'm using C#.
Hi all,
I would like my CV available in both HTML and PDF formats. I have a
Latex version, but am willing to rewrite it in something like
Markdown. In fact, I tried this, but it seems that the MultiMarkdown
Bundle's convert to PDF does not produce the correct output (i.e.
**word** should be strong, and not italic). I would like to know
what other people are doing to deal with this multi-format issue, and
how you're using Textmate to do it.
Thanks for your time,
Jeff.
That did the trick, thanks Brad!
On May 26, 2006, at 11:17 AM, Brad Choate wrote:
> When you specify *.tmbundle, svn only updates the existing
> bundles. Just do "svn up" and it will update everything in the
> Bundles directory, including new ones.
I want to try out the GTD Bundle but when I run the bundle's "Help"
command I get the following error:
/bin/bash: line 39: SmartyPants.pl: command not found
Any chance someone can help me decipher this?
Peace
Mike Gregoire
This morning the TextMate RSS feed announced a new GTD bundle, and I
did the usual bundle update:
cd /Library/Application\ Support/TextMate/Bundles
svn up *.tmbundle
The GTD bundle never got installed, however. I checked /Library/
Application Support/TextMate/Bundles/ and Bundles (disabled) but
it's not there.
Even ran "svn up..." again but still no go.
Do I need to do something special to get GTD?
TIA,
- Dave Winzler
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
With such a great markdown/multimarkdown bundle combination, and now
with CSS Preview, I am doing more and more writing/publishing with
prince from Textmate. However, I have to use a shell command to run
prince. I have tried to hack the screenplay bundles command without
much success. What I am trying to write is:
1. convert a multimarkdown (need multi's footnotes) file with
declared css file to html (or xml)
2. tell prince to run the file with the css file "prince -s /
file/css /tmp/$DST.HTML /tmp/" getting the css file name from the
header in the html file so I don't have to tell prince where it is.
3. open the generated /tmp/$DST.PDF il in preview.
I can get prince to run, but not glob the css file name. My end
product is a PDF of the html source file. Cutie, but not what I want.
Thanks in advance for any help, or if others would like to make this.
Robert
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
iD8DBQFEZNn30ZwlS5OIzRcRAus2AJwP6+gcwhFwT4FDWUljZdGBHB4izACeMj1z
TETVHHDSqVtg9/BRaAxwUqE=
=8gsc
-----END PGP SIGNATURE-----
Hi all - new to the list, loving TextMate so far.
Quick question that I cannot seem to find the answer to. After having
customized all my snippets and such, what is the recommended backup
procedure, so that I don't someday lose all my customizations?
Will backing up the TextMate app suffice? Will I need to write a script
to exit the application before backup or is it possible to backup the
bundles and all in-place with the app running? [normally I do not backup
applications - just necessary prefs and such]
Just thought I'd ask.
--
Chris Chapman
DataSetGo
I'm just starting to use TM and coming from skEdit where I could set
the preview to which ever browser I wanted. Is there a way to do that
in TextMate?
Josh
From the release notes:
"If you wish to set the default bundle yourself, the defaults key is
OakDefaultBundleForNewBundleItems."
Could you please give an example how to do this exactly?
Thanks. Oliver
I had Support/bin/CommitWindow.app all along, but I had some
extraneous files that got into Support/bin/CommitWindow.app/Contents/
MacOS/
CommitWindow.2.r3349
CommitWindow.r3349
CommitWindow.r3363
CommitWindow
CommitWindow.r3342
CommitWindow.r3350
CommitWindow.r3373
I'm not sure how they got there. But I wiped out the Support
directory and checked it out of SVN anew. And the problem went away.
Thanks,
Shiran
> On May 24, 2006, at 6:47 PM, Mikael Hultgren wrote:
>
>>
>> On 24 maj 2006, at 17.16, Chris Thomas wrote:
>>
>>>> <pastedGraphic.png>
>>>> If I go ahead and press 'Commit', it fails with the message:
>>>>
>>>> Subcommand 'commit' doesn't accept option '--diff-cmd arg'
>>>
>>> Somehow, on your system, the command line argument "--diff-cmd"
>>> to the CommitWindow is being interpreted as a filename. I'm
>>> baffled as to how this could happen.
>>>
>>> A workaround would be to uncheck the --diff-cmd and 'svn' items
>>> in the list. Anyone else see this problem?
>>>
>>
>> Yeah, i had the same problem. It resolved itself when i checked
>> out the new version of the CommitWindow.app.
>
> *forehead smack*
>
> Yes, you need to check out not just the bundle, but also the latest
> CommitWindow.app from the Support directory. Sorry I didn't make
> this clear in the checkin comments.
>
> Chris
Does anyone know how to take a list that looks like this. . .
# Staff Development
Purpose: Create a productive working environment.
* @schedule staff meeting
* @read
# Develop new class
* @email Frank re: class
* @call Mary re: syllabus
# Fix Car
* @call Jim 421-8532
* @computer google rental cars
. . . and create a new file that looks like:
# Develop new class
# Fix Car
# Staff Development
. . . and another file that looks like:
* @call Jim 421-8532
* @call Mary re: syllabus
* @computer google rental cars
* @email Frank re: class
* @read
* @schedule staff meeting
Some of you will recognize that I am trying to adopt a GTD system
inside of textmate. I am currently using a set of applescripts for
OmniOutliner (http://www.kinkless.com/), but I am looking for
something more portable and flexible (markdown format)
If you don't have any input on this, I would be curious to hear how
you keep track of projects and todo's in TextMate.
Thanks,
Stephen
First,
Sorry this isn't a TextMate question/comment/whatever, but I honestly
don't have a clue where to go.
I have this process that's been showing up for the last few days in
Activity Monitor. I can't seem to see it when I run ps aux or top.
bfobserver
is the name. It's been eating about 50% of my ram on a consistent
basis, and it's pissing me off. If I choose ALl Processes,
Hierarchically, I see the following:
launchd (root) -> bfobserver (root) -> python (eric)
Anyone have a clue?
- Eric
Folks,
I am just playing with TextMate and trying to get a better grasp of
regexps.. ;)
A language grammar for some time stamped log files (like system.log)
{ scopeName = 'text.logfile';
fileTypes = ( 'log' );
foldingStartMarker = '/\*\*|\{\s*$';
foldingStopMarker = '\*\*/|^\s*\}';
patterns = (
{ name = 'invalid';
match = '(crash(dump|ed)|error|failed)';
},
{ name = 'constant.numeric';
match = '[0-9]';
},
{ name = 'keyword.operator';
match = '(\(|\))';
},
{ name = 'string.url';
match = '\s(\/.*log)';
},
{ name = 'string';
begin = '^';
end = ':\s';
patterns = (
{ name = 'constant.language.time-stamp';
match = '[a-zA-Z]{3}\s[0-9]+?\s[0-9]{2}:[0-9]{2}:[0-9]{2}';
},
{ name = 'keyword';
match = '(launchd|authexec)';
},
{ name = 'variable.other.process';
match = '\w+?\[\d{1,6}\]';
},
);
},
);
}
Has anyone made, or thought of making, a bundle for webworks and/or
freemarker templates?
I'm going to use Webworks in an upcoming project and although it's
mostly html for me, it could be nice with complete correctness.
Andreas
Hi,
Ever since r3350, I have not been able to commit changes to
Subversion from within TextMate. When I try to commit, I get the
following screen.
If I go ahead and press 'Commit', it fails with the message:
Subcommand 'commit' doesn't accept option '--diff-cmd arg'
I don't have any SVN-related environment variables set in TextMate.
I've seen comments in the revision logs related to specifying a diff
command, but don't understand why commit should be affected by this.
Any ideas?
Thanks,
Shiran
Hi,
I don't know if this will be of interest to users of TxtMt but some
users like a text editor to be able to go into full-screen mode. E.g.
for creative writing purposes I like to be able to focus on the text,
and ONLY on the text without the fluff of the OS and other running apps.
Some apps built a reputation out of this alone, e.g. Ulysses, Macjournal.
Plus it kinda fits with the simplicity we code hackers like. Nothing
beats a fresh full-screen Terminal in the morning, but maybe that's just me.
Cheers - Francis
Hi,
A short question, is there a short key to enter the commit button in the
commit window, without klicking it with my mouse? i do a lot of commit's
without comments and i want to hit a key to commit the changed
files.isthere any?
thanks a lot!
Redouane
Hello:
Since this morning and a new update ( TM 1.5.1 1021)
With latex Bundle when i type ^ (not the ctrl key but the key for î ô
etc)
i've a menu on the screen
1) run makeindex
2) run BibTex
With html bundle when i type ^ all the html commands disappear
and there remains only my text between the <p> </p>
It is very unpleasant. i need î ô ê etc...
Alain Matthes
Allan,
slightly off-topic. I was wondering what tool you are using to get
the subversion revision history from the textmate repository into a
nicely formatted rss feed? Or is that something you custom made?
Thanks for the info.
Sebastian
I'm editing the "Annote" field in BibDesk via the "Edit in Textmate"
shortcut. The shortcut works (TextMate opens with a new file and
pastes the text already in the field. But when I write something an
then hit "Save", nothing happens. The text doesn't get transfered to
the Annote field in BibDesk. Edit in TextMate works fine in Safari,
Mail, etc. And if I'm remembering it also used to work with BibDesk.
But suddenly it stopped working. Can anybody using Bibdesk as well
confirm this behaviour?
Btw. I'm using the latest cutting edge build 1021.
Thanks. Oliver
Hi,
I'm using the latest version (1.5.1 1021) and I don't know if it is
new to this version, or I'm missing something.
I went into the bundle editor and clicked the Filter List button to
turn off some bundles I'm not using. That seemed to go OK, but when I
went back into the bundle editor and clicked Filter List, none of the
filtered bundles appear.
So the question is... how do I un-filter them?
Thanks!
jt
Is there any way in TM to insert an image into my HTML doc sort of
the way Dreamweaver does it? I'd like to be able to click a
shortcut, the finder window pops-up so I can choose the file, the
image tag gets inserted with the correct filename and height/width
attributes. Any way to do this?
Thanks!
Sean
:::: DataFly.Net ::::
Complete Web Services
http://www.datafly.net
> 1. Create a new user account
> 2. Limit its access to only TextMate
> 3. Hide the dock
> 4. Work.
Not good enough.
No matter how well you share documents between users this is as much a
stop-gap solution as faking fullscreen using other apps.
I just started using TextMate about a week ago, and so far I love it. But I
write a lot of Objective-C and I see two issues that may get annoying fast.
I'd love to hear if anyone is aware of a fix or if I'm just overlooking
something.
Problems:
1) If I write an method implementation that looks like:
- (id)performMethodWithLongName:(id)foo
and:(id)bar {
// ...
}
The autoindent on the first line of the method body is messed up. I have my
editor set to use "Soft Tabs: 2", but I don't end up two spaces from the left
margin, rather I end up two spaces after the column where the "and:" method
parameter started. It looks like the autoindent spacing is determined by the
location of the preceding line, but I'm not sure this will work well with the
common spacing patterns used in Objective-C.
2) When I call an Objective-C method, I'd like it to automatically align
parameters by the colon. For example, I'd like it to be smart enough to
reformat:
foo = [someObject foo:bar baz:quux];
into...
foo = [obj foo:bar
baz:quux];
I figure this one can be done pretty easily w/ a TM command, but I'm more
wondering if anyone's already written it.
Thanks,
Greg
I have been trying to combine some tips in the thread on inserting an
image url and the thread on using filemerge for svn merge to
implement using filemerge using the diff bundle.
For this I am using the shell command
exec "/path/to/filemerge.app" -left $leftfile -right $rightfile
This opens filemerge but does not allow access to TextMate until you
quit file merge. Is there a way to allow the exec command to run in
the background so that filemerge opens and then allows access to
textmate to edit a file.
I am also using Alan's code to allow selection of one of the files
via a finder dialog box
leftfile=$(osascript -e 'tell app "SystemUIServer"' -e activate -e
'return POSIX path of (choose file with prompt "Pick an file:")' -e
'end tell').
This does not allow access to packages such as a .wdgt folder. Is
there a way to allow the finder dialog box to access a folder such as
this. This would also apply to a .app folder.
Many thanks,
Anthony
I suppose I'd better weigh-in while I still have the chance on the
issue of a full-screen mode.
To avoid [Tuesday Whipper-Snapping][1], I'll just tell you why
fullscreen is important to *me*. I'll leave it up to you to
interpolate other uses for fullscreen.
An interesting, and relevant, discussion has been going on over at
[Subtraction.com][2] where talk is brewing of an app that actually
blocks all network traffic while using it. A quote:
> what better way to thwart a computer than to step away from
> it completely? There's no email to check on a typewriter,
> no beeps and pop-up reminders from other applications, and
> no access whatsoever to the Internet and its tantalizing
> abundance of productivity-killing diversions.
>
> [...] At some point, it occurred to me that it really
> shouldn't be necessary to purchase another piece of hardware
> to accomplish the same things that writers look to manual
> typewriters for: the ability to focus without distractions.
And that's exactly what fullscreen is all about, killing distractions
and making you forget that your computer can do anything but process
text.
"HA!" I can hear so many of you saying, "All you need is some
will-power! you don't need fancy tools." Indeed, you don't need fancy
tools at all. For goodness sake, the greatest masterworks of writing
of the human race were created with nothing more than ink and paper.
But I ask you this, what lengths did those people go to to kill
distractions? Truman Capote was known to only be able to *really*
write away from everyone he knew, away from his own life. Writers
often take sabbaticals to other countries to finish their works.
Killing distractions is a way of life. I'll say that again,
Killing distractions is a way of life.
For me, anything that helps me do this is a tool I want to use.
[1]: http://inessential.com/?comments=1&postid=3291
[2]: http://www.subtraction.com/archives/2006/0509_blockwriter.php
A slightly off-topic question regarding XSLT (I am extending the
XHTML-to-LateX template).
I have the following XHTML markup:
<div class="versionhistory">
<div class="version" v="v1.0" d="2006-05-04" a="SBR">Change
description v1.0</div>
<div class="version" v="v1.1" d="2006-05-05" a="SBR">Change
description v1.1</div>
<div class="version" v="v2.0" d="2006-05-06" a="SBR">Change
description v2.0</div>
</div>
and would like to read the value of attribute "d".
Now, with something like
<xsl:template name="get-version-date">
<xsl:param name="vers" />
<xsl:value-of select="//div[@class='version'][@v=$vers]" />
</xsl:template>
I can get easily the value of a specific "version div", such as the
string "Change description v1.0". But how do I write the select
statement to get "d" of a specific version instead? Or similarly,
what is the path to read the attribute "content" of a meta tag such as
<meta name="documentclass" content="wtdocument" />
with something like
<xsl:template name="get-meta-value">
<xsl:param name="tag-name" />
<xsl:value-of select="/html/head/meta[@name=$tag-name] (*???*)" />
</xsl:template>
Thanks for any help!
With regards
- Stefan
Fist Example:
{ name = 'meta.line.screenplay';
match = '^(\t{4})([^\t].*)(\s*)';
captures =
{ 1 = { name = 'whitespace'; };
2 = { name = 'element.character'; };
3 = { name = 'element.character.eol'; };
};
},
This works great unless the line I'm working on is the last line of
the document, in which case the 3rd capture fails. Which makes a
certain amount of sense to me because on the last character of the
last line of the document there wouldn't be anything to match, not
even a newline.
But the following works...
{ name = 'element.action.screenplay';
match = '^[^\t].*((\.|\-|\?|\:|\;|\,)\s*)';
captures =
{ 1 = { name = 'element.action.eol'; };
};
},
Which is totally nuts, because it's not all that different than the
first example.
My question is this: How can I get the 3rd capture of the first
example to work when I'm working on the last line of a document?
All,
I recently purchased TextMate and I've been very impressed with it. It
was one of the main reasons I just switched to a mac.
I've been wondering about the behavior of the Text | Move Selection |
Line Up command. It works exactly as I'd expect when text is actually
selected, but when you invoke the command with nothing selected, the
behavior is a little bit odd.
When nothing is selected, invoking either "Line Up" or "Line Down" from
the Text | Move Selection menu will move the current line up or down,
which is exactly what I'd want it to do. The unexpected behavior is
that the cursor doesn't remain on the moved line at the original offset;
instead, the cursor ends up at the start of the line immediately below
the moved line. This makes it difficult to move a given line more than
one line up or down.
Could this behavior be changed? For example, in the following five
lines of text, imagine the cursor is on the "@" character:
first line
second line
third @line
fourth line
fifth line
With nothing selected, I'd like to press control-command-up twice and
end up like this:
third @line
first line
second line
fourth line
fifth line
with the cursor still in the same place on the "@" symbol. With the
current implementation, pressing control-command-up twice first
exchanges "second line" and "third line", then exchanges them back,
leaving my cursor at the start of "third line":
first line
second line
@third line
fourth line
fifth line
I like the way that many features in TextMate operate on the selected
text when a selection is active, but fall back to some natural unit of
text for the given operation when nothing is selected. To me, the
above-described line move operations seem to "line up" with this philosophy.
Thanks,
Michael Henry
>> Is there any reason the following shouldn't work?
>>
>> perl -pe 's/\n\n/foo/;'
> What you may want to do is this:
>
> perl -pe 'BEGIN {$/=undef} s/\n\n/foo/'
I tried that, but this does not allow me to use "^" to denote the
beginning of a line, which is critical to some of the search/replace
things I'm doing.
Any other thoughts?
Has something changed with the Subversion repository for bundles? I'm
getting encoding errors:
jupiter:/Library/Application Support/TextMate trevor$ svn up
svn: Can't convert string from native encoding to 'UTF-8':
svn: Paste Line : Selection to IRC?\226?\128?\166 (CakePHP Paste).plist
jupiter:/Library/Application Support/TextMate trevor$ cd Bundles/
Subversion.tmbundle/
jupiter:/Library/Application Support/TextMate/Bundles/
Subversion.tmbundle trevor$ svn up
svn: Can't convert string from native encoding to 'UTF-8':
svn: Diff Revisions?\226?\128?\166.plist
Any suggestions on how to fix this? Thanks,
Trevor
In the subversion bundle I tried to use escape to do word completion
while typing the checkin message and this cancelled by checkin
without any warning, discarding the long and complicated checkin
description I had been working on. Happy I am not.
Dave.
I have two questions:
1: I must be doing something really stupid but I don't seem to be able
to get the Rails snippets to work when I hit tab on an IntelMac. I
have read the docs, googled for it and tried to browse the archives
but can't figure out what is wrong. THe bundle editor shows that the
rails snippets are there.
2: I seem to be running textmate from the folder which comes up when
you double-click on the .dmg file. It takes two steps to launch it.
Is this the preferred way to install it?
TIA,
-bakki
How can I create a command that creates the PDF file from Latex
without creating any other files (logs etc.). Preferrably this command
would also let me choose where to save the output document with the
standard saving dialog window.
---------- Forwarded message ----------
> From: Brad Choate <bchoate(a)gmail.com>
> To: TextMate users < textmate(a)lists.macromates.com>
> Date: Thu, 18 May 2006 18:35:48 -0700
> Subject: Re: [TxMt] unordered list nav snippet
> Here's my entry:
>
>
>
>
>
> As requested, it outputs the text wrapped in <a> tags. As a bonus, it
> outputs as a snippet, so you can tab through the href attributes to
> populate them.
There doesn't appear to be anything here Brad, unless I'm missing something?
Here's quick little command/macro pair for handling Markdown headings
using the setext format. I wrote it because I always find myself
changing the text of my headings, which means erasing the underline
and redoing it so the line of equals or hyphens matches the length of
the new heading text. (Yes, I know that Markdown doesn't require the
length of the underline to match the length of the heading. That's one
of the many niceties John Gruber designed into Markdown. But I'm anal
and like my underlines to match.)
Start with this command for `<h1>` headings.
#!/usr/bin/perl
chomp(@lines = <>);
$under = "=" x length($lines[0]);
print $lines[0] . "\n" . $under . "\n";
unless ($#lines == 0 or $lines[1] =~ /^[-=~]+$/) {
print $lines[1] . "\n";
}
The input should be **Selected Text** or **Nothing**, and the output
should be **Replace Selected Text**. I named it "Heading 1."
Now record a macro that prepares the input and runs the command. The
idea is to be able to call the macro with the caret anywhere on the
line with the heading text. If the heading isn't already underlined it
will underline it; if the heading is underlined it will adjust the
underline to the new heading length.
To make the macro, put the caret on the heading line, start recording and
1. Type **Command-Leftarrow** to move the caret to the beginning of the line.
2. Type **Shift-Downarrow** twice to select the heading line and the
line below it. (Don't worry if there is no line below it; the macro
will record both keystrokes and the command was written to handle the
single-line case.)
4. Invoke the "Heading 1" command to transform the selected text.
5. Type **Rightarrow** to put the caret at the end of the selected
text and deselect it.
I called this macro "Heading 1" also. For a "Heading 2" macro that
inserts a line of hyphens, do exactly the same thing, but change the
quoted equals sign in the fourth line of the command to a quoted
hyphen.
There's a writeup of this on [my blog][1] if you need to see more details.
--
Dr. Drang
[1]: http://www.leancrew.com/all-this/2006/05/markdown_headings_in_textmate.html
Hi
I couldn't find a reference to this on the list and wasn't able to
login to the bug tracker.
Background:
I uses a template system where I have an HTML file that serves as a
template. When I want to create a new page for the site, I open the
file and 'Save As' whatever the new name will be.
Problem:
I notice that when I save a file (File / Save As), it seems to rename
the file that I was working on to the same name as the file I just
'Saved As'.
In other words, if I save "page_template.html" as "index.html" in
another folder, when I look back at the project drawer, the original
file assumes the name of the new file.
Interestingly, if I open the old file (which now has the name of the
new file), when I command+click on the title bar to see where the
file is stored, it thinks it's the new file.
If I close and open the project, the file returns to it's original name.
Is there something I can do to refresh the project drawer? Has anyone
else had this problem?
I'm running the Demo version of TextMate 1.5.1 (948) on Mac OS X
10.4.6 on a PowerPC G5
Thanks for listening.
Regards
Jonathan
<rant>
> Difficulties in Collaboration
> =============================
> All of my colleagues use Word for curriculum development, tests, and
> assignments. Colleagues don't get it when I send a markdown
> formatted document to them. While I use textmate for a variety of
> tasks, I stumped at how I can drop Word without retraining my
> colleagues.
I just got two emails from coworkers with both about 5 lines of text
in a word document attached to an email. Can someone please explain to
me why they did not just enter the damn text into the email? Luckily
gmail can display .doc as html, I really don't care about having Word
just for crap like this.
Why are people so ignorant? Both my coworkers do complain about Word
being sucky and complicated and all that -- but you would think they
might do something about it. I wish WYSIWYG and Word were never
invented, it dumbs people down, just like PowerPoint tends to do…
anyone remember the hype against PP --
http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=000111&topic_id=1
There is whole businesses losing their right to exist just because the
average pc user thinks he can do it better, as well as people losing
their appreciation of quality (as long as they pay for it).
How do you re-train your coworkers and surroundings?
THAT is why TextMate is so cool. It makes it easy to create text/code,
it makes you love the act of writing the content and not fuss with the
annoying stuff around it -- but it doesnt force you to create bad
code. Maybe people would be dumping Word if they had a good text
editor on their hands (*dreaming*).
Ah. Need to get coffee.
</rant>
Dan
Hi nachodog,
> So close. . . I installed DarwinPorts. Should I go to any special
> directory in the terminal?
>
> Here is what I ended up with. . .
>
>
> ndog:~ ndog$ sudo port install htmldoc
> Password:
> sudo: port: command not found
> ndog:~ ndog$
I think port is usually installed in /opt/local/bin, which isn't on
the root path. Try:
sudo /opt/local/bin/port install htmldoc
If that doesn't work, the following command will search for port:
find / -name port -print
Later,
Chris.
P.S. You'll probably need to add /opt/local/bin to your path, as
everything DarwinPorts installed is put there. I think.