Hi All,
Using my fingers and RegEx, I hardly manage to convert simple HTML
file to TeX file, something like :
find : <h1>([^<]+)</h1> replace : \\section{$1}
find : <h2>([^<]+)</h2> replace : \\subsection{$1}
find : <ul> replace : \\begin{itemize}
find : <blockquote>([^<]+)</blockquote>
replace : \\begin{quotation}\n$1\n\\end{quotation}
and so on...
Has someone here written a macro that does that job? It would be
very helpfull :)
Thanks,
--
Jo <W:00°04'37" ; N:47°15'36">
1....'....12.....'....24.....'....36.....'....48.....'....60.....'....72
wow, accidentally pressed the Help key while typing in TextMate and
found a menu with the following options:
Dictionary Search
Google Search
Thesaurus Search
Wikipedia Search
Yahoo Search
Upon selecting an item, TextMate passes the current word under the
cursor to the said service. very nice. I haven't seen this in other
programs -- is this an OS X thing? Or better yet ... Is there a plist
somewhere in TextMate to add to the list?
k
I noticed that when dragging a .css file into a transitional XHTML
document, the link tag isn't properly closed. Just wondering if you
could add doctype detection for drag-inserting links to files.
Chris
--
Do the evolution. Get Firefox!
<http://spreadfirefox.com/community/?q=affiliates&id=5&t=4>
wondering if this is a bug or intended somehow ...
I opened a file, params.ini, to edit in TextMate. TextMate handled it
fine besides no sytax highlighting since none has been defined
presumably. But when I added it to a project with other PHP files, the
file would not open in TextMate. For example, I clicked on it once
from the project drawer and nothing would happen. if I double-clicked
on it the file opened in SubEthaEdit (which I think was a decision made
by the Finder). Shouldn't undefined text files still open in TextMate
from the project drawer? Do I need to create a syntax plist as a
workaround in the meantime? TextMate 1.01.
thanks, kumar
I'm about to embark on a lengthy and complex project (changing 30-odd
FileMaker tables into MySQL). Usually I use the (excellent) CocoaMySQL
for table creation but I thought I'd explore using snippets in TM...
Basically it works like a charm (create table, add date field, add
varchar, add int...), though I haven't tested it vs CocoaMySQL to see
which will be faster (as CMS offers more tweaking of the field
definitions). But I figure I can whack out the fields in TM then import
the whole .sql file into CMS for the tweaking, adding indexes, etc.
> CREATE TABLE textmate (
> textmate_id int(11) NOT NULL auto_increment,
> tm_user varchar(50) default NULL,
> user_no int(5) default NULL,
> user_email varchar(50) default NULL,
> entry_date date default NULL,
> PRIMARY KEY (textmate_id)
> ) ENGINE=InnoDB;
The one thing I can't manage to sort out is including e.g.
"`textmate_id`" since the "`" is used in the snippets to evoke a shell
command... I tried escaping with "\`" but that didn't work. Am I
missing something obvious?
In any case, it's clear that snippets can revolutionize coding :) Wish
I had more time to explore... embedding shell commands could be
fantastic...
Paul
As the help file suggests, I've tried changing some keyboard shortcuts
with System Preferences->Keyboard & Mouse->Keyboard Shortcuts. I'm
trying to change the following items in the Text menu:
Reformat Paragraph
Reformat & Justify
Unwrap Paragraph
I can get Reformat & Justify to work but not Reformat Paragraph and
Unwrap Paragraph.
I suspect it's because both of those items change their name depending
on wether text is selected. I.e., when text is selected they become
Reformat Selection and Unwrap Selection.
I've tried setting the same shortcut for both, e.g., Reformat
Paragraph and Reformat Selection to try to cover both menu states, but
it doesn't work and the System Preferences warns me of an error
because of the duplicate shortcut key.
Does anyone know how/if I can make that work? Or am I just out of
luck because of the way the item changes names?
Incidentally, I've worked around it by creating a local
KeyBindings.dict, I'd just prefer to do it with the System Preferences
so I don't have to always keep my KeyBindings.dict up-to-date between
version changes.
Thanks much for any ideas!
Hi,
I've noticed from previous mailings in this mailinglist that there are
loads of keyboard shortcuts available in TextMate. Is there a list
available somewhere which lists all of the default ones ?
And I also saw that there are lots of default OS X keyboard shortcuts I
didn't know about, does anyone know of a list of those?
Jeroen.
I created a service that adds “Edit in TextMate” to the Services sub
menu. The key equivalent is command-escape (but there's an OS bug which
requires the menu to have been open at least once before the key
equivalent works).
It opens a TextMate window with the selected text, when you save and
then close the TextMate window, the modified text will be sent back to
the application.
There's currently a 3 hours timeout (the application will have the busy
wheel until you close the TextMate window).
Place the service in ~/Library/Services -- you need to log out/in for
the services menu to be rebuilt. If you launch the service manually,
the service should be available for new programs or programs which
hadn't already had the services menu built (but restart if it doesn't
work).
If you use the service from within TextMate, it may hang (until you
manually break the service) -- I'll add a workaround for this.
It currently can only handle one edit task at a time, and it requires
at least version 1.0.2b3 of TextMate.
The reason that it's an external service and not built into TextMate
has to do with the way services work -- I may be able to find a
combined solution later.
It uses a temporary file for exchanging the text, this is always named
“Data from <application>.txt” and placed in “/tmp/<uid>/TemporaryItems”
-- it doesn't remove the file afterwards and it doesn't ensure that the
file didn't already exist.
Unless I missed something (which, today, wouldn't surprise me in the
least..) it's not possible to create a project from a remote folder over
(S)FTP, is that correct? From what I understand of FTP and ODB this won't be
easy to implement?
Has anyone found a way to mount FTP folders as regular folders in the finder
(with read/write, not Apple's readonly way)?
A workaround I got was to open the files seperately, then dragging the
window's icons to a new project window (or if you open its parent folder
from the titlebar you can drag all the opened files to TM), selecting the
files in the project window once so they get a tab, and then you can close
the original windows - edit/saves will update the version on the server. If
you close the original window without 'tabbing' the file, the temporary file
will be removed (and editing will not be possible).
Regards,
Martin