hi all,
I have a quick question - is there a way to write a command that would
run the previously run ruby test - whether it was a whole test case
(command R) or the 'focused test run' ? I often want to tweak code,
rerun the last test, tweak code, rerun, etc....So basically I could
map ctrl-cmd-R to 'rerun previous test run', and it would be smart
enough to run whatever I ran last.
thanks,
Rob
--
http://www.robsanheim.com
Hi everyone,
This is a minor bug, mostly cosmetic in the LaTeX
bundle. Please have a look at this screenshot :
http://img213.imageshack.us/img213/5403/image1fd3.jpg
Notice that the accented characters in the name of the
section do not appear in italic in the label whereas they
are OK in the last line.
It probably has to do with the RegExp which is involved
in the definition of this command.
I'm very new to (yet enthusiastic about) TextMate... A quick search
of the web and this mailing list doesn't return much in the way of
XSLT bundles/extras/goodies for TextMate.
Can anyone provide any pointers and/or let me know that nothing
currently exists (In which case I'll develop something)?
Thanks,
Todd Ditchendorf
Scandalous Software - Cocoa Developer Tools
http://scan.dalo.us
Howdy.
In light of the recent C Library bundle, it's obvious that people re
extremely interested in having some code completion in TextMate.
I've done a few things will code completion already.
Filepath - http://subtlegradient.com/articles/2006/11/02/filename-
filepath-completion-for-textmate-screencast
English - http://subtlegradient.com/articles/2006/10/30/english-word-
completion-for-textmate-screencast
And someone did Cocoa completions
http://theocacao.com/document.page/332
I think we should come up with a brick simple library that will let
you do completions.
Then the hardcode d00ds can get on with extending and perfecting the
completion library.
While everyone actually gets the chance to use it.
Plus, we'll be able to unify all the code completion stuff into a
single library.
thomas Aylott — design42 — subtleGradient — CrazyEgg
Hi,
I looked at the R-bundle command 'Execute Line / Selection'.
I rewrote this command to improve it and fasten it a bit, at least in
my eyes.
Changes for this command and for the language grammar 'R console':
1)
I compiled the AppleScript and saved it as 'Run only'. This is a bit
faster.
Furthermore within this script I use the clipboard to pass the
command to R, and I also get back R's result via the clipboard.
This has a nice side-effect for the encoding problems:
Example: If I type 'print("Immer Ärger mit Jörg")'
I will get back '[1] "Immer Ärger mit Jörg"' with the 'old' version
caused by the UTF-8 encoding.
If I do it via the clipboard then it outputs the string correctly,
but if you have a look at R.app you see weird characters.
And finally I took care about the AppleScript file size, because it
remembers the the 'oldtext' and 'text_area'. So, I set these
variables to "" and the end.
Of course, to use the clipboard will destroy its content, but this
can be discussed.
To work with the AppleScript tm_get_r.scpt you have to copy the
attached script to R-bundle's /Support/bin folder, or you can compile
it by yourself.
2)
If you have a TM window set to R console scope, and you enter a
command like '> 3*3' the script now is checking whether R.app is
running. If not it opens it, waits 5 seconds, hides R.app, and sends
the command to R.
3)
I changed the language grammar for 'R console' to be able to do the
following:
I type '4+' press ENTER, R returns '+ ' to complete my command. If
you type now '4' the old grammar ignores that.
So I changed the line 'begin = ...' within the grammar to:
________________
{ scopeName = 'source.r-console';
fileTypes = ( );
patterns = (
{ name = 'source.r.embedded.r-console';
begin = '^[>|\+] ';
end = '\n|\z';
beginCaptures = { 0 = { name = 'punctuation.section.embedded.r-
console'; }; };
patterns = ( { include = 'source.r'; } );
},
);
}
________________
Now you can type as usual.
4)
If R asks for an user input via 'readline' you can't just type the
answer and press ENTER because TM's command expects '> ' or '+ ' at
the beginning of the line.
To solve it here's a suggestion:
If the last line of R's return is not '> ' or '+ ' I insert '\n> '.
It is not standard but now you can type the answer straightforward.
5)
I suppressed any error message coming from AppleScript. E.g., if you
type '?C' and R.app is not running, R starts, and shows the help, but
meanwhile AppleScript wants to have the content, but it does not get
it. Thus AppleScript outputs an error, but there is no error. In such
a case R's return is nothing and by using the suggestion of 4) you
have a '> ' and no error message at the last line in TM.
6)
I only changed the code, not the input/output settings.
#########
Here comes the new code for 'Execute Line /Selection':
__________________
echo
echo -e `tail -c+2` | pbcopy
# check whether R.app is running
if [ $(ps -xc | grep ' R$' | wc -l) -eq 0 ]; then
open -a R
# sleeps for 5 sec - can be fine-tuned
sleep 5
osascript <<-AS
tell application "System Events"
set visible of process "R" to false
end tell
AS
fi
osascript "$TM_BUNDLE_SUPPORT/bin/tm_get_r.scpt" &>/dev/null
RES=$(pbpaste | tail -n +2)
echo -en "$RES"
NL=$(echo -en "$RES" | tail -n 1)
if [ "$NL" != "> " -a "$NL" != "+ " ]; then
echo -en "\n> "
fi
##########################################
# source code for 'tm_get_r'
#
#
# tell application "System Events"
# -- Get a reference to the text field
# set text_area to (process "R")'s (window "R Console")'s (scroll
area 1)'s text area 1
#
# -- Get text before and after our command
# set oldtext to text_area's value
# tell application "R" to cmd (the clipboard)
# set newtext to text_area's value
#
# -- Find the difference between old and new
# set the clipboard to text from ((oldtext's length) + 1) to -1 of
newtext
# set oldtext to ""
# set newtext to ""
# set text_area to ""
# end tell
#
###########################################
_________________________
Any comments?
Is there someone who is quasi responsible for this bundle?
All the best,
Hans
I'm working with an open-source Java project that uses the so-called
"mixed" mode for indentation. This is the convention popularized by
Emacs where indentations are (say) 4 spaces but tab characters expand
to 8 spaces. Unfortunately, TextMate does not support this mode, as
discussed previously [1]. There is a script that converts between
mixed mode, but it appears to be manual [2], which won't work in my
case. (I'd have to run the conversion every time I open and save a
file.)
So, I need a better solution to get around TextMate's lack of support
for mixed mode. I was thinking about submitting a patch upstream that
would simply get rid of mixed mode and instead use Java's standard
convention [3], but then I noticed that it apparently recommends
mixed mode!
"Four spaces should be used as the unit of indentation. The exact
construction of the indentation (spaces vs. tabs) is unspecified.
Tabs must be set exactly every 8 spaces (not 4)."
Am I reading that right? Does Java's coding standard recommend mixed
mode indentation? What are TextMate users to do in this situation?
Trevor
[1] http://comox.textdrive.com/pipermail/textmate/2004-December/
002053.html
[2] http://comox.textdrive.com/pipermail/textmate/2006-November/
015565.html
[3] http://java.sun.com/docs/codeconv/html/CodeConventions.doc3.html
Newbie woes. Had TextMate working fine with TeXniscope with the
settings below. Then, I tried to set up PDFView (it just looks better)
according to the instructions on their web page.
In the Bundle Editor I wrote over the old TeXniscope item, calling the
new item "Show in PDFView (pdfsync)" and copied the commands from the
PDFView web page for setting up TextMate.
My TextMate preferences Shell Variables are:
TM_LATEX_COMPILER latex
TX_PSTRICKS 1
I hit Command-R (Typset & View PDF) and all the tex files are created.
I just cannot view the pdf file from within TextMate by hitting
Ctrl-Option-Command-O (Show in PDFView).
Any suggestions?
thanks
walter johnson
Is there any way to get a command to play a sound when it is complete?
I can't think of any shell script for just playing a sound, but I'm
looking for something like:
echo "
Aprox. page #$(( (TM_LINE_NUMBER+31) / 32 ))
"
play "$TM_BUNDLE_SUPPORT/harp.wav"
Settings:
Shell Variable: TM_BLOG_FORMAT
Value: Markdown
Problem:
Fetch post returns in HTML, I want to work in MultiMarkdown
Can not drag and drop image to the HTML
Questions:
How do I set so the post comes back in Markdown?
How can I alternate between html and markdown in the Blog Post
(Markdown) template?
Thanks
Hi,
I'm a newbie to TextMate, recently I found it's auto-indention
behavior quite different from XCode and Vim. For example:
if I have:
if (<condition>) blahblah;
When I hit return between if (...) and blah.., It will became:
if (<condition>)
blahblah;
But in XCode and Vim, it's correctly indented as:
if (<condition>)
blahblah;
The second problem is, in XCode or Vim when I have:
if (<condition>)
then hit return, the caret will appear in the next line, and
increase the indention automatically, like (_ shows the caret):
if (<condition>)
_
then if I hit {, they could decrease the indention automatically,
too.
if (<condition>)
{_
But in TextMate, I could not found something like that.
Could you please tell me how to achieve this? Thanks.
Regards,
jjgod.
Hi,
Some weeks ago I wrote this ruby script that works inside a TextMate
command to build a list of references declared in Latex files and let
the user select the reference he wants to insert in the text:
-----------------------
#!/usr/bin/env ruby -wKU
SUPPORT = ENV['TM_SUPPORT_PATH']
DIALOG = SUPPORT + '/bin/tm_dialog'
require SUPPORT + '/lib/escape'
require SUPPORT + '/lib/plist'
require 'pathname'
require 'find'
refs = []
Find.find(ENV['TM_PROJECT_DIRECTORY']) do |f|
file_name = File.basename(f)
if /\.(tex)$/ =~ file_name
File.open(file_name,"r") do |infile|
infile.each_line do |line|
if line =~ /.*\label\{.*/
line = line.gsub(/.*\label\{(.*)\}.*/, '\1').chomp
refs << {
'title' => line,
'code' => "\\ref{#{line}}"
}
end
end
end
end
end
abort if refs.empty?
plist = { "menuItems" => refs }.to_plist
res = PropertyList::load(`#{e_sh DIALOG} -up #{e_sh plist}`)
abort unless res.has_key? "selectedMenuItem"
print %(#{res["selectedMenuItem"]['code']})
-----------------------
Since the last updates (both of TextMate and its bundles), the script
does not work anymore.
When I invoke it, it gives me back the following error.
-----------------------
tm_dialog: you have updated the tm_dialog tool to v7 but the Dialog
plug-in running is still at v4.
tm_dialog: either checkout the PlugIns folder from the repository or
remove your checkout of the Support folder.
tm_dialog: if you did checkout the PlugIns folder, you need to
relaunch TextMate to load the new plug-in.
/tmp/temp_textmate.ZcyesN:32:in `load': Cannot parse a NULL or zero-
length data (PropertyListError)
from /tmp/temp_textmate.ZcyesN:32
-----------------------
I'm a TextMate newbe, thus I'm not sure, but from the error message
it seems like I need to update the Dialog.tmplugin file. How can I
fix this ?
Cheers,
Leonardo
I am trying to transfer my personal TM bundle from one computer to
another. I simply copied it into Pristine Copy/Bundles but it will
not open. When I double click on it, I see, "The bundle “Jenny's
Bundle.tmbundle” does not contain the required “info.plist” file (or
that file is corrupt) and can therefore not be installed."
Is there an easy way to fix this for someone who is still a bit of a
newbie?
Cheers,
Jenny
I noticed using TextMate today that when I use either the Docksend
File or Docksend Folder commands of the Transmit bundle, that
Transmit is brought to the foreground. Is there any way to change
this back to where Transmit isn't "popped" to the foreground? I use
Growl for Transmit notifications, so I have no need to watch the
progress in Transmit.
I'm using Version 1.5.4 (1349).
Hello fellow Python Bundle users,
I've been learning more about the Ruby bundle, and I have some ideas on how to make the Python bundle better. Some of them are blatantly stolen from the Ruby bundle, some of them I came up independently myself when I was using BBEdit, and thought they would be useful in the Python bundle.
#1: Create Dictionary From:
I thought Ruby could take the selected text and make a hash out of
it. (looking in the TextMate book now of course I can't find it).
I wrote something similar, turning the following text into a
dictionary:
a = 1
b = 2
--> result: {'a': '1', 'b': '2'}
You'll find my script at the bottom of this email
#2: Support for syntax coloring doctests
Wouldn't it be cool to have doctests syntax colored like code, and
not comments?
Likewise, it looks like the folding marker for Python comments
folds on a blank line. That means folding doesn't work very well
for doctests or comments with blank lines in it.
#3: super() in class snippet
It would be cool if the class snippet inserted super(...) into the
constructor for the class. (Is this possible with clever
mirroring?)
_______________________________
Bugs:
* Evaluate Selection As Python doesn't work
(Traceback (most recent call last):
File "/tmp/temp_textmate.KE9sFL", line 5, in ?
from traceback import format_exc
ImportError: cannot import name format_exc
)
* Documentation For Current Word doesn't work
(global name sh is not defined)
_______________________________
Looking forward to everybody's thoughts on these improvements!,
_Ryan Wilcox
--
Wilcox Development Solutions: <http://www.wilcoxd.com>
Toolsmiths for the Internet Age PGP: 0x2F4E9C31
_____________________________________________________________________
#!/usr/bin/env python
import fileinput
import re
"""
dictMaker takes a formatted string and generates a Python dictionary
from it.
Basically: it's easier to type in my format then to deal with all
the quoting required for dictionary creation
The Format is:
key = value
NOTE that at this time quotes are made around the values. So if you're
strings just don't add them (elsewise just find and replace the extra
quotes)
"""
a = re.compile("(\w+) = (.+)")
output = {}
for my_line in fileinput.input():
mtch = a.search(my_line)
output[ mtch.group(1) ] = mtch.group(2)
print output
_____________________________________________________________________
Hey everyone,
Is anyone working on JSP bundle and/or syntax file?
Does anyone work with JSP's in TextMate on the list?
I'd love to get my hands on one if it's out there, otherwise I might
be interested in working with someone on creating one. I'm new to
JSP's and creating syntax definitions though.
-Brian
––––––––––––––––––––––––––––––––––––
Brian Landau
UNC - Chapel Hill
School of Library and Information Science (SILS)
http://www.claimid.com/brianjlandau
AIM: Zippi Bat
––––––––––––––––––––––––––––––––––––
Settings:
Language: Blog - Markdown
Shell Variable: / Value:
TM_BLOG_FORMAT markdown
TM_BLOG-MODE wp
Problem:
Images drag and drop into the file and upload to server
The new file with new headers is in HTML rather than Markdown
When I fetch post it also returns in HTML, I want to work in Markdown
If I drag and drop another image to the HTML it does not convert on
posting
Questions:
How do I set so the post comes back in Markdown?
and
How can I alternate between html and markdown in the Blog Post
(Markdown) template?
Hi,
Some weeks ago I wrote this ruby script that works inside a TextMate
command to build a list of references declared in Latex files and let
the user select the reference he wants to insert in the text:
-----------------------
#!/usr/bin/env ruby -wKU
SUPPORT = ENV['TM_SUPPORT_PATH']
DIALOG = SUPPORT + '/bin/tm_dialog'
require SUPPORT + '/lib/escape'
require SUPPORT + '/lib/plist'
require 'pathname'
require 'find'
refs = []
Find.find(ENV['TM_PROJECT_DIRECTORY']) do |f|
file_name = File.basename(f)
if /\.(tex)$/ =~ file_name
File.open(file_name,"r") do |infile|
infile.each_line do |line|
if line =~ /.*\label\{.*/
line = line.gsub(/.*\label\{(.*)\}.*/, '\1').chomp
refs << {
'title' => line,
'code' => "\\ref{#{line}}"
}
end
end
end
end
end
abort if refs.empty?
plist = { "menuItems" => refs }.to_plist
res = PropertyList::load(`#{e_sh DIALOG} -up #{e_sh plist}`)
abort unless res.has_key? "selectedMenuItem"
print %(#{res["selectedMenuItem"]['code']})
-----------------------
Since the last updates (both of TextMate and its bundles), the script
does not work anymore.
When I invoke it, it gives me back the following error.
-----------------------
tm_dialog: you have updated the tm_dialog tool to v7 but the Dialog
plug-in running is still at v4.
tm_dialog: either checkout the PlugIns folder from the repository or
remove your checkout of the Support folder.
tm_dialog: if you did checkout the PlugIns folder, you need to
relaunch TextMate to load the new plug-in.
/tmp/temp_textmate.ZcyesN:32:in `load': Cannot parse a NULL or zero-
length data (PropertyListError)
from /tmp/temp_textmate.ZcyesN:32
-----------------------
I'm a TextMate newbe, thus I'm not sure, but from the error message
it seems like I need to update the Dialog.tmplugin file. How can I
fix this ?
Cheers,
Leonardo
I have written a replacement command for the C Library Bundle and placed
in the C Bundle. Type at least the first letter in the function you want
to autocomplete and hit ctrl-M, this will bring up a menu where you can
choose which function you want to complete.
The completions are stored in the file CLib.txt.gz, add that file to the
Support folder in the C Bundle in. The completions where taken from the
(now removed) C Library Bundle running the following command in the
Snippet folder.
ruby -e "Dir[\"*\"].each do |name| puts
open(name).read.match(/content<\/key>\n\s*<string>(.*)/)[1] end"
if for some reason CLib.txt.gz is to large for the list use that to
generate CLib.txt and gzip it.
Is there any way I can build a latex document and show only errors?
I'm currently getting a lot of warnings, and these are obscuring the
errors themselves.
Help file reads:
Image uploading - simply drag an image into the TextMate editor
window. The image is then uploaded to your blogging installation with
the correct URL now inserted into your document.
http://5thirtyone.com/archives/648 says:
Image uploading - simply drag an image into the TextMate editor
window. The image is then uploaded to your blogging installation with
the correct URL now inserted into your document.
Does this mean if I drag an image file into the textmate Blog Post
Markdown file that when I upload it will change the url to ../
wp_content/uploads/file_name.jpg
Or do I have to upload the image and manual edit the link before
posting.
I tried without ftping the image or editing the link and posted as a
draft and the wp edit window still shows the desktop location.
Using the Post Blog Markdown template
Post to blog leaves the > tags in front of block quotes and # in from
of headers
I am posting while still in Markdown mode
If I convert to HTML everything disappears except for the title.
To work around: I have been creating the post in Markdown converting
to HTML and then manually cutting and pasting to a new doc in post
blog markdown format.
I must be doing something wrong this is not efficient. I seemed to
work fine day before yesterday.
Posting to Wordpress blog on my site
Should I be using Markdown or MultiMarkdown as language?
Do I have to post to blog in HTML or shouldn't markdown work?
I get the error below when I try to run a command lookup (control-
shift-option L) in Markdown mode. I never did a Plugins checkout
(and don't know how to do so). What's the best way to fix this?
Thanks,
Ernest
tm_dialog: you have updated the tm_dialog tool to v6 but the Dialog
plug-in running is still at v4.
tm_dialog: either checkout the PlugIns folder from the repository or
remove your checkout of the Support folder.
tm_dialog: if you did checkout the PlugIns folder, you need to
relaunch TextMate to load the new plug-in.
/Users/ernest/Library/Application Support/TextMate/Support/lib/
dialog.rb:34:in `initialize': No such dialog ()
(TextMate::WindowNotFound)
} for command: /Users/ernest/Library/Application\ Support/TextMate/
Support/bin/tm_dialog -a -p \<\?xml\ version\=\"1.0\"\ encoding\=
\"UTF-8\"\?\>'
'\<\!DOCTYPE\ plist\ PUBLIC\ \"-//Apple\ Computer//DTD\ PLIST\ 1.0//EN
\"\ \"http\://www.apple.com/DTDs/PropertyList-1.0.dtd\"\>'
'\<plist\ version\=\"1.0\"\>'
'\<dict\>'
'\ \<key\>details\</key\>'
'\ \<string\>\</string\>'
'\ \<key\>isIndeterminate\</key\>'
'\ \<true/\>'
'\ \<key\>summary\</key\>'
'\ \<string\>Asking\ Google\ for\ the\ link\</string\>'
'\ \<key\>title\</key\>'
'\ \<string\>Feeling\ Lucky\</string\>'
'\</dict\>'
'\</plist\>'
' ProgressDialog.nib from /Users/ernest/Library/Application Support/
TextMate/Support/lib/dialog.rb:17:in `new'
from /Users/ernest/Library/Application Support/TextMate/Support/lib/
dialog.rb:17:in `dialog'
from /Users/ernest/Library/Application Support/TextMate/Support/lib/
progress.rb:39:in `call_with_progress'
from /tmp/temp_textmate.Qqxuxz:5
Hello all,
Let me explain my use-case first. One of my projects uses code from an open source group, and I have this code in the same TM project as my group's own code. This works great, except when I run the TODO bundle. TODO picks up all the notes from the open source group, stuff really not relevant to my particular work - I just want to see notes for my group's code. You could use this to skip over log files/folders too, or whatever else you wanted in your TM project but not looked at by TODO.
To accomplish this goal I modified the TODO bundle to skip over files whose path matches a TODO_IGNORE_PATTERN grep.
The patch is attached, I hope this is useful to other people (and/or makes it into the todo bundle in subversion ;) )
Hope this helps,
_Ryan Wilcox
--
Wilcox Development Solutions: <http://www.wilcoxd.com>
Toolsmiths for the Internet Age PGP: 0x2F4E9C31
Hi,
I'm getting the following error with the svn bundle when I try to
view the log - any clues?
reason: undefined method `text' for nil:NilClass
trace:
/Applications/TextMate.app/Contents/SharedSupport/Bundles/
Subversion.tmbundle/Support/format_log_xml.rb:22:in `author'
(erb):32
/opt/local/lib/ruby/1.8/rexml/element.rb:939:in `each'
/opt/local/lib/ruby/1.8/rexml/xpath.rb:53:in `each'
/opt/local/lib/ruby/1.8/rexml/element.rb:939:in `each'
/opt/local/lib/ruby/1.8/rexml/element.rb:398:in `each_element'
/Applications/TextMate.app/Contents/SharedSupport/Bundles/
Subversion.tmbundle/Support/format_log_xml.rb:18:in `each_entry'
(erb):28
/Applications/TextMate.app/Contents/SharedSupport/Bundles/
Subversion.tmbundle/Support/format_log_xml.rb:165
Thanks
---
Jeremy Wilkins
I just started looking more into the SQL bundle and using it to
execute the statements I'm creating but I keep getting an error in
the results display saying that it can't find mysql — and it, of
course, lists all the places it looked.
Is it possible to set the mysql path in the shell variables or is
there something else I have to do so TM can find my mysql?
Thanks,
Mike Stickel
Screenflicker Developments
http://screenflicker.com | http://gonecksgo.com
e: mike(a)screenflicker.com
Hallo,
I've got a file with a LOT of lines that match the following regular
expression:
([0-9]+);([^;]+);([0-9]+);([0-9.]+);\n
But within that file there are a few lines that don't match (in
various ways) and I've got to find those lines. Is there a way to
tell TextMate: "Find everything that DOESN'T match the given regular
expression"?
Kind regards,
Tobias Jung
Hi!
I just wanted to start using GTDalt but the iCal-sync just gives the
message that it will take a while and ends w/out any errors after a
few seconds. In iCal is now one additional calendar called GTDalt and
that's it, not one for each context specified in TM_GTD_CONTEXTS.
Does anyone have an idea how I can hunt down the failure or what I'm
doing wrong?
Niels
Hello list,
I thought I'd like to work through some
screencasts today. I was interested in
tm_dialog with the Interface Builder.
Now there are some problems in my environment.
First there was a problem that I use version 5
and I should have used version 6.
I've copied the tm_dialog from /Library/Application Support/...
into the Textmate.app/...
When I call tm_dialog test.nib/ with an very early version
out of the screencast it doesn't show an empty window?!
Could someone give me a hint?
Thanks.
Regards
Karl-Heinz
Within a snippet, I am trying to prefix the $TM_PROJECT_DIRECTORY
to a file name in applescript (but I am not sure how TM environment
variables & files are concatenated into the applescript world?).
In essence, the file textmatetostata.do is created (from
textmate) by default in the $TM_PROJECT_DIRECTORY. The problem is
that when stata activates it cannot find it - since it opens in a
different directory by default.
What I am trying to do is as below: (but this is failing!)
query=${TM_SELECTED_TEXT:-$TM_CURRENT_LINE}
echo "$query" > textmatetostata.do
osascript -e "tell application \"Stata\"
activate
open POSIX file {$TM_PROJECT_DIRECTORY} & \"textmatetostata.do\"
end tell"
- thanks
danstan
i checked the list archives, and i didn't see a definite answer on
this one..
whenever i do a migration in rails, i get this error message:
bash: line 1: selected_theme: command not found cat: /Applications/
TextMate.app/Contents/SharedSupport/Support/css/webpreview.css: No
such file or directory
along with a broken image link..
anyone have any ideas?
thanks!
___
peace,
sergio
photographer, journalist, visionary
www.coffee-black.com
I've found a problem with the syntax highlighting in the LaTeX bundle.
I use the Cobalt theme, and normally the argument of a citation
command such as `\citeauthor` appears in purple. However, I have the
following line in a document I am writing:
\section{\citeauthor{kager:1999}'s analysis}
The arguments to section commands normally show up gold-colored for
me, and "analysis" appropriately does so here. However, the
`kager:1999` part also does, which I believe is incorrect since it is
not part of the actual section title but rather a bibliography keyword
and thus should be purple.
Not a huge problem, but I wanted to point it out. I would fix it if I
had time to learn TextMate's grammar system -- as I said, I'm
currently writing a paper. :-)
OK, I seem to have answered my own question :-). In case it helps
anyone else, here are the steps I needed to take to get the Blogging
Bundle working with ExpressionEngine (1.5.1).
There are two problems with using the Blogging bundle with EE. The
first is that the blog id is not in the same format in the endpoint
URL as standard metaweblog endpoint urls. It looks something like
this:
http://mydomain.com/pathtoEE/index.php?ACT=25&id=1, where id=x is the blog id.
The second is that the date format returned by XMLRPC isn't parsed
properly by the the ruby parser.rb (I'm using ruby 1.8.4), because it
has a Z on the end of the time string. So, to fix it, make the
following changes:
1. Edit /usr/lib/ruby/1.8/xmlrpc/parser.rb (the path may be different
depending on where you installed Ruby), line 87 to read:
if str =~ /^(-?\d\d\d\d)(\d\d)(\d\d)T(\d\d):(\d\d):(\d\d)Z?$/ then
Note the extra Z? near the end of the regular expression.
2. blogging.rb, line 167 onwards:
if @endpoint =~ /#(.+)/
@blog_id = $1
elsif @endpoint =~ /&id=(.+)/ # EE format of blog id in endpoint
@blog_id = $1
else
@blog_id = "0"
end
That seems to do the trick for me. It would be sensible to copy the
Blogging bundle and save the new one under a new name, and with a new
UUID in info.plist, I guess.
Hope that helps anyone else using EE.
Jackie
Hello,
My first enthusiasm got an immediate stopper. After switching the
language environment to English and installing the newest version of
R (2.40), I was able to calculate 100^2 using the R bundle command R
> Console > Execute Selection. Here is the result:
100^2
[1] 0
>
Now, I wanted to do the following calculation 1/1e-1 and thats the
answer:
1/1e-1
Fehler: syntax error
>
Of course the same calculation leads to the correct result when done
in the R console. Does anybody on this list have an idea what
happened here? - Obviously I have not entirely got rid of the German
localization in R. But is this likely the problem? Now it appears to
be an error message generated by R rather than by AppleScript or
whatsoever. I am lost.
May be, I need to trash R entirely, which I thought I had. Or is
there an alternative way to go (without R). Which bundle should I
look up if I wanted to write my own bundle for doing very simple math
(I don't know anything about ruby etc)?
JJ
I recently sent an email to the MacTeX mailing list, in response to
someone's question about what each editor for LateX has going for
them. It is a long post talking about some of the major things in the
bundle, so I thought it might be of interest/useful to some people in
this list. Appended:
Haris
A lot of these things are documented in many places, so to begin with
I will add some links to resources, and then will talk about some of
the things it can do well, IMHO.
1. First and foremost, there are a number of screencasts I've done,
along with blog posts, a lot of them on the LaTeX bundle. They are here:
http://skiadas.dcostanet.net/afterthought/list-of-my-textmate-pages/
Also see here for more TextMate screencasts: http://macromates.com/
screencasts
2. The online TextMate manual is a key resource of information. There
you can learn about:
1. snippets (http://macromates.com/textmate/manual/
snippets#snippets). These are easy to create yourself for common
repeatable code (and so much more).
2. project navigation (http://macromates.com/textmate/manual/
working_with_multiple_files#moving_between_files_with_grace)
3. Find and Replace in multiple files (option regexp included)
(http://macromates.com/textmate/manual/
working_with_multiple_files#find_and_replace_in_projects)
4. Navigating within a single file (http://macromates.com/textmate/
manual/navigation_overview#navigation_overview)
5. Moving text (http://macromates.com/textmate/manual/
working_with_text#moving_text)
6. Setting up your preferred color arrangement via themes: (http://
macromates.com/textmate/manual/themes#themes)
Now I'll talk about the LaTeX-specific commands in TextMate. I will
not refer to their shortcuts, because you can set these to whatever
you like, though they do have some reasonable defaults. You can see
these commands using ctrl-esc and navigating into the LaTeX bundle.
The help file for the bundle is here, in markdown format: (http://
macromates.com/svn/Bundles/trunk/Bundles/Latex.tmbundle/Support/
help.markdown). From within TextMate this can be accessed through the
Bundle's help command.
Hm, perhaps I should explain what Bundles are very briefly. There is
a core TextMate program, which offers the ability to extend it by
creating Bundles, which are collections of rules, commands and
preferences on how TextMate should act in particular languages. In
some sense a lot of the power of TextMate is in these bundles. The
bundles have a very open license (http://macromates.com/svn/Bundles/
trunk/LICENSE), and are being maintained by a large group of
volunteers. The list of languages supported is quite extensive
(http://macromates.com/svn/Bundles/trunk/Bundles/). The success of
TextMate is largely due to this power it provides to the bundle. It
is easy for people to add functionality to TextMate, in a similar way
as one would add functionality to emacs or vi, with the difference
that it is a lot easier for "newbies" to add functionality.
Ok, on to the bundle then. First of all, you don't need any
customizing to begin with. Dragging a LaTeX document onto the
TextMate icon should just open it with TextMate and set you to LaTeX
mode. To start a new document, you can use the Templates found under
the file menu, or you can start from a scratch file. The moment you
save the file with extension .tex, TextMate will recognize it as a
LaTeX file and color it accordingly.
1. Now first of all, creating environments. TextMate has a command
called "Insert Environment Based On Current Word", triggered by
command-{ (which is command-shift-[ in US keyboards, (command
key=apple key)). You can even use this without a word and it will
offer you a list of environments to insert. If you type in a word
first, then TM creates an environment based on this word. For
instance, typing "en" or "enum" and then the command trigger (cmd-{)
will insert:
\begin{enumerate}
\item
\end{enumerate}
and place the caret right after the \item thing. When you are done
with the first item, pressing Enter (fn-return on laptops) inserts a
newline and a new \item entry. Similar behavior for "it", "item" for
itemize etc. You can further customize this list to your heart's
content by using the "Edit Configuration File" command in the LaTeX
Bundle. For me a typical workflow these days is using the exam class.
The "words" "q", "p" and "sol", followed by command-{, produce the
"questions", "parts" and "solution" environments respectively.
2. There is a similar command for inserting common commands, called
"Insert Command Based On Current Word". This is triggered by
command-}, and functions in a similar way. for instance "l" becomes
"\lim_{}" with the caret inside the braces. Once you are done adding
things there, pressing tab takes you out of the braces.
3. The LaTeX bundle offers context-sensitive completion, via the
common "esc" key. For instance, when typing a command, it will
complete only with respect to commands, and not every word in the
text. It will use any commands you have introduced before, as well as
a stock list of commands. For instance typing "\dis" and pressing
escape converts it to "\displaystyle". Typing "\di" and pressing
escape multiple times cycles through all commands starting with \di.
On the other hand, if you are inside a \ref{}, then it completes with
respect to all keys found in \label{} commands within the current
document or any tex file included in your "root document" (called
master document in TM). Similarly, inside a \cite{} it will offer
completion with respect to all bibliography keys in your bib file and/
or any \bibitem's in your document. Also, option-esc will offer you a
popup of all completion matches, similar to the BibDesk completion
plugin that BibDesk offers (though I think that plugin is a lot
closer to XCode style completion, anyway...).
4. Image drag and drop. You can drag and drop any image into the
text, and an appropriate figure environment will be created, with the
accompanying \includegraphics command. By pressing modifier keys,
option or shift in this instance, you can adjust whether you want the
entire figure environment, or just a simple \begin{center}
\includegraphics...\end{center} thing, or the \includegraphics by
itself. And these can to some extend be customized.
5. Table conversion. You can create a table by first typing the
entries into rows, with columns separated by tabs, like so:
one two three
four five six
and select it and run a command, and it will become:
\begin{tabular}{ccc}
\hline
one & two & three\\
\hline
four & five & six\\
\hline
\end{tabular}
Similarly, you can create a new table with a prescribed number of
rows and columns.
6. Wrapping things. You can tell TextMate to wrap the current
selection in a command. Suppose for instance you just typed the
sentence "foo bar" and what to higlight it, so to include it in
\emph. In TextMate, you would select it by pressing opt-left arrow
twice, and then press ctrl-shift-w. This results in:
"\emph{foo bar}" with the emph selected, so that you can type another
command in its place. Pressing tab instead moves you past the
closing }. There is a similar functionality for wrapping the
selection in a begin-end environment pair.
7. Changing environments. Suppose you are inside a split environment,
and decide to change it to aligned. In TM, you would press ctrl-
option-E, and then just type in the environment name, and both \begin
and \end entries get fixed. Similarly, there is a command to toggle
the presence of a * in the environment, like turning {equation} to
{equation*} and back.
8. Project Outline command. I recently added this command. It offers
you an HTML, clickable outline of your project, much like a table of
contents. Clicking on any section title takes you to the
corresponding section.
9. Special Beamer setting. You can set the language grammar to LaTeX
Beamer, which causes some commands to have particular behavior
related to beamer. For instance, the commands inserting a new \item
also add an overlay specification to it.
10. You can quickly turn a list of of lines into an itemize or
enumerate environment, by selecting them and running the command ctrl-
shift-L.
11. This is a general feature of TextMate that I found worth
mentioning, it's very useful. It has a columnar editing mode, where
you can for instance select a bunch of lines and add the same text at
the beginning of each line. For instance with the three lines:
foo
bar
baz
we could move the caret at the beginning of the first line, then
shift-down twice, and then press option for columnar insertion. Now
typing "\item " adds it to all three lines.
Ok, this is probably enough for now, but I would be happy to answer
any other questions you have about TextMate. And you can usually find
me in the irc channel, (irc://irc.freenode.net/#textmate). It is
populated almost all the time by extremely helpful and great people
(I would in fact say it is one of the great things TM has going for it).
Soryu wrote:
> I take it you didn’t have a look at [MultiMarkdown](http://
> fletcher.freeshell.org/wiki/MultiMarkdown)? It is an extended version
> of Markdown and allows for footnotes in general and bibliography
> support.
Soryu, I looked at it earlier and thought it was only for BBedit and
Moving Type. Your message prompted me to look again and I saw the
TextMate Bundle Readme.md. Thank you for response.
I do not think this will thread properly, so I changed my setting
from digest to individual emails and will be able to reply then and
keep the thread unbroken.
Regards,
Lloyd
Using markdown to write drafts for later conversion to html.
Question 1: Any way to reference bibliographical information while in
the research phase of collecting information so a single
bibliographic reference can be linked to multiple notes?
Question 2: I have the posts delivered in a txt digest. How do I
reply so comment is part of the thread?
Thank you,
Lloyd
In C++ mode, what is the correct method to modify
tmthemes such that function declarations written like :
TF Funk(T1 arg1, T2 arg2)
...and...
TF Funk(
T1 arg1,
T2 arg2,)
...or...
TF
Funk(
T1 arg1,
T2 arg2,)
..are rendered identically? or is that even possible?
(TF above is the function return type, possibly more than one
word to include a storage type. T1/T2 above are argument types,
again maybe augmented by an additional word(s) like const or
default assignments).
TIA,
-Shin
(This is my first time contributing, so please be gentle.)
I've found a problem (annoyance?) with the way that the `Typeset &
View (PDF)` command works in the LaTeX bundle. I set
`TM_LATEX_COMPILER` to `latexmk.pl` so that I don't have to deal with
manually running BibTeX and all that, but I also use packages that
depend on PSTricks and thus don't work with pdfLaTeX.
The problem is that while the command normally looks for the presence
of `\usepackage{pstricks}` and then automatically uses `latex` instead
of `pdflatex` for typesetting if appropriate, this does not happen if
the compiler is set to `latexmk.pl`, since the rc file passed to the
latter says to use `pdflatex`.
I've attached a quick and dirty patch to tell `latexmk.pl` to typeset
to PostScript first if PSTricks is detected, which fixes the problem.
The patch also contains a modification to the PSTricks detection part
to add a search for the following packages which depend on it:
* [xyling] [1]
* [pst-asr] [2]
* [OTtablx] [3]
These are packages that I personally frequently use, and it's annoying
to have to manually do a `\usepackage{pstricks}` just for the sake of
telling TextMate it's being used. There's probably a better way to
detect if *any* package uses PSTricks, but it would be cool if this
could be committed for now. Feel free to consider that a completely
selfish request, though maybe there are a few other linguists who
would appreciate it. :-)
Aaron Jacobs
[1]: http://www.ling.uni-potsdam.de/~rvogel/xyling/
[2]: http://www.math.neu.edu/ling/tex/
[3]: http://wso.williams.edu/~nsanders/OTtablx/
well, I'm glad to see thomas tackle bundleforge ;)
IMO, the most important thing actually is allowing for easy sharing of a
bundle and quick updating of the installed bundles -- ideally just a couple of
mouse clicks. easy bundle setup is trivial, and the rest is if secondary
importance: the focus of the server-side development should thus be on sharing
and updating.
then of course you need to take care of the UI, but I'm sure you know better
than me how to handle that! ;)
three good reasons:
* the GetBundle bundle is a solid foundation;
* in the community there is no shortage of server-side programming skills
and, most of all
* we have ten (10!) weeks without an official release, so that we can tinker
with BundleForge!
so... why don't we start doing something? :P if there's any amount of python
code involved, I'm ready to help!
Hello,
I am a plain textmate user and a complete computer/programming illiterate who
searches advice and input from other, potentially more experienced users of
textmate. When writing latex based papers using the wonderful latex bundle I
frequently want to do a quick and simple calculation. Unfortunately, this often
involves other formats than those provided by the existing math bundle and I
have to invoke an external calculator. Would it be possible to extend the math
bundle to normal calculator capabilities? IE providing
exponential/logarhithmic,
power function, trigonometric functions, numbers in ecponential notation
etc. ?
I don't know whether others miss this feature. I would certainly welcome
such extended functionality or some experienced guidance how to achieve the same
functionality with existing bundles. Using the R bundle I tried to send commands
to R, which I found very slow (and not what I would find useful), and also to
execute R on the selection, but only to the effect of receiving an error
message.
JJ
I am the maintainer of the C Library Bundle. I have removed it from
the repository until a better solution can be found. I apologize for
the trouble I have caused, I was unaware of the current practice of
discussing new bundle before adding them to the main repository and
committed my changes without thinking. It was not my intention to
offend any part of this excellent community.
My heartfelt gratitude to those of you who defended me on this list.
I hope that the C Library bundle (or a better replacement) can be
made available to those who may find it useful. If any of you would
like a copy, please contact me and I will make it available (probably
on my .Mac account).
Sincerely,
Steph