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