Haris,
What a great idea, I saw the commit and thought I'd give it a try.
Unfortunately I didn't have much success.
I have R.app (1.16, R version 2.31) open and running. In the latest
cutting edge I create a new document, choose the R console language
and get the following errors:
> print("hello world")
294:299: syntax error: Expected end of line, etc. but found identifier. (-2741)
> x <- 7
152:163: execution error: System Events got an error:
NSReceiverEvaluationScriptError: 4 (1)
Thanks for all your efforts!
Peter
Hi!
Right now I'm writing on the concept for a thesis and it seems that
the bibliography-autocompletion stopped to work.
I openend the bundle-editor and saw that there was no key assigned
it. When I assign Escape I get text-autocompletion, if I assign alt
+esc I get the same, if I assign anything else nothing happens.
Can anyone verify that? I use built 1258 with an actual SVN-checkout
and Bibdesk 1.2.9 for my bibliographies (but the last one shouldn't
be important, should it?)
Niels
--
“If one would give me six lines written by the hand of the most
honest man, I would find something in them to have him hanged.” --
Cardinal Richelieu
Same here, I was wondering why that function doesn't work anymore. I
don't use BibTeX (it effed up the special characters in my
bibliography, e. g. umlaute and it took me an hour to clean up my bib
file). Instead, I have set the proper TextMate project variable and
it did work before with the same project.
But until recently, I could use only escape to shuffle through
suitable entries of the bibliography without using BibDesk at all. I
definitely prefer using escape over alt + escape, so if there is any
way to get the old functionality back?
Here's another vote against removing the old escape-only command ;-)
Max
I downloaded the Django Templates bundle and it works fine, but I have
to select it as the active language on all of my template files. I
would rather just select "HTML" as the language and have the Django
Template stuff be included within HTML, just like PHP, Ruby, and
Smarty are.
I took a look at the grammar and tried a few things, but was
unsuccessful at integrating them. Could anyone give pointers on how
that integration should work or, better yet, a working HTML grammar
that includes this change?
Thanks.
--
Brad Fults
Hi,
this is a followup to the thread with a similar name,
but I thought it deserved a new thread since I'm posting
a complete solution (hehe - I'm trapped in a hotel room
in Paris, it's raining here...)
So:
1) create a new command "Lable Table" with
input= entire document
output=Show as HTML
2) the command is the following. (I know, I should
post a .tmCommand file, but I do not know how
so bear with me). GMane requested me to split
the commands, but we have here 6 commands
(5 sed and 1 tr) which should be on one line each.
When joining back the last sed command do not
introduce spaces.
sed -n -e "/\\label/{=;N;N;G;p;}" |
sed '/^$/d' |
sed 's/^\([0-9]*\)$/\<p\>\<\/p\>\1/' |
sed 's/\(.\)$/\1\<br\>/' |
sed 's/\\label{\(.*\)}/\<a href=\"javascript:TextMate.system
(\"\/usr\/bin\/osascript \&\>\/dev\/null -e %tell app \\\
"TextMate\\\" to insert \\\"\1\\\"% \&
amp;\", null);\"\>\\label{\1}\<\/a>/' |
tr "%" "'"
3) open a .tex file and experiment. When you click on a label
the argument is inserted. The command and the text
insertion is very fast, and as to usability it's already
better than the standard Label completion (my taste).
Please, some real coder take this stuff and make it into
some serious code, I think the result is pretty amazing
compared with the simplicity. I am not able to extend
the script for multiple files (i.e. one master file and the
\includes), any help?
Ciao,
Piero
Hi list
I am using TextMate full time to write Latex and it's great,
and improving.
One thing I do not like is the CocoaDialog interface to
insert \refs: too slow and clumsy. I (almost) can stand it
for bibliography completion but \refs are too many, too
similar to each other, and too frequently needed, so the dialog
interrupts my workflow. So I started thinking and tinkering,
but my coding skills are too poor (I also sent a msg to this
list asking for help). Finally I think it is better to publish
the idea and let the code wizards code it, if they like it.
My feeling is that this could be the optimal way to insert
references, even better than auctex's.
The idea is very simple: parse the tex file, write
all labels (plus some surrounding text) into an auxiliary
.lbl file, convert this into html, and replace each
\label{...} command with an "a href" to a tiny javascript
command that tells TextMate to insert the label's name
into the source file. Finally, output to HTML. (Improvement:
just search the labels matching a few characters, as it
is now).
Do you see it? This produces an HTML window, with a list of
all my labels, followed by the beginning lines of the
equations (or section titles). More important, each
label is clickable, and when I click on it, the reference
gets inserted into the source file. I can keep the label window
open, so no need to invoke the command over and over.
When I add more equations, I just refresh the window
as necessary.
But I got stuck with some stupid coding problems.
1- Easy to grep the tex file for lines containing a \label
command plus some context. E.g. the following command
outputs line number, plus the \label line, plus two nonempty lines
following it:
sed -n -e "/\\label/{=;N;N;G;p;}" | sed '/^$/d' | sed 's/^\([0-9]+\)$/\n\1/'
2- Easy to save all this info into a file fileName.lbl and
do some rudimentary html-ization (just add <p></p>'s
to separate the labels from each other- you can do much
better I know, but this is fast)
3- Not so difficult to replace each "\label{...}" with the
javascript link. But I got stuck when writing the osascript.
Let me explain. Is is easy to create a link such that, when
I click on it, TeXniscope is activated (e.g.):
<a href="javascript:TextMate.system('open -a TeXniscope', null);">
TeXniscope</a>
Nice! So I said, I'll just insert an osascript telling TextMate to
insert the label reference:
<a href="javascript:TextMate.system("/ust/bin/osascript -e
'tell app \"TextMate\" to insert .......'", null);">\labe{...}</a>
(of course, "....." must be replaced in both places with the \label's
name, using some bash, and some string must be joined etc etc)
This doesn't work. Why?? even the simple
<a href="javascript:TextMate.system("/ust/bin/osascript -e
'tell app \"Finder\" to activate'", null);">Finder</a>
does not work. This must be some escaping trickery.
Could some pious wizard explain what's
wrong? and even better, like the idea so much to code it?
I do not think it should be hard (for you :).
Regards,
Piero
Hi,
somebody help me, I guess it takes just a look at this code
to spot what's wrong (for you):
---------------------------------------
<html>
<head>
<script>
function letsTry () {
TextMate.system("/usr/bin/open -a /Applications/TeXniscope", null);
};
}
</script>
</head>
<body>
<span id="letsTry">
<a onClick="letsTry()" href="#">Let's Try</a></span>
</body>
</html>
---------------------------------------
I put this in a p.html file. I then create a command in TextMate
that does " cat p.html " and outputs to HTML. The HTML appears,
but of course clicking on the link does nothing, not certainly
opening TeXniscope as hoped. Documentation(s) perused,
sleep hours lost. Any idea?
Piero
Hi,
It would be cool if I could see the list of the files contained in
the folders
on the main window when folders in project drower are highlighted.
Currently, when the folder is selected, the main window continues
showing the file I'm currently editing.
Even when no files are open, which means that the drawer and the main
window,
the window shows nothing but the large TextMate icon.
It would be great if we could get a list of the names of the files
containted in the folder.
Additional information such as the date created and the date last
modified would
be nice.
This, I belive, helps those who use long file names as well as people
who use similar prefix
for file names.
Takaaki
--
Takaaki Kato
http://samuraicoder.net
My subversion bundle "Commit" command stopped working - I get the following message:
/Library/Application Support/TextMate/Bundles/Subversion.tmbundle/Support/svn_commit.rb:12:in `require': no such file to load -- /Users/ryan/Library/Application Support/TextMate/Support/bin/shelltokenize.rb (LoadError) from /Library/Application Support/TextMate/Bundles/Subversion.tmbundle/Support/svn_commit.rb:12
I've searched the archive and I've seen a couple of similar threads, and like some of them, this also only seems to apply to commit (I can still use the diff commands). Maybe I'm missing something, because the recommendations I found didn't work or didn't apply. I've added TM_SVN (/usr/local/bin/svn) to my TextMate shell variables, and I tried adding it to my .bash_profile and changing BASH_ENV in the preferences. The other recommendations centered around the version of Ruby, and I'm running Tiger and have version 1.8.2 already installed.
I'm running TextMate version 1.5.3 (1258), and have the latest subversion bundle installed. Any assistance would be appreciated.
Thanks,
Ryan
These are my three variations of the "Lucky Linking" idea, where the command
searches Google with the selected text and returns the "I'm feeling lucky"
result as a link.
I have modified all three commands so that they require no extra support
files, but they do require some standard libraries that I made assumptions
that everyone would have. If I'm wrong, let me know.
The Get Title from URL variation is just an improvement on iamrice.org's
version. The regex is a little more flexible, and it returns a link with a
title attribute.
The Google modification incorporates the Get Title command and grabs the
title from the "Lucky Link", using the updated regex, and inserts it as a
title attribute in the link.
The Wikipedia version goes a few steps further and scrapes the pages with a
quick regex to determine if it's a final destination or another search page
(or disambiguation page). It provides a dropdown menu when there are
multiple results. It will also detect if there is a redirect and put the
correct link and title into the link while leaving your original text alone.
This should allow you to quickly see if it got off on the wrong track.
I am no good at either programming or regular expressions ;-). I do my best
to fool people. But I am eager to learn from my mistakes, so if you do take
the time to look at these, please give me as much feedback as you can. I'll
lap it up like a puppy.
Cheers!
Brett