This isn't really directly related to TextMate at all, but... :)
I've been doing some automation work to help make me all the more efficient
in various ways. That's generally involving writing up scripts glued to
various places-- and I've recently sort of wanted something like tm_dialog
to integrate with them, entirely outside of TextMate. I mean, I use
tm_dialog with a couple custom bundles for certain purposes but I don't
really "live" in TextMate so much.
Anyone know if there's a way to poke tm_dialog into just doing its thing
/outside/ of TextMate? Or, something else out there which fulfills a similar
use? I saw CocoaDialogs, but what I loved about tm_dialog was that it could
run custom nib's.
Anyhoo. Sorry for the OT post. =)
--Stephen
I caught this on a thread in reddit I think. Watch the animated image:
http://code-and-hacks.blogspot.com/2009/06/stealing-from-padre-for-vim.html
Something like this would be very cool. I know I can do it with find
and replace, but having a command that was aware of the scope you are
in, and only altering the variables you want within that scope, and
narrowed to that specific variable would be super nice.
Not something I would use all the time, but I have a habit of slamming
out some pretty off the top of my head code. To be able to go back,
and give nice logical well thought names, and have those changes not
break my code, would be a great addition.
Anyone cone close to this in TextMate today?
--
Scott * If you contact me off list replace talklists@ with scott@ *
On Jun 22, 2009, at 8:00 AM, textmate-request(a)lists.macromates.com
wrote:
> Personally I'd be in favor of simply using rhino as the js script
> runner. Just need to include it in your bundle of the shared TM
> support folder.
>
> ?Thomas Aylott / subtleGradient
Hi Thomas,
As a JavaScript devotee, I'd love to do this. I've installed Rhino and
got it running in
~/Library/Java/Extensions
per instructions found at
http://peter.michaux.ca/articles/installing-rhino-on-os-x
When I open ~/Library/Application Support/TextMate, however, I just
see the Bundles, Plugins, Pristine Copy, and Themes folders. Do I just
copy Rhino's js.jar file to a new "Extensions" directory?
Presumably I would also need to start a command with a shebang line to
tell TextMate I'm using a particular scripting language, like
#!/usr/bin/env perl
What would be the equivalent path for Rhino's JavaScript?
Thanks in advance for any guidance!
jon
/RR (http://responserequested.com)
______________________________
Still Water--what networks need to thrive.
http://newmedia.umaine.edu/stillwater/
Wherever I can I have switched to git. When switching branches (a
common thing with git), git replaces files 'in place'.
That has some side effects with TM:
- when I switch branches (say from the stable to the development
branch) and forget to close the project window first, TM happily
overwrites the project file. Thus I loose all the changes (eg new
classes added etc). Ideally TM should recognize that the project file
changed and reload it.
- Transitory information: TM seems to store transitory information
(window position or some such) in the project file, thus dirtying my
project. I'd prefer that TM would write that kind of info into a
separate file, so I can chose to track it or not.
How about some TM2 teasers?
Thanks
Gerd
The diff folding of blocks also folds away the first three lines of
the next block, for instance:
diff --git a/app/models/questionnaire.rb b/app/models/questionnaire.rb
index 14284d6..b9ee4f5 100644
--- a/app/models/questionnaire.rb
is also folded away if I fold the block before it.
It seems to me that something is going wrong here.
This diff was generated using 'git diff', but can also be created
using 'diff -u'.
Hope you can fix this.
Cheers,
Samuel
Hi All,
I’ve started using the Create HTML from Document command in the
TextMate bundle, but for small snippets the code it produces is
slightly weighty. I came across a post by Scott Stevenson:
http://theocacao.com/document.page/517
in which he mentioned modifying the command to only add class names
for the scopes that the current theme had styling for, eliminating
most of the unused class names. Unfortunately he hasn’t published his
modifications. How to do this is beyond me, so I wonder if anyone who
has made improvements to this command (to remove unused class names
and/or CSS rules) would care to share. Alternatively if there’s a
tool that would do this please let me know (I couldn’t see suitable
options in HTML Tidy’s config).
Thanks in advance
peace - oli
I have found that "Edit in TextMate" no longer works on 10.4.11 (not
sure about Leopard) with any build after 1498 -- it fails silently
although the key press gets picked up by Key Codes. Re-installing 1498
gets it working again. Anyone else found this?
Hi,
The DokuWiki bundle does highlight <del>foo</del> markups only if they
are at the beginning of a line or have max 2 spaces. I looked into the
bundle, but I can't find why that happens.
Wolfgang
Hello,
Does Textmate's code folding have limitations when a method declaration
is split across lines? Sometimes I have long parameter lists which
necessitate this style:
class MyClass():
def __init__(self,
var1=var1Default,
var2=var2Default,
var3=var3Default,
var4=var4Default,
var5=var5Default,
var6=var6Default,
var7=var7Default,
var8=var8Default):
pass
def method1(self):
pass
def method2(self):
pass
def method3(self):
pass
When I format the __init__() method above across line boundaries, I lose
code folding. Bummer. I know. I could use a work-around idea if this is
the way it is. :)
Cheers!
AZ
Any chance of a intel only bin of textmate? I've noticed a hell of a
difference in pretty much every app bar textmate in snow leopard.
If you could spit out an intel binary that would be great!
Many thanks
-Lawrence
Hi, there
I was doing my test programming in objective-c and i was doing some UI
work with interface builder, but whatever I did in the header file I
added, interface uilder does not recognize it. unless i open everything
in Xcode, and did the same thing, interface builder recognized it
immediately.
Is there anything I can do to get around that?
Cheers
Allen
Will having multiple preference files scoped to the same scope cause
any conflicts?
I've written a custom print command, and want each supported scope to
have a shell Variable,
specifying how to syntax-highlight the file.
-------------------------------------------
Engineers supporting greenpeace: Comparable to Afroamericans who wants
to join the Ku Klux Klan
----------------------------------------
Tommy Nordgren
tommy.nordgren(a)comhem.se
During my "gentle" introduction to Terminal in OSX, I was introduced to perl.
perl #!ed my brain so hard %-|, that without much introduction, I chose to
learn python because I thought it gave so much better ! for the $ (bang for
the buck) without help from hard core programmers. =^D
Now am trying to learn textmate and got stumbled on Ruby.
Sure it sounds a lot of fun to learn a new language.
But is there a way to use UI in python scripts within TM?
May be my question is a bit precocious because I just found a textmate
podcast series on itunes that has 2 podcasts on dialog2 in TM.
Oliver Taylor-2 wrote:
>
> On Jun 1, 2009, at 5:12 PM, MDX-LE wrote:
>
>> Could someone tell me how to install dialog2 available at
>> http://macromates.com/svn/Bundles/branches/WIP/Tools/Dialog2/
>> Dialog2 @
>> macromates.com
>
> I believe Dialog has been renamed UI and is already included in
> TextMate at TextMate.app/Contents/SharedSupport/Support/lib/ui.rb
>
> You can call UI with something like: require ENV['TM_SUPPORT_PATH'] +
> '/lib/ui.rb'
>
>
> _______________________________________________
> textmate mailing list
> textmate(a)lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
>
>
--
View this message in context: http://www.nabble.com/newbie-question..-How-compile-source-code-for-dialog2…
Sent from the textmate users mailing list archive at Nabble.com.
As of late (last month or so), I keep getting this error message every
time I try to run basic bundle operations that use ruby under the
hood. A typical example is "comment out" (apple-slash) (in C++ or
Latex bundle) that replaces the corresponding text section with the
error message.
I read the posts on this problem that date back to 2006 and could not
solve the problem. I am running the latest version of Textmare
(Version 1.5.8 (1498)) and a very recent version of ruby.
'which ruby' followed by Ctrl-r yields:
/usr/local/bin/ruby
ls -lh /usr/local/bin/ruby gives me:
-rwxr-xr-x 1 root wheel 13K Jun 4 15:04 /usr/local/bin/ruby
and /usr/local/bin/ruby -v produces:
ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-darwin9.7.0]
I tried everything I could think of, including reinstalling Textmate,
reinstalling ruby, and setting explicitely the TM_RUBY shell variable
but to no avail.
Thanks in advance for any insight into the cause of this problem.
Xavier
This hit the front page of reddit today, thought it would be good to
let the list know about it. I found it to be a well written piece and
keeps me happy moving forward.
http://blog.macromates.com/2009/working-on-it/
There are a good deal of comments on the blog as well as reddit about
the no pay for version 2 issue. I am more or less in the camp of
"charge for version 2", especially if the lack of a charge is in any
way adding to a lack of motivation to get 2 out the door.
That being said, I do not believe it would be wise to go against a
statement made in the past that version 2 would be a free upgrade.
Remember, there is nothing stopping any of us from just buying version
2 outright when it comes out if that is the direction you want to go in.
This may skew stats a little on new users, versus upgrade users which
could be undesirable. My suggestion, when this day comes, simply make
version two require a checkout process, to get a new serial, and
charge $0.00 to whatever you feel it is worth.
Personally, if version 2 solves a good deal of my needs that are
lacking in version 1, I will be donating one way or another, $100.00
for my copy. I pay my mortgage, dinners, clothes, and the rest of my
life as a result of TextMate, $100.00 is a small price to pay for
making it easier for me to make a living.
Thank you for coming forward with a new plan to keep users updated on
the progress. It has been long overdue, though users are generally
forgiving. I also feel, the most vocal, that make a lot of noise, are
probably a very small percentage of the true count of the user base.
Yay for 2.0 news! Very nice to know at least one person is using 2.0
on a daily basis as well.
Have a nice end of the weekend to you all.
--
Scott * If you contact me off list replace talklists@ with scott@ *
Hi folks. I'm starting to get into javascript, and am having problems
with the Reformat Document (Beautify) command.
I want soft tabs of 2 spaces. I read in a .js file, with the 2 space
indentation, and call the Reformat Document. It alas, does not use
the current 2 space soft tabs, but defaults to 4.
Yet if I edit the file, the auto indent correctly uses the 2 space
indent.
So clearly the tab setting I use (bottom of textmate, tabs menu) is
used by the auto-indent, but apparently not for Reformat Document.
What am I doing wrong?! Is there a textmate/javascript variable or
preference that needs to be set? Should the tabs menu control both
the auto-indent and Reformat?
-- Owen
Hi everyone,
I just upgraded to SnowLeopard GM1 and cmd+left/right no longer seem
to go to the beginning/end of lines. I'm not sure if this is Apple's
fault or TextMate's fault, but other apps that use standard Cocoa
editing controls in GM1 (i.e. TextEdit) seem to work fine with
cmd+left/right. Is anyone else experiencing this?
I know you can use ctrl+a/e to get to the beginning and end of lines,
but I prefer to use the cursor keys.
Thanks,
Ben
I know it's silly but I'd rather keep my serial number that shows I've
been using TM from the early beginning... So I'd prefer a donation
option or some sort of custom upgrade path than buying a brand new
license...
I said it was silly!
On Jun 18, 2009, at 8:00 AM, textmate-request(a)lists.macromates.com
wrote:
> As I have mentioned, there will be nothing preventing any if us from
> ignoring the free upgrade option and just buying version 2 outright.
> No donation button needed.
Hi there!
Is there any way in TextMate to navigate back to the previous cursor
position? In VIM I use "CTRL-O" to go back and "TAB" to go forward in
command mode.
Thanks a lot in advance!
Regards,
Alex
--
View this message in context: http://www.nabble.com/Is-it-possible-to-go-back--tp24074243p24074243.html
Sent from the textmate users mailing list archive at Nabble.com.
Dear All,
Many years ago, in a state of innocence, I hard-coded my LaTeX quotation marks.
> Thus I have text that `looks like this'.
I now find that it would have been MUCH better (if not essential) to have done:
> Thus I have text that \enquote{looks like this}
I can't do a search and replace, because there is no algorithm that
will get the quotes right, but I would like to be able to do the
following:
1. Select the text that needs changing with the mouse
2. Hit a key and have the text changed to the \enquote version.
I feel like this ought to be the sort of thing that TextMate excels
at. How should I do it?
Very best wishes,
Nicholas
Hi all,
I understand from the text accompanying the font "Anonymous Pro"
<http://www.ms-studio.com/FontSales/anonymouspro.html> that we should
expect a new build which will take care of some problems associated with
TTF font files with included bitmaps.
Any prognosis on when to expect this?
Andrew
Hi,
I tried to use
\usepackage{epstopdf}
to convert the eps into pdf files on the fly. But nothing is created
during the compilation process. I only get the error message that the
pdf-file could not be found.
How could I get the "epstopdf" to work?
Thanks
Christian
Dear TextMate folks,
Is there any way to invoke the "Create HTML from Document with line
numbers" command on a source file from the command line? I'd like to
be able to write a shell script to take several source files and
pretty-print them into HTML.
Alternately, is there any other way to automate the process of taking
a number of source files and creating corresponding HTML files (e.g.,
with Applescript)?
Thanks,
Lorin
I have a Ruby code project with several TODO comments in it. When I run the
TODO list command, the bundle displays an empty list.
If I open one of the Ruby source files in the project by itself, the TODO
bundle does list to TODO items it contains. Presumably the Bundle doesn't
like the way I have my project set up. I have *.rb source files in the
standard Ruby gem directory structure (i.e. in lib, test, bin
subdirectories). I manually add all files to the project (i.e. I don't have
Textmate automatically import them.) I have created lib, test, and bin
groups in the project. I have tried highlighting various collections of
items in the sidebar when running the show TODO list command to no avail.
Any suggestions as to what is wrong?
--
W.P. McNeill
http://staff.washington.edu/billmcn/index.shtml
Sent from Seattle, WA, United States
Using the bundle to write my thesis. Fantastic work; thanks for all
who contributed.
Just having one problem. I have my TM_LATEX_MASTER variable set to
"thesismaster.tex", i.e a relative path to the current project
directory. I do this because I sync my thesis folder using Dropbox,
and work on another computer occasionally. This process works for
typeset and view, i.e. it will compile thesismaster.tex even if I am
editing a different file; but watch document will not work, it keeps
complaining that there is no "/" in my file path. If I make the file
path absolute, i.e. /Users/name/Dropbox/thesismaster.tex etc, then it
works. But obviously, won't work on my other computer because I have a
different username. Using ~ doesn't work for the file path in textmate
seemingly.
Anyone have any ideas?
Thanks.
Dear List,
is there a way to change Textmate's internal shortcuts? I was unable
to find infos on it.
Specifically, I'd like to reassign Column Selection to something other
than ALT (it sometimes gets in the way on non-English keyboards).
Best,
Daniel
--
"The good people of the world are washing their cars on their lunch
break"
Daniel Stegmueller
Molukkenstraat 92
6524 NE Nijmegen, The Netherlands
I'm rather new to both Ruby and Interface Builder. So what better thing to
do than to try to write a command in Ruby that uses TextMate::UI.dialog?
Please excuse the newbness of my question. I also apologize for the length
of my post, but I tried to provide as many details as I could.
I've managed to get some basic nib goodness happening, in the form of text
fields both setting values on nib launch, and returning values on nib close.
But I'd like to implement a popup control in my nib, and am at a complete
loss for how to get the values both in and out. It's really just a short
list of options, not even dynamically generated, but it's not working and I
can't find any form of reference or help on Google.
Here's what I've got. Without worrying about the popup control, this works:
TextMate::UI.dialog(:nib => nib, :parameters => {}, :center => true) do
|dialog|
dialog.parameters = {'package' => 'com.mypackage', 'activity' =>
"ActivityClass"}
dialog.wait_for_input do |params|
package = params['package']
activity = params['activity']
puts "package: #{package}"
puts "activity: #{activity}"
end
end
I tried setting up the nib with an Array Controller, and binding Content
Array for Multiple Selection to my parameters Object Controller, with the
Model Key Path set to the parameter name (buildTarget).
This at least didn't cause errors, which was a huge step forward for me, and
even appears to return back the the whole array of objects that I'm passing
in.
Then I figure I need to bind the popup to the array controller, and I've
tried Content, Content Object, Content Values...but I'm really just shooting
in the dark.
If anyone has idea, or could even provide a reference or a working sample of
what I'm trying to do, I would be very grateful.
Hello, I now use BBedit rarely, the times TM just flat out amazes me,
I am a happy camper. There are times I still fire up the old BB, but
it gets less and less. Maybe I am getting too old to remember all
these damn keyboard shortcuts :)
1) Is there an <a href... snippet, I can not find it
2) How can I shift selected text right and left one space at a time?
3) Most other apps allow me to drag and drop a text clipping to the
apps icon, and it will open it. In TM, I have to open the clipping,
copy, then new file, then paste. Any workarounds on this one? Oddly,
I find I used this feature a lot and I am missing it.
4) I am liking soft tabs a lot, as they seem to allow me to align
things better, and when files move to other places, they stay lined up
regardless of the tab stop setting. I was happily working in 4 spaces
per tab stop, and wanted to move to 5, changing it did nothing. I had
to convert spaces to tabs, then make the change. I am not entirely
sure what I did really. Can someone give me a primer or point me to
docs on how this works?
* I am often opening tab separated files, and will need to open tabs
to 40 spaces or so, because the launch time to something like Excel is
just too aggravating, TM seems to work against me a little for this
type of work, suggestions?
5) Given code such as:
$foo = 'bar';
$this = 'that';
$something = 'else';
What is a simple way to get to:
$foo = 'bar';
$this = 'that';
$something = 'else';
6) I have picked up this TM book and printed it out, it is helping me
a lot. There is a section on being able to select some sql, and have
it run and show me the output. I am not understanding how to make
this work. I usually have a db.inc that will contain my user and pass
and db name, so it will be well outside the scope of the file I am in,
unless TM can follow that include reference. To be able to run
arbitrary sql would be huge for me, is there a better walk through? I
am just not getting this one to work. I have not tried to be honest,
since I do not understand the setup at all.
7) Any of you care to share your top #1 little tricks, the one thing
you use all the time, that just makes you happy every time you invoke
it? I mainly work in php, so leaning on things that would be helpful
in that area would be nice. Second would be bash, and lately, for
some odd reason, I have been spending some time in TCL, but not much,
so I am not sure how many tricks in there would benefit me in the long
run.
Thanks all... Hey, when is the next version coming out... just
kidding :)
--
Scott * If you contact me off list replace talklists@ with scott@ *
How do I Select all the characters between double quotes?
When I use Ctrl+Alt+B when the cursor is somewhere inside the double quotes,
it selects all the characters inside the quotes AND the quotes themselves.
Can I change this so that I can restrict selection within the quotes without
the quotes?
--
View this message in context: http://www.nabble.com/Newbie...Select-between-double-quotes-tp23907116p2390…
Sent from the textmate users mailing list archive at Nabble.com.
Having some issues with my eyesight, and although I can make the code any
size I want within TM, I can't seem to figure out how to bump up the size
in the TMCodeBrowser - I even tried adjusting the NIB, but couldn't get both
the text and the line-height bigger- I realize it's a third party plugon -
but I thought it was worth asking..
- sr
Hi, everyone
I am new to textmate, and I am working on a objective-c project, and I
tried to run the project with comand+r but the compiler returns an error
with this message
"xcodebuild: Error: the directory /Users/<myusername> does not contain
an Xcode project."
What do I need to do to run objective-c project in textmate?
Cheers
Allen
I need to do a lot of horrible search and replaces in a very large
project (actually replacing a lot of bibtex labels). I want to do a
search in project, and would like to limit it to particular files
(*.tex ones). The "Find in Project" command is replaced for searching
with excellent plugins like "Grep in project". Does anything similar
exist for search/replace?
Best,
Nicholas
I have an html file containing
<img src="dvipsnames.png"/>
The image renders correctly in the browser and also
in TextMate's builtin preview.
However, if I pipe the same file to Textmate.exit_show_html
the image does not show.
How should I specify the path to the picture so that
Textmate.exit_show_html can find it?
Thanks
Piero
Hi all,
I'm looking to extend the definition of a comment in the textmate
syntax highlighting, but I'm not quite sure how to achieve the effect
I'm after.
I frequently comment out snippets of code by sticking `if (false)
{ ... }` around the code. The other variation I use is to convert an
existing condition into a comment: `if (false && previous condition)
{ ... }`. You don't want to over-use this idiom, but it is useful in
its place.
At the moment TextMate treats this just like normal code (which is
exactly what you'd expect). I was wondering if there was a way to
make TextMate see these patterns as comments. It isn't easy as you
really want to pick the right brace to close the comment. There could
be further blocks of code nested inside the 'comment block'.
This isn't a huge priority for me, but I thought I'd raise it and
see if anyone had any obvious solutions.
Be well,
Will :-}
Hello,
How can I get 10.5.6 to use TextMate as the default application to
open text files instead of using TextEdit?
For example, if I do the following, I'd like the new file to open in
TextMate:
grep 'test' *.c > newfile
open newfile
Currently, this opens in TextEdit (ugh).
For files with an extension, I can get the system to use TextMate for
all files with that extension.
But I'd like something that works automatically for files without
extensions (like "newfile" in the example).
Also while it works to use "get info" to set the "open with"
application for an existing file,
when I do "Change All..." to use TextMate, I get the following error:
An error occurred while changing the application that
open "newfile" because not enough information is
available.
I'm using Version 1.5.8 (1498).
Thanks,
Bill Paxton
The class snippet in the Java bundle (from SVN) is not working as
expected for me. It fails guessing the correct class name from the
file name.
The regex for the class name guessing looks like this in the current snippet:
${TM_FILENAME/(.*?)(\..+)?/(?2:$1:untitled)/}
For a file that is not yet saved I get "class untitled ..." as
expected. However, if I have a Java file TestClass.java the snippet
names the class "untitledTestClass.java" - not what it is ment to be.
In an very old version of the bundle the regex in that snippet was:
${TM_FILENAME/(\w+).*|(.*)/(?1:$1)(?2:ClassName)/}
This one works for me (TM). I hope this is a good pointer to get the
snippet working again in the current bundle.
I also asked myself, whether the regex should be "improved" in such a
way, that it only accepts valid Java identifiers as class names and
otherwise informs the user about it. Nor sure whether this is beyond
the scope of the snippet, so I would like to hear some opinions, befor
I start messing with the regex ;-)
A possible improvement could be like this IMHO:
* A file MyClass.txt results in "class MyClass". As long as the
identifier is valid inside the Java file, the snippet should not care
about inapropriate named files.
* Same goes for file/class names that are against naming conventions
but compile fine anyway: class myclass, class Myclass, etc.
* The regex _should_ complain when file/class name doesn't start with
a Unicode letter, underscore, or currency symbol (dollar, euro, yen
sign). e.g. 1MyClass is not a valid class name (error at compile
time). The snippet could give the user a hint early in the process by
naming the class "class InvalidClassName" or something
* The alphabet for class names _should_ be restricted to Unicode
letters, digets, underscore and currency symbols
* keywords are not allowed as Identifiers but I'd say that's beyond
the scope of the snippet check that too
Last but not least it would be great if the tab triggers were the same
between packages for common snippets like class: python has class-->,
ruby has cla-->, java has cl-->
> { name = 'meta.test';
> match = '^(ATOM|HETATM).*(GLN)';
> captures = {
> 1 = { name = 'keyword.first-match'; };
> 2 = { name = 'string.second-match'; };
> };
> }
>
> This should color each match differently. Please note that there are
> many different ways to do this and may not be the best way for your
> needs.
>
> Do yourself a favor and look up some regex tutorials on the web. They
> will help immensely.
>
> --oliver
captures = {
1 = { name = 'keyword.first-match'; };
2 = { name = 'string.second-match'; };
};
That was the missing link I was looking for.
Thanks Oliver.
Marc
> his indeed works but I do think I need to be a bit more specific.
> Lets look again at the line:
>
> ATOM 14 CA GLN A 2 -27.648 -9.581 30.325 1.00 10.00
>
> My goal is to have both the 'ATOM' string and the 'GLN' string colored
> differently.
>
> Using ^(ATOM|HETATM)\b I can color the ATOM part.
> Using \bGLN\b I can color the GLN part.
>
> The problem is that I only want the GLN part to be colored if the line
> starts with ATOM. In your reply the complete part starting with ATOM
> up to GLN gets colored.
>
> Marc
Dear all,
Thanks for all comments and tips on my "Conditional regex" question.
Nevertheless I'm still a bit of a novice when it deals with regular
expressions.
Although I can see the logic in many of your tips I'm still unable to
put the
bits and pieced together into a functional expression.
Would anyone of you be so kind to provide me with a more elaborate
answer/example?
Thanks,
Marc
>> I believe this is the correct firstLineMatch for AS3:
>> package\s?([\w\.]*)\s?{
>
> You need to add a ^ assertion to the beginning of that at least. And
> you need to make sure it can't get triggered in D, Doxygen, Groovy,
> Java, JavaScript, Processing, Scala. (The languages I quickly scanned
> to see have a package keyword that could get tripped up)
I did some quick research:
- The Java-based languages use a semi-colon, rather than a brace.
- D uses 'module' to define its packages.
- Before I added the firstLineMatch, my files were coming up as
plain-text. If there's a language this pattern conflicts with,
TextMate doesn't know about it out-of-the-box.
Here's a slightly-modified version that caps the ends of the string.
It also makes the { optional (in case someone puts his braces on the
next line):
^package\s?([\w\.]*)\s?{?$
> I used \bAS3\b because comments are as likely to be found on the
> first line as package declarations. So, for anyone who wanted to,
> adding 'AS3' would help TM identify ActionScript 3 over ActionScript
> files.
>
> I've also taken the liberty of adding 'AS3' into the comment header
> for the same reason.
I'd venture a guess that package ... { is the handily the most common
first line of an AS class; however, why don't we use either method?
(^package\s?([\w\.]*)\s?{?$)|(\bAS3\b)
Note: I get this as a first line if I do new AS3 class from template:
package .var.folders.NQ.NQfuLuLLE+aVJJfvkTLNwU+++TI.-Tmp- {
I imagine I'll have plenty to contribute in the way of bundlie-
goodness. I don't personally use a version control system, and I'm
not wed to any of them. Is there any sort of utility that will enable
me to contribute to any of them, so I could fork somebody on github
and somebody else on bitbucket without having to mess with git and hg?
Thanks,
B
Hi,
I've been using TextMate for almost a year now and like it very much.
I'm trying to stay off my mouse and here is one task I think I should be
able to do without using mouse. From time to time, I copy some code to a
new editor window and run. What is the keyboard shortcut to invoke the
file type dropdown in the bottom of the editor?
Thank you.
Cao
Hello everybody,
I use TextMate mainly for LaTex editing.
In LaTex, I often use a package "jurarsp". This package works by way
of running BibTex on a file with the extension *.rsp.aux (okay,
admittedly the," rsp"-part is not the file extension, but you get the
gist, I hope). In TextMate, I set all my LaTex projects to run the
latex, bibtex, etc. commands on a master file. Now I want to create a
custom command that would run bibtex on the master_file.rsp.aux file,
where the "master_file"-part would automatically be the name of the
master file of the current project. The bibtex command already
achieves this by using this simple syntax:
texMate.py bibtex 1
However, simply adding .rsp.aux after the 1 does not work. So I guess
what I am looking for is a command or regular expression that would do
the following: get the name of the current master file without
extension, and add the extension .rsp.aux to this name. Maybe that is
very simpe question I am asking but I promise you that I duly
researched the mailing list and could not find an answer.
Thank you for any suggestions,
JJ
My LaTeX bundle is latexmk.pl to compile LaTeX documents, but I have no idea
where this file is. I have search my entire hard drive. Where
does latexmk.pl reside?
--
W.P. McNeill
http://staff.washington.edu/billmcn/index.shtml
Sent from Seattle, WA, United States
Hello all,
I'm developing a bundle for handling biomolecular structure files (PDB
files). I'm now working on
getting the language description sorted out. In doing this I ran into
a regex problem.
The situation:
A PDB file is essentially a table. One line from such a table can be
as follows:
ATOM 14 CA GLN A 2 -27.648 -9.581 30.325 1.00 10.00
In the language description I would like to use a regular expression
construct that
matched 'GLN' only if the line starts with either 'ATOM' or 'HETATM'.
This seams like
a conditional regular expression but my attempts to implement it at
such have failed
so far.
Can anyone help?
Thanks,
Marc
>> ball.graphics.beginFill // inserts the following grep error into my
>> file:
>> grep: /Users/brenton/Library/Application Support/TextMate/Bundles/
>> ActionScript 3.tmbundle/support/data/completions.txt: No such file or
>> directory
>> ();
>
> This is a bug I need to fix. Could you could let me know if both of
> the following exist for you:
>
> ~/Library/Application Support/TextMate/Bundles/ActionScript 3.tmbundle
> ~/Library/Application Support/TextMate/Pristine Copy/Bundles/
> ActionScript 3.tmbundle
>
Both exist. completions.txt is in Pristine Copy (and Support is
capitalized in the bundle but not in the error. This could cause
problems on case-sensitive file-systems).
>> I've heard great things about TextMate. I'm still yet to find an
>> editor that rivals FlashDevelop on Mac, but I'm hoping to change
>> that. =)
>
> Contributions are most welcome :) Ideally by forking the bundle on
> github:
>
> http://github.com/simongregory/actionscript3-tmbundle/tree/master
Considering, but then I'd need to have Git. =P
Thanks!
Brenton
> Is this what you mean?
>
> ^(ATOM|HETATM).*GLN
>
> This will match any line which starts with either 'ATOM' or 'HETATM',
> followed by any string of arbitrary characters, followed by the string
> 'GLN'.
This indeed works but I do think I need to be a bit more specific.
Lets look again at the line:
ATOM 14 CA GLN A 2 -27.648 -9.581 30.325 1.00 10.00
My goal is to have both the 'ATOM' string and the 'GLN' string colored
differently.
Using ^(ATOM|HETATM)\b I can color the ATOM part.
Using \bGLN\b I can color the GLN part.
The problem is that I only want the GLN part to be colored if the line
starts with ATOM. In your reply the complete part starting with ATOM
up to GLN gets colored.
Marc
Hey guys,
I'm a FlashDevelop user trying to get used to TextMate. I'm trying
Simon's code hinting.
Consider these examples. I'm triggering a completion with opt-esc at
the end of each line:
var ball:Sprite;
ball.graphics.be // completes to
beginFill(color:uint,alpha:Number=1.0);
ball.graphics.beginFill(1, // "No property found"
// It ought to complete to beginFill(1, alpha:Number=1.0);
ball.graphics.beginFill // inserts the following grep error into my
file:
grep: /Users/brenton/Library/Application Support/TextMate/Bundles/
ActionScript 3.tmbundle/support/data/completions.txt: No such file or
directory
();
I've heard great things about TextMate. I'm still yet to find an
editor that rivals FlashDevelop on Mac, but I'm hoping to change
that. =)
Thanks,
Brenton
I've noticed that in ActionScript 3.tmLanguage from Simon Gregory's
AS3 bundle, firstLineMatch is defined to be \bAS3\b. I don't know ANY
ActionScript class file that would match that pattern.
I believe this is the correct firstLineMatch for AS3:
package\s?([\w\.]*)\s?{
I have installed on my MAC TextMade not only bought a license yet, but
it had expired.
After he returned to UPDATE trial license for 30 days.
--
Thiago Avelino | www.avelino.us
icq: 2522219 - jabber: thiagoavelinoster(a)gmail.com
Sent from Sao Paulo, São Paulo, Brazil
Like it or not, I end up having to detract for writing code, and work
with css. I started using Tm for this the other day. Great auto
complete in the css markup, that truly is a time saver.
I see a lot of people use FireBug to open a css file left side,
browser on right, and start seeing in real time their changes. This
is probably the best way to do CSS dev IMO, not refreshing a page and
seeing it happen in real time is a real time saver.
I am not a huge fan of FireFox, or Firebug, and it is not a solid
solution, you can not save, there are some deficiencies.
Apple's Web Inspector tool gets me part there, but you can only edit
CSS in their fields, can not get raw access to a file.
I see in TM I can do a "Show Web Preview", which is pretty nice. It
is not pure real time. Why is this? Why can something like FireBug
do real time updates, but TM is more on a schedule? Not knocking it,
I am genuinely curious about the technical aspects of how this is
working.
The trouble is, I do not want to do inline CSS editing, I want to edit
the references CSS file. If I open a html file, which has a link to
a .css file, make change to the .css file, the .html file that is open
in the web preview is not updated. I have to toggle back to the .html
file, make a space or other change, and then I see the update.
Any other way to trigger the update from the linked file?
TM also only works on local files. If I am working on a remote file
over ssh/ftp all image links will be broken, so something as simple as
<img src="icons/blue.png" /> which would load in a browser just fine,
will be broken in the web preview.
Any suggestions to get out of the change/save/switch/reload cycle that
is going to give me carpal tunnel syndrome soon enough.
I am going to look at CSSEdit as some others have suggested, but I
really do not want to add another huge dev tool to the list of things
I need to learn, and I am already 110% happy with hose TM auto
completes CSS.
--
Scott * If you contact me off list replace talklists@ with scott@ *
Hi,
I've had a look for this in the archives but no mention of it, so
here's a very minor bug I just found:
Basically, TextMate will garble its caret bookmark file attribute
whenever column == 0 && line == 0. When saving any file with the caret
in this position, the resulting attribute always read like this:
com.macromates.caret:
0000 78 9C AB E6 52 00 82 E4 FC 9C D2 DC 3C 05 5B 05 x...R.......<.[.
0010 03 6B 30 3F 27 33 2F 15 C2 AB 05 00 8B 99 08 1D .k0?'3/.........
When saving the file with the caret in any other position, the
attribute saves normally:
com.macromates.caret: {
column = 0;
line = 1;
}
Tested & reproduced using TextMate 1.5.8 (build 1498) on an Intel Core
2 Duo MacBook running OS X 10.5.5 (9F33).
I hope that's enough information to identify the offending code --
keep up the good work, it's a great app!
-- Nick
Hi guys,
I'm a new TM user and I've noticed two very peculiar things about TM.
When you have a file that has only one line break (say a minimized css or js
file) and if you have Soft Wrap enabled, TM will freeze for 10 minutes at a
time! Totally weird. Even a TextEdit works perfectly with something like
that.
Another issue is slow regexp. Whenever I execute regexp on a file that's
about 5K lines, TM freezes for 20+ seconds. I've never seen such a slow
regexp. Am I doing something wrong or is there a preference/switch that I
could set so it doesn't do that?
Thanks for any help!
Dave
Hello, long-time Emacs user / new TextMate user here. I wanted to drop
by and say "hi", say how much I am loving TextMate so far (I thought
nothing would drag me away from Emacs), and discuss a couple of
features that I miss.
Firstly, I was on the whole a very happy user of Emacs, and an article
I wrote describing my Emacs environment for XHTML/CSS/Javascript/PHP
web development was even mentioned in the O'Reilly Emacs book. I'd
tried TextMate a couple of years ago and not liked it, but I tried it
again a few weeks ago and was blown away.
However there are two things that I miss. I have done a Google search
on the mailing list archives and couldn't see much discussion of
either of these, but please appreciate that the mailing list archive
is very large and I'm new here so I apologies in advance if I'm just
raking over things that have been discussed to death.
1. Good parenthesis matching and highlighting
I'm actually genuinely surprised at this. TexMate is very weak in this
area. I should be able to put the cursor between say "})" and have the
two closing parentheses highlighted in different colours and have
their corresponding opening parenthese highlighted in matching colours.
2. The ability to parse DTDs and Schemas for automagic knowledge of
markup languages
This is much more of a tall order, but it is something that PSGML mode
and nXML mode provide in Emacs, and to some extent it is similar to
what AUC-TeX provides for LaTeX editing in Emacs. With PSGML mode and
nXML mode I can open any type of SGML or XML document and as long as
Emacs can find the DTD or the Schema it automatically understands the
language in question: it knows what elements are part of the language,
where they can be inserted, what attributes those elements can have
and even what attribute values they can have. That means that you
don't need to write a MathML mode, an SVG mode, etc. In TextMate I
needed to hand edit an SVG file but there is no SVG bundle, just an
XML one. It was the first time in weeks I had to use Emacs. Similarly
work is progressing rapidly now on HTML 5. Support will have to be
laboriously added to TextMate for this in the absence of something
which simply understood the DTD or Schema. AUC-TeX on Emacs worked in
a similar way, in that it was capable of parsing the LaTeX packages
you were using and automatically extracting the commands and
environments they used and adding them to menus.
As I understand it, the features of TextMate 2.0 are somewhat shrouded
in mystery, but I understand that the underlying engine for language
grammars is being re-written. Does anyone know if the kind of feature
I discussed is likely to be possible in TextMate 2? Maybe it is
already possible in TextMate 1, but no one else has seen a need for it?
Anyway, so far the pros of TextMate are outweighing the cons. There
were a large number of niggles with Emacs that were driving me up the
wall, and so far it has been a joy to switch to TextMate. Better paren
matching seems like something that just needs to be there. A more
intelligent way for dealing with markup languages is highly desirable
from my point of view, and could in the long-term end up being a deal-
breaker. I'd be interested to hear what others think.
Best, Darren
Hey guys, I use textmate a LOT on OS-X Leopard 1.5.6 as my main CLI
text editor via .bash_profile and I edit a lot of files from my
computer with textmate. But I have issues with permissions when
trying to "mate" files which my user does not have permissions to
read. Even if I "sudo mate". Textmate pretends it opened this file
but the file is empty, and when you save it it will ask for
administrative privileges to do so.
Steps to reproduce:
$ echo "this is a test" > testfile
$ sudo chown root testfile
$ sudo chmod 700 testfile
$ sudo mate testfile
Result:
Textmate opens a window called "testfile" but shows nothing in this
file. If you edit this file and hit save, a window pops up which asks
for your credentials to save over this file.
Expected result:
#1 - preferred: uses the above "sudo" permission to pass into and/or
launch textmate under for editing of this file. Which would allow
opening and saving of this file without requiring re-entry of
credentials (annoying).
#2 - secondary/temporary alternative: upon failing opening a file
(like what's happening here) asking the user for credentials which
would allow opening the file. If this fails, do not open the window
because clearly, you don't have permissions for this file anyway, you
shouldn't have an editor window open for it. If their credentials
succeed, use the "open" permission for saving also.
Anyone have a workaround for this, or any ideas? The contact area
said to post here first. I googled a bit and didn't find anything so
I'm starting here.
Cheers!
- Andrew
Hello, I seem to be using command-G often to find something again in
TM. I just realized Safari solves this so well, with a highlight of
the word or phrase I am looking for.
Is this possible in TM?
--
Scott * If you contact me off list replace talklists@ with scott@ *
What is the best approach for supporting a language within a language.
For example, in some languages you can embed inline assembly or C code.
You could extend the bundle for the primary language to support the
syntax and completions of the embed language, but that seems a bit
redundant.
Is there a way to use existing language bundle code within another
bundle? Are there any examples of this?
ref. How to config the internal TM preview browser to run the MAMP PHP
engine?
When running PHP scripts with TM cmd+shift+R run command, the internal TM
preview browser will use the system installed PHP engine. How can I config
the internal TM preview browser to run the MAMP PHP engine instead?
--
View this message in context: http://www.nabble.com/How-to-config-the-internal-TM-preview-browser-to-run-…
Sent from the textmate users mailing list archive at Nabble.com.
I want to create a bundle to support a new text data format. It would be
pretty simple, mostly just syntax highlighting and comment character
definition. Is there manual or tutorial on creating bundles? I couldn't
find one on the Textmate website.
Thanks.
--
W.P. McNeill
http://staff.washington.edu/billmcn/index.shtml
Hello, usually I will option draw a box around some text, press
control-Q and it wraps it with hard line breaks. Handy.
I would like to define this in a more exact way, and set up a bundle
that does the same thing, to selected text, at say, 80 chars wide.
Not right on the 80 of course, take into account in the same way
control-Q does, where a word ends.
Thanks.
--
Scott * If you contact me off list replace talklists@ with scott@ *
I am working on mocking up a site, and I wanted to change the some-
site.com link to example.com using the Bundle Editor. I can highlight
the command, and see that it's there and what the shortcut is, but I
can't seem to edit it at all. (I don't have this problem with other
snippets and bundles and so forth.)
How do you do this?
Thanks,
Walter
Hello, please would you unsubscribe me from the mailing list?
I've tried this process using the form on your web page but I am still
getting the newsletters.
Thanks,
Alistair
--------------------------------------------------------------------------
Alistair Colling
Interactive Developer
FPP Brand Communications (Newcastle upon Tyne)
The Courtyard
Dinsdale Place
Sandyford
Newcastle upon Tyne NE2 1BD
Telephone: +44 (0)191 261 6662
Fax: +44 (0)191 233 2511
This transmission is confidential and intended solely for the person or organisation to whom it is addressed.
It may contain privileged and confidential information. If you are not the intended recipient, you should not
copy, distribute or take any action in reliance on it. If you have received this transmission in error, please
notify the sender at the e-mail address above.
FPP Design Limited. Reg. Office: The Courtyard, Dinsdale Place, Sandyford, Newcastle upon Tyne NE2 1BD.
Registered Number 3775564. Registered in England and Wales. Visit our website at http://www.fpp.net/
Very nice, thanks!
baptiste
1. Re: highlight (JiHO)
Message: 1
Date: Sun, 10 May 2009 19:52:30 -0400
From: JiHO <jo.lists(a)gmail.com>
Subject: [TxMt] Re: highlight
To: TextMate users <textmate(a)lists.macromates.com>
Message-ID: <91EB0E2E-0293-4B78-9776-04D854EC3710(a)gmail.com>
Content-Type: text/plain; charset="us-ascii"
On 2009-May-09 , at 15:35 , baptiste auguie wrote:
> Thanks for the two replies. highlight is a cool program I found here,
>
> http://www.andre-simon.de/doku/highlight/en/highlight_io.html
>
> I made an attempt to create a TM command for this, and it seems to
> work without the need for a temp directory,
>
> highlight -H --syntax R --inline-css --fragment --enclose-pre
> --style print `$TM_SELECTED_TEXT` | pbcopy
>
> It seems to work, albeit with some warning (seems to be attempting
> at interpreting the code of TM_SELECTED_TEXT) but since I simply
> discard the output and use the clipboard it's fine for my purpose.
>
> It's a small world JiHO! --- I'm hoping to use this shortcut to post
> R code on the new ggplot Wiki (http://ggplot2.wik.is).
OK, then I tried to link to some pasties and it does not work on this
wiki.
But indeed highlight seems to be nice and is very flexible in its
input. In particular it accepts input from stdin (where TM pipe your
text). So I installed it from macports but I don't have all the
options you have (--inlince-css, --enclose-pre etc.) because the
version there is too old.
Still a simple, one language (R here) bundle command could be:
highlight -X -l --include-style --syntax=R --style=print
input set to selection or document
output set to new document (or discard and add "| pbcopy" at the end
of the command).
This feeds the curent selection or document to highlight directly, not
need for the $TM_SELECTED_TEXT (and this solves your problems caused
by shell expansion I guess).
But creating a temporary file might still be desirable: if you create
it with the same extension as the current file, highlight will be able
to recognize the language and your bundle command will work for any
language.
Attached is my bundle item (currently set to display the HTML, pipe to
pbcopy if you want to copy). Here is the code:
# Extract file extension
extension=$(echo "$TM_FILEPATH" | awk -F "." {'print $NF'})
# Create a unique temporary file
tmpname=$(mktemp /tmp/TMtemp.XXXX)
tmpfile="$tmpname.$extension"
# Capture TM selection/Document
cat > $tmpfile
# Feed that to highlight
highlight --input="$tmpfile" -X -l --include-style --doc-title=$
(basename "$TM_FILEPATH") --style="vim-dark"
Hi all,
Thanks for the two replies. highlight is a cool program I found here,
http://www.andre-simon.de/doku/highlight/en/highlight_io.html
I made an attempt to create a TM command for this, and it seems to work without the need for a temp directory,
highlight -H --syntax R --inline-css --fragment --enclose-pre --style print `$TM_SELECTED_TEXT` | pbcopy
It seems to work, albeit with some warning (seems to be attempting at interpreting the code of TM_SELECTED_TEXT) but since I simply discard the output and use the clipboard it's fine for my purpose.
It's a small world JiHO! --- I'm hoping to use this shortcut to post R code on the new ggplot Wiki (http://ggplot2.wik.is).
Cheers,
baptiste
----------------------------------------------------------------------
Message: 1
Date: Fri, 8 May 2009 10:08:01 -0400
From: JiHO <jo.lists(a)gmail.com>
Subject: [TxMt] Re: hightlight macro
To: TextMate users <textmate(a)lists.macromates.com>
Message-ID: <7ADEBAA5-A929-4FB6-9782-8C4CEA7BE126(a)gmail.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
On 2009-May-07 , at 05:21 , baptiste auguie wrote:
> I'm using a command line to create a html snippet with embedded css
> to post on a Wiki. At the moment I run,
>
> highlight test.r -H --inline-css --fragment --enclose-pre --
> style print | pbcopy
>
> on the command line. I'd like to create a macro in TM so that I can
> get the same processing applied to selected text in a document. I've
> never written any TM macro and I don't know Ruby (or bash for that
> matter). Would you be kind enough to help me out?
Apparently highlight (is that a command of your creation or something
else? It would help to know a little more about it) takes a file as
argument. So the only ways to have it work on a selection are:
1- to modify highlight to accept either a file or some raw text from
standard input (or only raw text)
2- copy the current selection to a temporary document and feed that to
highlight
If 1, then you can use highlight with no argument and set TM to feed
it selection or document. If the new version can only be made to
accept raw text you can still use it independently this way:
cat doc.r | highlight -H -...
If 2, the command would look like
# create a temporary document (cleanly)
tmpDoc=$(mktemp)
# fill it with TM input (selection or doc)
cat > $tmpDoc
# feed it to highlight
highlight $tmpDoc -H -...
Otherwise, depending on the purpose of these snippets, there are
plenty of online paste boards with syntax highlighting support for R,
and one is accessible from textmate (Paste selection online). You get
something like this:
http://pastie.textmate.org/private/epwkcdngtzljzkf1zxg
with a link you can embed in other pages (and I guess also in a wiki).
I am also pretty sure I saw some that could output the html that is
displayed (with the colors etc.).
Hop that helps.
JiHO
---
http://jo.irisson.free.fr/
Hey guys,
After the HTML bundle last week, it's time for my CSS bundle to get
the "separate bundle" treatment... It won't touch the default CSS
bundle anymore and it's called mCSS... Although this bundle is
anything BUT minimal... I had to stick so many tab triggers in there
that I'm going to dream about it tonight I think ;)
Anyway, it's over there:
http://minimaldesign.net/articles/read/textmate-css-bundle-v.1.5
Let me know if there's anything else you'd like to see in there...
Thanks!
- Yann
On May 8, 2009, at 11:12 AM, Gerd Knops wrote:
> It's the dashes... ATM the bundle tries to find whatever word TM gives
> it, it ignores the selection.
>
> As a test, add '-' to the list of "Word Characters" (TextMate/
> Preferences, Text Editing tab). That should cause 'get-bottom-up-
> codelets' to be indicated as word, which the bundle should find.
That does the trick, thanks! And it will save me from having to select
the whole word for searching.
>> BTW is there source available for tmctags?
>>
> It's just a perl script...
Oh, yes, I see... I guess I just had too much whizzing around when I
visited the Support/bin directory.
Nice package!
Best,
Charles
Dear list,
I'm using a command line to create a html snippet with embedded css to post on a Wiki. At the moment I run,
highlight test.r -H --inline-css --fragment --enclose-pre --style print | pbcopy
on the command line. I'd like to create a macro in TM so that I can get the same processing applied to selected text in a document. I've never written any TM macro and I don't know Ruby (or bash for that matter). Would you be kind enough to help me out?
Thanks,
baptiste
Hi guys!
I've been using TextMate for a while (still a bit of a newbie though),
especially for Latex and I really LOVE everything about it. However, after
making a clean install due to a new MacBook I'm having some problems with
cleaning up the aux files that is created when I press cmd-R.
As I remember from my previous installation - all the aux files were deleted
when I clicked "clean up" in the html-window (that is displayed after cmd-R)
or by hitting ctrl-alt-delete, but now nothing happens - all files are still
in the folder where the .latex and .bib files are and the html-window
displays "Found 0 errors, and 0 warnings in 0 runs" after "clean up".
Have I messed something up or is there some issues with the "trash aux
files" command? Please help as it's so frustrating to have to manually
delete these files when, for instance, I've made some changes in the
.bib-file and need to include this new citation - but it only results in a
[?] until I manually delete the aux files and re-run "Typeset and view".
My installation:
TextMate v. 1.5.8 (1498)
Latex Bundle rev. 11510
MacTex 2008 with Skim as my selected viewer
Thanks so much for your help!!
/AM
Ps. Some time ago I read in some forum (maybe here I don't remember, sorry)
that the issue with "umlauts" in labels for sections (etc.) would be
addressed by changing the umlauts to the "normal" character without the
umlaut or a "_"-character as other special characters. Any news on this?
--
View this message in context: http://www.nabble.com/Latex---problem-with-%22clean-aux-files%22---nothing-…
Sent from the textmate users mailing list archive at Nabble.com.
Hi
because a reason I can't understand, Wiki in spanish is using urls
with funny chars like
http://es.wikipedia.org/wiki/Programación_dinámica_(computación)
this only gives you problems, and TextMate is no an exception. TM is
unable to jump (Cmd-F1) to them.
-- Juan Falgueras
Are there any TextMate users working on Automake, Autoconf, and TADS3
grammar bundles?
-----------------------------------
See the amazing new SF reel: Invasion of the man eating cucumbers from
outer space.
On congratulations for a fantastic parody, the producer replies :
"What parody?"
Tommy Nordgren
tommy.nordgren(a)comhem.se
On May 4, 2009, at 8:00 AM, textmate-request(a)lists.macromates.com wrote:
> Does the presence of "HTML.tmbundle" just mean that I made some
> customization to it, and removing it will restore TM to the default in
> that particular bundle? What do you suggest so I am using your new
> bundle, and the default TM one?
That's right. To get a clean version, just removing HTML and mHTML in
both folders (if you have one in both folders) and restarting should
do the trick.
> Looking at your bundle, looks nice, thank you.
> Take the <br /> for example, I made my own at some point in the past,
> using this:
> <br${TM_XHTML}>
>
> This allows the XHTML closing style to be preference defined, not hard
> coded in. What do you think about applying that to all applicable
> cases?
Sounds interesting, but to be honest, I do everything in XHTML, so I
probably won't spend the time to get the bundle to be both HTML/XHTML
ready... unless I go back to HTML for HTML 5, which is not impossible :)
> I see perhaps some left over testing items, there are "cite copy" and
> "code copy", not sure if those are intentional.
This is actually on purpose and is there to add a extra tab trigger
(as far as I know, you can't add to different tab triggers to a single
snippet...). The idea was that, although the bundle works by typing
the 3 first letter of an element for all tab triggers, I'm guessing,
for four letter words it might be more intuitive to be able to type
"code" than "cod" so both are available... hope that makes sense.
Thanks!
Hi guys,
I've updated my HTML bundle to be it's own bundle so it doesn't
overwrite the default's HTML bundle anymore. I also rewrote the
commands in Ruby to make it easier to read+ customized and improved
snippets. Info there:
http://minimaldesign.net/articles/read/textmate-html-bundle-v.1.5
Let me know if you manage to break anything ;) Or if you'd like to see
any additions...
PS: I'll be updating my CSS bundle to be its own bundle too, soon...
But there are so many snippets in that one, it'll take a little
longer...
Hi,
call it good or bad, I'm using soft tabs (spaces) for just about
everything. The shop I work in doesn't even allow tabs in (most) source
files. Soft tabs in TextMate work great – except that I really need hard
tabs (just like everyone else) in Makefiles. So, what I currently keep
doing is to copy&paste a tab character from some other place. I'd really
love to tell TextMate to use hard tabs for everything in scope of the
Makefile bundle, without changing my global setting. Is that possible?
(If yes, why is it not active in the Makefile bundle?) Will it be
possible in 2.0?
Christopher
Hello,
As matlab code can't get compiled, I'm assuming you talk about running
matlab code from textmate.
I implemented an integration between MATLAB and Textmate, which allows
to run a script or the current cell in matlab when you are in
textmate. It only works when matlab runs in the terminal, as there is
NO WAY to communicate with the matlab java/X11 GUI.
Because the terminal is quite awful to use in interactive mode (no
mouse, different shortcuts, no syntax highlighting, problem with long
lines), I'm working on a matlab console bundle too, which works in a
similar way as the R-Console Bundle. I can communicate with matlab
both ways now. It's possible send commands to matlab and receive
matlab's output.
I sent an email to Thomas to discuss the integration of this in the
matlab bundle, but he seems busy now.
If you want more information about what I did, want to try, or better
if you want to help with this project (I'm quite bad at ruby, shell
scripts and other needed languages), send me an email.
Pierre
When editing comments in TextMate, I frequently use the Reformat
Selection text routine to fix paragraphs who's lines have gone past 80
characters long (my Wrap Column). Unfortunately this has some
unexpected side-effects in Java, which along with nicely reformatting
my selected comments (respecting the *s in the beginning of the line
even!) adds redundant starting and ending comments: /* and */. Why
does this happen? What can I do to fix this?
To reproduce, select a few lines inside a javadoc-formatted Java
comment (/** * */), and hit ^Q.
Thanks,
--
Elliot
Hello all, I'm trying to make use of some external refactoring tools
for Haskell, and I've written the following script:
#!/usr/local/bin/ runghc
import System.Cmd
where
main = do
c <- getContents
system ("/Users/ian/.cabal/bin/pointfree \"" ++ c ++ "\"")
Here's the problem:
Whenever I try to run the script, the output I get says "interpreter
failed: Permission denied". Now, I'm pretty sure that the script
execution fails even without executing the local program pointfree.
Any ideas what I'm doing wrong?
-Ian Duncan
Hello,
I have read this page
http://blog.macromates.com/2005/handling-encodings-utf-8/ and I use
UTF8 wherever I can. But, sometimes I have to open czech text-files,
made on MS Windows (not made by me), that are, almost without
exception, in "Central European (Windows Latin)", or, Windows 1250 (
http://en.wikipedia.org/wiki/Windows-1250 ).
ISO-8859-1 is different from Windows-1250, some of the czech letters
appear weird - for example, http://en.wikipedia.org/wiki/Ø instead of
http://en.wikipedia.org/wiki/Ř
Right now, when I get file like that, I need to
1) open it in TextMate, only to find out I cannot open it
2) open TextEdit, open the file in TextEdit, re-save it in UTF8
3) open it in TextMate again, swearing on all sides
I personally find this procedure stupid and I would love to have the
opportunity to, at least, open the file in Windows-1250 and convert it
to UTF8 and not having to start another text editor.
Karel Bilek
Hi,
I recently opened one of my old Java files and remembered I used some
snippet to create a method and automatically create a header comment
and javadoc comment like this:
/**
* doSteps
*
* calculate n steps each lasting 0.005s
*
* @param steps number of steps each of which accounts for
0.005s
*/
public void doSteps(int steps) {
//do smth...;
}
I can't find this anywhere anymore. Can anyone help me out here? The
snippet automatically jumped to the return type, then the function
name (also inserting it at the top in the comment), then to the @param
thingy to enter text and finally to the function itself to write some
code. At least that's how I think it went. Might be that I idealize a
bit from bad memory :P
Does someone know of a snippet like this? I already searched the web
but couldn't find something. (Yeah I also searched the Javadoc
bundle... but it isn't there :( )
Maybe I was just dreaming of this snippet :(
Thanks,
Thomas Krajacic
Hi,
I'm sure that question must have been asked over and over, but I
couldn't find any similar question, so please forgive my ignorance.
I'm just wondering if there's any simple shortcut to navigate between
blocks. Suppose I'm in the middle of a big block, I want to go to the
end of it, or to the beginning. What's I'm currently doing is either
an F1 to fold the block, if I want to go outside (right after or right
before), but which is not ideal since I don't always want to actually
make the block invisible, or I use the Cmd-Shift-T to open the go to
symbol panel, then type Enter if I want to go to the beginning of the
block, or Down then Enter if I want to go to the end of the block. But
that's too many strikes.
Is there any direct shortcut for what I want - or how can I define
one? What are your habits on that topic? (I particularly use that when
writing LaTeX documents.)
Thanks,
enas
I think I got misunderstood by JiHo : I want to avoid the matlab GUI
as much as possible. The matlab-console I developed is an
implementation of the matlab console IN textmate.
For what I described I use a very similar command as JiHo, except that
I tend to use the cell mode (which Thomas added in the last version of
the bundle). And in this cases because the commands that are sent to
the terminal can be long, I use an temporary m-file (called cellrunner
in the following code).
I've came up with a better applescript thought, which is more robust
when you have several terminal windows or tabs running :
osascript<<END
tell application "Terminal"
set termwin to id of windows
set nwin to count of termwin
repeat with i from 1 to nwin
set ntab to number of tab of window i
repeat with j from 1 to ntab
set pr to processes of tab j of window i
set npr to count of pr
set runsmatlab to false
repeat with k from 1 to npr
set runsmatlab to "MATLAB" = item k of pr
end repeat
if runsmatlab then
set selected of tab j of window i to true
do script with command "cellrunner" in tab j of window i
end if
end repeat
end repeat
end tell
tell application "MATLAB" to activate
END
Pierre
Hi,
So I use Find in Project to search code and find various sources when
I've pulled down say.. a set of Java classes for an app. Once I find
a file I can click the file in the list of found items and it'll load
in the main window. But what I'd like is to also show that file in
the Project Drawer (since it's hidden somewhere in the hierarchy of
files).
Is this possible?
--
David Orriss Jr.
My blog: http://www.codethought.com/blog
Howdy!
How do I have to set up TextMate for using MATLAB? I have installed the MATLAB Bundle of Thomas Kjosmoen.
http://kjosmoen.org/matlab
Is it now possible to compile MATLAB code directly out of TextMate without opening the code in the MATLAB editor?
Thanks!
Hi
We all know TextMate doesn't have splitting windows. Do people who
want to have splitting windows just right-click the file to open a new
window?
I'd like to ask this question especially for hardcore TDD/BDD'er, who
develop on Rails. I know I can switch between the implementation file
and the test file with one key combination.
Anyway, I'm truly hoping that Allan is winning the ADC this year with
the upcoming version!
Takaaki
--
Takaaki Kato
http://samuraicoder.net
I just recently noticed that if I go to...File...New From Template, Ruby is
no longer present. How do I add it or other templates (such RSpec) into
this sub-menu?
Brad
I wrote a PHP Snippet that outputs some FirePHP-based debugging information.
fb(\$${1:variable}, '${2:function} \$${1:label}');
I would like to replace ${2:function} with something that
automatically puts in the current function or class::method (if
available);
I notice in the status bar at the bottom of the editor window (to the
right of the Tab Size), there is a "Symbol Popup" menu. So it seems
like the information I need is available. Is there a variable in
TextMate that I can slap into the snippet? A $TM_CURRENT_SYMBOL or
something?
Thanks for your help!
Regards,
Daniel Royer
Dear list,
after some initial discussion on the R-SIG-Mac-list I decided to send
my question to this list as well ...:
I encountered a problem in the combination of the SWeave and the LaTeX
bundle: when I start "Sweave, typeset & View", the .Rnw-file is
processed, but the log window shows "Error: PDF file not written to
disk" and the tex-file is not processed.
However, the sweaving was successful, as a valid .tex-file is in the
same folder which can be typesetted by latex without problem.
So, in general it works, I just want to avoid the extra step of
opening the .tex-file and would like to see my pdf directly opened
from SWeave-Bundle.
Some ideas already have been posted on the R-SIG-Mac-list, but they
didn't work for me:
http://article.gmane.org/gmane.comp.lang.r.mac/3953/match=sweave+pdf+file+n…
Did anyone encounter the same problem / any suggestions for solutions?
Best regards,
Felix
Hello. When TM is looking at a file that was opened as a result of a
3rd party ftp application, is there any way to get to the full url
path to the remote server?
In BBedit, I would see sftp://foo@example.com/example.com/files/some_place/test.php
I would like to be able to access that url above, in each file, in
order to make a bundle. The idea is, that if I can get to that, I can
parse it, and inspire TM to open a browser and run the current code I
am working on, at the correct url.
Currently, I have a comment line at the top of a file, which is read
and parsed, and then passed to open in a bundle, which will open in
Safari for me. It sort of works around some of the issues I have with
the refresh running browsers, as it only refreshes the one page.
I would love to be able to not have to write the comment url, and have
it be more automatic. The only path I can see to access in TM now, is
one that points back to a tmp location, which is local, and not remote.
--
Scott * If you contact me off list replace talklists@ with scott@ *
Recently I changed the keyboard shortcut for the Go To Fixture, Go To... etc
commands in the Ruby On Rails bundle.
I picked command-tilda as it's easy and not used by Text Mate.
Turns out Mac OS X uses it launch Front Row however.
At that point, those commands simply *disappeared* from the Ruby On Rails
bundle.
I've tried using the Bundles > Bundle Editor > Reload Bundles command but it
does not bring them back.
At this point, I'm considering:
# Deleting and reinstalling TextMate
# Manually recreating the missing commands, presumably by copy-pasting code
like this
(http://svn.textmate.org/trunk/Bundles/Ruby%20on%20Rails.tmbundle/Commands/G…)
into the Bundle Editor
Both seem doable but time-consuming and with no guarantee of success.
Any suggestions for a quicker fix?
Many thanks in advance,
Steven.
--
View this message in context: http://www.nabble.com/Restoring-a-Bundle-becausing-of-vanishing-commands-tp…
Sent from the textmate users mailing list archive at Nabble.com.
This is probably a stupid question, but how do I
revert/undo a change that I made to a Theme?
For example, I opened the Preferences menu, then went to
"Fonts and Colors", and messed around with shading, etc.
I clicked on "Selection", because I wanted to darken the color
of selected text. However, I did something to mess it up.
There's no "Cancel" button or "Undo" menu item, so what do
I do if I don't want to save my changes to the colors?
I suspect that the best idea would be to copy the color
theme before editing, but that seems sort of kludgy.
Thanks,
--Nate
I am having a new problem with a very simple thing that used to work:
>>> In TextMate, I have a test file test.rb
require 'rubygems'
require 'shoulda'
>>> After making sure that the textmate recognizes this as a Ruby source file, I do:
command-R
>>> I get this output:
LoadError: no such file to load — shoulda
method gem_original_require in custom_require.rb at line 27
method require in custom_require.rb at line 27
at top level in untitled.rb at line 2
copy output
Program exited with code #1 after 0.68 seconds.
>> Now, I go to the shell and do:
ruby test.rb
>> And it works like a champ. Checking environment:
$ echo $TM_RUBY
/opt/local/bin/ruby
$ which ruby
/opt/local/bin/ruby
$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.2
- RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [powerpc-darwin9]
- INSTALLATION DIRECTORY: /opt/local/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /opt/local/bin/ruby
- EXECUTABLE DIRECTORY: /opt/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- powerpc-darwin-9
- GEM PATHS:
- /opt/local/lib/ruby/gems/1.8
- /Users/pitosalas/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gems.rubyforge.org/", "http://gems.github.com"]
- REMOTE SOURCES:
- http://gems.rubyforge.org/
- http://gems.github.com
>> You can see I suspect something with environment variables. I have been using Textmate this way forever without a problem. I am now logging into a new account on the same computer. I even re-installed TextMate.
I am stumped. I hope someone sees what I am missing :)
Thanks,
Pito
Hi,
I noticed a problem with non-antialiased "programming" fonts being rendered
in a strange way in my TextMate 1.5.8 (1498). Some letters will look wrong
and blend with neighbouring characters.
Example screenshot for Consolas (11pt) with highlighted problem zones, note
the distorted dot on the i and the blending e and {:
http://www.quicksnapper.com/ballaschk/image/consolas-11pt/
Example screenshot for Pragmata (11pt) with highlighted problem zones, note
the distorted "g", "w" and "s":
http://www.quicksnapper.com/ballaschk/image/pragmata-11pt/
Monaco looks great, but makes it too hard for me to differentiate between
certain characters:
http://www.quicksnapper.com/ballaschk/image/monaco-9pt
I did not test with Profont or other small-size optimized fonts, but will do
soon. Do you experience the same problems? Any hints how to correct it?
Cheers
Martin
--
View this message in context: http://www.nabble.com/Font-rendering-with-antialiasing-turned-off-tp2315196…
Sent from the textmate users mailing list archive at Nabble.com.
Every time I creates a tex file and compile it it generates me a bunch of
files (.aux etc etc) in the same directory.
Now I know that it's not a bundle's fault, doing it from the command line is
the same, but is there a way to make the pdflatex command put them somewhere
else (a tmp directory)?
--
View this message in context: http://www.nabble.com/Latex-bundle-and-too-many-files-tp23074031p23074031.h…
Sent from the textmate users mailing list archive at Nabble.com.
Thanks, Allan. Worked like a charm!
Regards,
Daniel Royer
On Thu, Apr 16, 2009 at 8:00 AM, Allan Odgaard wrote:
>> [...]
>> I notice in the status bar at the bottom of the editor window (to the
>> right of the Tab Size), there is a "Symbol Popup" menu. So it seems
>> like the information I need is available [...]
>
> It is not, but oft requested. The symbol in the status bar is not
> necessarily the ?current function?, it is just the first thing matched
> via some scope selector (optionally passed through some regexps) above
> the caret.
>
> What you can do is make a command that takes stdin as input and then
> do something like: SYMBOL=$(head -n$TM_LINE_NUMBER|grep ?function
> prototype regexp?|tail -n1). Have the command ?insert as snippet? and
> construct the snippet from the previous.
>
> I am adding an ?expose current symbol? to the to-do, since it seems a
> lot want this and don?t care that it might not be 100% correct (and
> whatever hand-roled solution they make is probably even less
> correct ;) ).
I have two Macs running TextMate 1.5.8. I have some personal bundles
that I want to keep in sync between the two machines. I tried this:
On machine A, modify a bundle and quit the Bundle Editor to save the
bundle.
On machine A, reopen the Bundle Editor and drag the bundle to my
Desktop.
On machine A, scp -r the bundle directory from my Desktop to machine
B, into my Desktop.
On machine B, double-click the bundle. TextMate says "do you want to
update?".
On machine B, I click "yes". It seems to work.
Yet the bundle on machine B doesn't have the changes that I made while
I was on machine A.
Any suggestions appreciated. Note that I have MobileMe, and would
love to cut down on the manual work that the above (unsuccessful)
approach requires.
-- Pete
Not sure if this is a bug or feature. I've found that the text
selection behavior upon double-clicking, then dragging, is way too
"greedy" of characters. Is this something that can be fixed, or
overrridden?
For instance, let's say you double click on the 'doQueryParams' in
this snippet of PHP:
doQueryParams($query, array() );
.... then drag to the right. Let's say that I want to select up to
and including the comma after "$query". Well, I can't - the selection
jumps to the end of "array".
Other editors like SubEthaEdit or TextEdit do what I would expect --
the non-alpha characters are selected individually, so I can select
the comma, the space, and then if I continue on it will select the
whole word 'array', then each parenthesis, etc.
Is it just me that's driven absolutely mad by this? It really slows
me down......
Dan
--
Dan Wood
Karelia Software — Sandvox for the Mac : http://www.karelia.com/
Follow me on Twitter: http://twitter.com/danwoodhttp://twitter.com/karelia
It is the habit of every aggressor nation to claim that it is acting
on the defensive. — Jawaharlal Nehru
Even though I'm #1498 I have to admit I'm quite a bundle newbie. One
of the issues that I recently came across was that the Shoulda Bundle
was not recognizing "context" and "should" blocks within test classes.
This is important, because the symbol navigation is extremely useful
for these.
At first I thought there was maybe a conflict or something else going
on, but when I moved these blocks into the root scope of the file they
worked. I realized that the shoulda language was built on
source.ruby.rails, which meant it wasn't being picked up inside
source.ruby.rails.meta.rails.unit_test or
source.ruby.rails.meta.rails.functional_test.
I solved this problem by adding:
{ include = 'source.ruby.rails.shoulda'; },
to those definitions within the Rails bundle.
However I feel dirty. First, because I'm hacking the Rails bundle to
make another bundle work. This seems like it will make upgrading
complicated since I don't imagine there is any kind of granularity
with language updates. Secondly, it feels wrong for the Rails bundle
to define an include of a language that is descended from the Rails
bundle itself. Apparently TextMate handles this properly because it
works fine, but it was a red flag for me. So I guess my question is
am I doing this wrong? What do the bundle gurus have to say on the
matter?
--
Gabe da Silveira
http://darwinweb.net
The thing that caused the problem was -- "Edit each line in selection."
I was able to edit the file without any problem by just doing a search and
replace. I don't know specifically how edit each line in selection works,
but I suspect that it involves quite a few Allocs, Like one for each line,
possibly quite a few more for each line. I was just putting out a warning
that you shouldn't edit the entire file with "Edit each line in selection".
It could have just been my computer, but I suspect that I was abusing this
wonderful feature into something Allan didn't imagine it to be used to do,
because as an expert in line management he would never have gone down the
path I did. I was just appending ",END_NOTE" to each line.
This happened on a Dual Xeon Core 2 Duo Mac Pro with 1GB of ram ( inherited
from our graphics guy who doesn't want to learn FCP).
In my html files I use root-relative paths such as:
<link rel="stylesheet" href="/css/screen.css" type="text/css" />
The Web Preview does not work even though the path is also relative to
the top level of the project, I have to use paths relative to the
current document.
<link rel="stylesheet" href="css/screen.css" type="text/css" />
Is there some way to get Web Preview to work with root-relative paths
for html development?
-Gianni
Hi. Some questions w.r.t. getting themes to work as I prefer:
Firstly, the manual says [1] that "markup.heading.2.html" can be used
in a language grammar. And then subsequently one may use that as a
selector in a Theme. I have tried to use the mentioned selector in a
theme made entirely from scratch, but whatever color I add for that
selector, nothing happens to the styling of the <h2> tags or anything.
Do I need to update the language grammar for HTML in order to get it to
work or what?
Secondly, Brilliance Black seems to be one of the richest themes
arround, with colors for many languages. It has a HTML section. And
below that it has a "markup" section. The markup selection has e.g.
"markup.heading" and "markup.bold". I assumed that "markup.bold" would
turn <b>text/</b> into bold face. But, no - doesn't happen. I have
misunderstood something?
Thirdly: Ideally, what I would like to see was a theme were the /text/
changed styling, more than the tags/code around the text. But TextMate
appears to only be able to have one color for text, namely that of the
"Foreground" color. Am I right? I hope not. Put on an edge, I would much
rather have a permant color for tags etc, but differing colors for text,
depending of the context. Can TextMate do this? Or may I just forget it
at once?
(I have used TextMate for a 2-3 years, but I only used the installed
themes. And there are many things with it that I have not taken
advantage of.)
[1] http://manual.macromates.com/en/language_grammars
Best regards,
Leif Halvard Silli,
Oslo
Greetings TextMate mailing list.
Forgive me if this is child's play, i searched the list archives
thoroughly before posting.
I am trying (for many hours now) to open a .nib file created in
Interface Builder using the "$DIALOG" command from a shell script. My
general objective is identical to the screencast Allan created in 2006
(http://tinyurl.com/df3m9r).
- Open a .nib file
- Wait for user to close nib or hit a ok button
- pass default parameters to the .nib
- capture user input from the .nib to be used later in the .sh file.
Currently i am trying to accomplish this with:
"$DIALOG" nib --load ~/Desktop/Test2.nib --center --model '{ classPath
= "foo"; }' --parameters '{}'
That usually opens the .nib window, when i close the window all i get
is an integer.
Then it usually stops working all together, no matter how many time i
try and execute the line of code (control - R) nothing happens, i have
tried what Allan suggests in the post "So either press ⌃D to
“close” stdin, or give -p '{}' as argument, and things should work
as expected." And i cant get it to work, if i trash TextMate prefs and
reinstall, it works for a bit more.
I am not yet as familiar with Ruby as i would like to be and i have an
immediate need to implement this within an existing bundle using
shell. The screencast made it look so nice and easy...
Best,
</matthew>
-------------------------------------------
Matthew Richmond, Principal/Designer
The Chopping Block, Inc.
481 Broadway, 3rd Floor, New York, NY 10013
p 212.463.7574
f 917.591.7584
http://choppingblock.comhttp://chopshopstore.com
-------------------------------------------
World Domination Through Graphic Design
-------------------------------------------
Hi,
last time I asked, this wasn't possible and I did not follow the latest
development. So here's my question again:
I have a custom html/php dialect. It contains of regions of code that
is either html markup or php code.
<php>...</php>
and
<htm>...</htm>
Inside a php region, you can use <htm> and inside a markup
region, you can use <php> which leads to recursive a structure
that is very helpful for programming (at least for me) but
harder to colorize, fold or autocomplete correctly.
More complex example (outmost default is html markup):
<html>
<head>
<php>
echo convert($title);
</php>
<style> ..... </style>
</head>
<php> init(); </php>
<body>
Result:
<php>
if($someflag)
<htm>
<table border="0">
<php>
foreach $row ($rows)
{
<htm><tr><td></htm>
echo $row;
<htm></td></tr></htm>
}
</php>
</table>
</htm>
</php>
</body>
</html>
Can I customize Textmate so its html and php modules identify my
regions?
/Andreas Pardeike
Hello,
I'm trying to enhance the Matlab bundle. Especially by trying to make
matlab and texmate to interact (shortcut to launch a script etc...).
And I must say I'm pretty bad with shell scripts and regular
expressions.
I've nevertheless managed to do that, and now I'm trying to recreate
matlab "cell mode" : matlab source files are scripts, and it is
possible to divide the script in "cells". When you are in the (awful)
matlab editor, you can run the current cell just with cmd+enter. This
is very useful. The problem is that the cell separator is just a line
like this :
%% Title of the new cell
...That's it, there is no ending marker for a cell : the current cell
ends where the new one starts ! What I've done now is creating a new
"cell" scope delimited by these lines, but as soon as one "%% ...."
line is used to mark the end of a scope, it can't be used to start the
following one.
Here's my descriptor.
contentName = 'meta.cell.matlab';
begin = '%%.*$\n';
end = '%%.*$\n';
captures = { 0 = { name = 'meta.celltitle.matlab'; }; };
patterns = (
# Here I include all the other scope descriptors, because they can
be contained in a cell !
)
For my solution to work, I then have to use two of these "%% ..."
lines, one to end the previous cell scope, and one to start the new
one. This means matlab files need to be modified to work, which is not
so good !
Do you have an idea on how to solve this problem ?
A linked problem (but less important) is that I can't get code folding
to work with cells : a start marker can't be the same as an end marker.
Thank you !
Hello,
When accessing various bundle features I get (LoadErrors).
This is on 10.3.9 using 1.5.7 (1436). On 10.4.9 same version, no errors.
First question, is this version 10.3.9 functional. I could not find anything in
the notes or on the site.
If this is not a 10.3 issue then these are the errors I have been receiving:
This is the Error I get issue php-help:
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/web_preview.rb:1:in
`require': No such file to load -- erb (LoadError) from
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/web_preview.rb:1
env: ruby -wKU: No such file or directory
I also the this error when issue html tidy:
env: ruby -wKU: No such file or directory
I get both the above from numerous commands.
I searched the thread, and based upon what I can find, I believe my environment
variables are correct.
One guess is an issue with this could be a result of an older Ruby install:
10.3.9 uses Ruby ver. 1.6.8; 10.4.9 uses 1.8.2.
One post referenced a ruby test:
feed these lines to Terminal do you see this output?
=====
$ /usr/bin/ruby -r erb -e 'p url_encode("a test")'
-e:1: undefined method `url_encode' for main:Object (NoMethodError)
$ /usr/bin/ruby -r cgi -e 'p CGI.escape("a test")'
"a+test"
my results:
$ /usr/bin/ruby -r erb -e 'p url_encode("a test")'
/usr/bin/ruby: No such file to load -- erb (LoadError)
But the suggestion confused me.
Suggestions?
Thank You,
dmp
Another example of something to avoid, aka things textMate really wasn't
designed for.
-- Open a large file (mine was > 7000 lines)
-- Select the entire file
-- Edit each line in selection
-- start typing.
This brought the computer to its knees.
My bad. Just thought y'all could have a laugh at my expense.
There are, of course, at least a dozen other ways to do what I started to
do: Filter through command, Command, Search and replace ( $ with
[replacement value]), etc
Tschuss,
Brad Tittle
Tech Support
I'm using git to keep different versions and branches of my projects
in repositories. Unfortunately, Project Plus does not properly
recognize files that git watches as well as the status of files that
it (correctly) recognizes as part of my git repository.
I am using `freely' managed projects, i. e. those you can create via
File > New Project and drag files into. I do not (want to) drag my
whole project folder onto the TextMate icon. If I do that, Project
Plus correctly labels the status of my files (part of repository or
not, modified or not modified). The problem is not just cosmetic, I've
discovered that files which Project Plus does not properly recognize
are not part of commits!
The solution is that you need to move the location of a file (e. g. by
reshuffling or so), then, apparently, Project Plus updates the
properties of all files.
Is this a known problem?
Max
Thanks, Allan, for both the replies.
> I?d argue that ?name? is meta data for the ?content? with the agreed
> upon convention that it uses a format like ??title?[.?type?]? ? a
> resource fork is just another piece of content meta data which is very
> fragile since it won?t survive a lot of the mechanisms used to
> transfer content (unlike the name), so there is little reason trying
> to split up the name into ?title? and ?type? and then store the ?type?
> in a new meta data field.
I agree completely about the resource fork. I'm afraid my comment was
confusing and it seemed like I longed for the days of resource forks
getting lost when you transferred files across platforms. (I'd be just
as happy to be rid of the extension.)
And I filed my first bug report with Apple.
> Make a column selection of the desired width (and with desired indent)
> then hit ?Q and TM will reflow the paragraph to be ?in a box?.
Doh! I knew that and had forgotten it. I feel like such a punk now.
(I'd still like to automate the process, but I want to try to do it
myself.)
Hello, how in TM when I have a few windows open can I get them into a
unified window with tabs? These are usually remote files opened over
ssh in Interarchy.
--
Scott * If you contact me off list replace talklists@ with scott@ *
I am starting to use cmd-Shift-R a lot more to run code through TM in
it's window. Very nice. For quick one off shell scripts I am finding
it invaluable.
I have a few issues. There are more times for me where I am working
in php and I want the output to be html'ized. I see a raw <br /> over
a rendered one. I end up putting in a lot of \n's and such to get
somewhat readable.
Is there any way to toggle the mode on how it deals with this?
Second is control-H, which I use a lot to get to docs in php, this is
suer handy, and I bet it uses webkit to do it's secret little deed.
However, One function may lead me to another, as there are links in
the window. But there is no back button. Is there any way to get
more standard browser buttons in this window? Or heck, I would be
happy to have it just use Safari.
The TM pop up seems to always be set to sort of work like
target="_blank" and spawn a new window, which clutters me up some, and
I end up with 20 windows hiding around. I would like control-h to
replace windows.
Thanks
--
Scott * If you contact me off list replace talklists@ with scott@ *
As the subject line begins: git from the Bundle menu works (as does
working from the CLI), but CTRL+SHIFT+G... gives me the following tool
tip pop-up:
/tmp/temp_testmate.AQcVtg:26:in `open': No such file or directory -
pages (Errno::ENOENT)
from /tmp/temp_testmate.AQcVtg:26:in `entries'
from /tmp/temp_testmate.AQcVtg:26
"AQcVtg" above is variable. Everything else remains the same.
The short version of my question is: what's wrong and how do I fix it?
TM has made me a lazy man, reliant upon keyboard shortcuts. Please
save me from using the pull-down menu.
john
#!/usr/bin/ruby -w
require "#{ENV['TM_SUPPORT_PATH']}/lib/setuplibs"
require 'svn_diff_directory'
require 'shellwords'
#require 'exit_codes'
def get_dirs()
dirs = []
if ENV['TM_SELECTED_FILES']
dirs = Shellwords.shellwords(ENV['TM_SELECTED_FILES']).delete_if
{ |file|
(! File.directory?(file)) or (! File.directory?(file+'/.svn'))
}
end
if dirs.empty? and ENV['TM_PROJECT_DIRECTORY']
dirs = [ENV['TM_PROJECT_DIRECTORY']].delete_if { |file|
(! File.directory?(file)) or (! File.directory?(file+'/.svn'))
}
end
if dirs.empty?
TextMate.exit_show_tool_tip "Neither the selected directories nor
the Project directory are versioned"
end
dirs
end
STDOUT.sync = true
dirs = get_dirs()
dirs.each() { |d|
Dir.chdir(d)
svn = ENV['TM_SVN']? ENV['TM_SVN']:'svn'
puts `#{svn} diff -r 1 .`
}
This script is supposed to generate a full svn diff for the currently
selected directory.
However, it generates no output.
I've set input to none, and output to new document
------------------------------------------------------
"Home is not where you are born, but where your heart finds peace" -
Tommy Nordgren, "The dying old crone"
tommy.nordgren(a)comhem.se
Hello all. I'm trying to figure out a way to write a command that will
take a selected block of soft-wrapped text, hard-wrap it to a given
length, and then indent a given number of spaces. I do a lot of
writing using Markdown, and I would like to find a way to make
bulleted lists more clearly marked as such while in plain text mode.
None of the current options under the TEXT menu do what I want. I
don't need the command to ask for the wrap length or the spaces to be
indented, I'm happy to adjust that within the command itself -- once I
get what I want, I won't fool with it for months if not years.
If someone could even point me in the right direction, I'd be happy to
try to hack at something on my own, but I honestly don't know where to
start.
john
--
John Laudun
laudun(a)louisiana.edu
http://johnlaudun.org/
Twitter/Facebook/Flickr: johnlaudun
Sometimes I would like to make a substitution/search or whatever only on a
part of the file, but textmate doens't bother too much if I select
something, neither there are options to do it.
I'm sure there is a way to do it, any help?
--
View this message in context: http://www.nabble.com/Substitute-only-here%21-tp22914227p22914227.html
Sent from the textmate users mailing list archive at Nabble.com.
In Bill's defense, I have long had this problem with the Finder. If I
create a file in Textmate but assign it no extension, a blank document
icon is assigned the file and the default application -- no matter how
hard you try to change it through the Finder -- to open the file is
always TextEdit.
As many people have pointed out, this is indeed a Finder problem, but
it makes it no less frustrating for users who do not wish to have
extensions on text files. (In the old days, wasn't that what the
resource fork was for? And wasn't the promise of the modern OSes to
dispense with the file extension system?)
john
Greetings to everyone,
How is it possible to compile a small program via short-cut. Until now
I've used apple-cmd+R (RUN/Compile via xCode) in my .m files
(objective-c). Via command usually I do something like this:
Angel:Fraction atma$ ls
Fraction.h Fraction.m main.m
Angel:Fraction atma$ gcc Fraction.m main.m -o Fraction -l objc
Angel:Fraction atma$ ./Fraction
5 / 10 = 0.5
0 / 0 = 0
Angel:Fraction atma$
Best regards & thanks in advance
Panagiotis (atma) Atmatzidis
email: atma(a)convalesco.org
URL: http://www.convalesco.org
--
The wise man said: "Never argue with an idiot. They bring you down to
their level and beat you with experience."
Guys,
Which screen recording software do you usually use to record TextMate
screen casts?
Best regards,
Mathieu
___________________________________________
Mathieu Godart
Skype: mathieu_godart
MSN: mathieu_godart(a)hotmail.com
ASIC Integration Manager
Coolsand Technologies
___________________________________________
I'm glad to see I'm not the only one trying to do this and
encountering this issue.
Unfortunately, your solution didn't work for me. I was able to install
the older port okay, and `port installed` shows that I have in fact
installed screen 4.0.3_1, and `which screen` shows that I'm running
the binary that I expect to be running, but still I get "mate: failed
to establish connection with TextMate."
Any ideas?
Thanks in advance,
Brian
Hi,
when I want open a file from within TM I mostly want to open a file in
the vicinity of the current file.
So is there a way to have the open file dialog open with the directory
of the current file displayed.
adi
Well I rewrote my little script in Ruby and have had mostly success,
but I need some help escaping things properly. Here's what I'm having
trouble with:
#!/usr/bin/env ruby
arg = STDIN.read
arg.chomp!
arg.gsub!('\\', '\\\')
arg.gsub!("\'", '\\\'')
arg.gsub!("\"","\\\"")
arg.gsub!('\`', '\\\`')
system("pointfree \""+arg+"\"")
This is intended to enclose text selected in TextMate in quotation
marks, and then escape all of the following characters within the the
quotes, and then use that as the argument to pointfree. What's wrong
with how I'm doing it?
Sorry for all of the questions,
Ian
I've just started using Textmate and know very little about it, I was
wondering why the svn-commit.tmp, Regular Expression (Oniguruma), Regular
Expression (Python), Release Notes and Strings File are in the languages
list since they seem to do nothing.
They appeared after installing the Subversion bundle along with a few other
languages.
Thank you for your help.
http://www.nabble.com/file/p22995446/Cropped.png
--
View this message in context: http://www.nabble.com/Unknown-items-in-the-languages-list-tp22995446p229954…
Sent from the textmate users mailing list archive at Nabble.com.
I get the following error running a ruby program in Textmate, but it works
fine running it from the command line. The program creates a lot of strings,
and slightly reducing this just slightly makes the error go away.
I get this in Textmate
...
2 DATE 11 Jan 2001
at top level in 3 TIME 15 at line 56
1 RIN 13
but this on the command line (which is correct)
...
2 DATE 11 Jan 2001
3 TIME 15:56:49
1 RIN 13
Oddly, if I "puts s.reverse" in textmate, I get the right output too
(reversed of course:). I also don't get the error if I print to a file,
rather than printing to the Textmate output window (and I'm only printing
out a very short segment of text from the program).
s = f.to_gedcom
puts s #output window copy gives the error (before
File.open).
File.open('/tmp/xx.txt','w') { |fd| fd.print s } #file
copy is correct
puts s #output window copy gives the error (and also
after File.open)
So is there a heap or stack size issue running ruby from textmate? Any other
guesses at what is happening? It does it under Ruby 1.8.6 and Ruby 1.9.1.
--
View this message in context: http://www.nabble.com/Is-there-a-limited-heap-or-stack-for-running-ruby-in-…
Sent from the textmate users mailing list archive at Nabble.com.
Hey everyone,
I'm experiencing very annoying trouble out here. My font rendering is kind
of blurry when it comes to dark backgrounds. Here's a screenshot using
Swyphs II color theme. My rendering is on the top of the screenshot,
author's is at the bottom, after the red line.
http://berkana18.com/screen.jpg
Font smoothing in system perferences is set to 'Automatic', and i'm on
Leopard, 23" ACD.
Any ideas, anyone?
Thanks in Advance.
Aleksandr.
--
View this message in context: http://www.nabble.com/Font-is-blurry-on-dark-background.-tp22957411p2295741…
Sent from the textmate users mailing list archive at Nabble.com.
Dear all,
I'm doing a very simple test every morning and sometimes more often:
run SVN update on my work dir (let's call that command A) and then
update the tag index of this source code (let's call that command B).
And I wanted to create a macro to do that.
The problem is that the macro launches the command A and launches
command B without waiting the end of command A. Do you have an idea on
how to automatize this (long to run) task with a macro. I could
probably do that with a command, but it would be cheating.
Thanks.
Best regards,
Mathieu
___________________________________________
Mathieu Godart
Skype: mathieu_godart
MSN: mathieu_godart(a)hotmail.com
ASIC Integration Manager
Coolsand Technologies
___________________________________________
Hi folks,
In case anyone else is interested, I've just put together a command
that aligns comments in a block - a trivially modified version of
Chris Poirer's 'align assignments' script.
It fixes this:
imagecopy($image, $frame,
($x=max($width-$this->topRightCap[kCapWidth], $this-
>topLeftCap[kCapWidth])), // Destination x
0, // Destination y
$x, // Source x
0, // Source y
min($this->topRightCap[kCapWidth], $width-$this-
>topLeftCap[kCapWidth]), // Source width
$this->topRightCap[kCapHeight]); // Source height
Ctrl-Option-Command-/, then:
imagecopy($image, $frame,
($x=max($width-$this->topRightCap[kCapWidth], $this-
>topLeftCap[kCapWidth])), // Destination x
0
, // Destination
y
$
x
, // Source
x
0
, // Source
y
min($this->topRightCap[kCapWidth], $width-$this-
>topLeftCap[kCapWidth]), // Source width
$this-
>
topRightCap
[kCapHeight]); // Source
height
More info & download at http://michael.tyson.id.au/2009/03/27/align-comments-in-textmate/
Cheers,
Michael
--
Michael Tyson | michael.tyson.id.au
m: (+61) 0407 754 124
e: michael(a)tyson.id.au
aim: mikerusselltyson
twitter: MichaelTyson
Hello,
Is it possible do always highlight brackets/parentheses of the code block,
where my caret currently is?
I'd like to have the ability to always see what block I'm at, not only when
moving caret near the closing bracket. And is it possible to change the
color of the highlight? I may not be a square around that bracket, the
bracket itself can go bold and different color.
Does anybody know, how to do that, if possible?
Thanks.
--
View this message in context: http://www.nabble.com/Always-highlight-brackets-parentheses-of-the-code-blo…
Sent from the textmate users mailing list archive at Nabble.com.
Hi TextMate users!
I'm using LaTeX with TextMate. Is it possible to get the Acrobat Reader in the "View in:"-selection in LaTeX Preferences? Where can I set this?
Thanks and regards!
I'm experiencing slowness when I use the number keys 1-9 (not 0). There's a
full second's delay from pressing a number to having it appear in the file
that I'm editing. Interestingly the problem also exists when changing using
Apple+Number keyboard shortcut to change between open file tabs. The problem
only occurs in projects.
Is anyone else having this problem? Any suggestions on a solution would be
greatly appreciated.
I'm using OS X 10.4.11 and I have the ProjectPlus plug-in installed.
--
View this message in context: http://www.nabble.com/Number-keys-slow-tp22668585p22668585.html
Sent from the textmate users mailing list archive at Nabble.com.
I had earlier asked a question about how to have the textmate editor
highlight the footnotes in my latex document. Link:
http://www.nabble.com/Highlighting-in-Textmate---Latex-to20379168.html#a203…
I had two very good responses to that question about how to find the scope
and how to modify the preferences. For footnotes, the scope was
meta.footnote.latex
Now I am using a package called "changes" in latex, which defines commands
like \added, \deleted and so on for tracking changes. I want to highlight
anything that appears in the braces in \added{}. Using the method suggested
in the above post I found the scope as meta.group.braces.tex. But this scope
is common to many other pair of braces (for example, subscripts,
superscripts, \vspace{} etc.) and it highlights all those too. How can I
have the editor just highlight something that appears between \added{}.
Thanks very much.
--
View this message in context: http://www.nabble.com/Custom-highlighting-in-latex-tp22727134p22727134.html
Sent from the textmate users mailing list archive at Nabble.com.
How can I escape certain chars in a selection in TM? If this is not
built in, can someone help me make a macro or equivalent to do so?
Example:
echo "<a href="untitled.html" id="name" class="name"
target="_self">test</a>";
I would select the entire line, it would be smart enough to know the
language from the string.
echo "<a href=\"untitled.html\" id=\"name\" class=\"name\" target=
\"_self\">test</a>";
I have a feeling there is probably something built in that can help
me, but I am just not finding it.
--
Scott * If you contact me off list replace talklists@ with scott@ *
It would be useful with a command "Diff selected directory with
Version ...",
that would generate a diff for ALL versioned files in selected
directory.
-----------------------------------
See the amazing new SF reel: Invasion of the man eating cucumbers from
outer space.
On congratulations for a fantastic parody, the producer replies :
"What parody?"
Tommy Nordgren
tommy.nordgren(a)comhem.se
I'm newly coming back to the Mac after a long hiatus (late 1980's as a
developer); been Windows in the interim.
I still have to work periodically in Windows boxes and am somewhat forlorn
at the layout of the navigation keys on the Mac (as in most laptops). This
is where VI shines; the navigation can be accomplished in the "center" of
the keyboard where key layouts are consistent. David Wooten maps a single
key (http://lists.macromates.com/textmate/2006-January/007683.html) and Kirk
Fitzpatrick was attempting a plugin (
http://lists.macromates.com/textmate-plugins/2007-January/000022.html).
Anyone figure out anything like what VI has or have any ideas? I'm
considering building something that intercepts keystrokes right out of the
operating system so that TextMate has to know very little.
Thanks in advance,
--
Scott Smith - Old Fart Developer
With privilege comes responsibility,
with responsibility comes accountability,
with accountability comes honesty,
with honesty comes faithfulness.
I started a project I call "ropen", which is like OS X's "open" or
TextMate's "mate" commands, but works remotely by automatically
mounting the remote filesystem locally using MacFuse's sshfs:
http://github.com/tlrobinson/ropen/tree/master
It works quite well, except when you try to open a large directory
tree in TextMate. It seems like TextMate is trying to walk the entire
tree immediately when it's opened. Doing this over the network is very
slow and ends up hanging TextMate for moderately sized directory trees.
Is there any possibility of changing the behavior to lazily do
whatever initialization TextMate needs to do when opening directories?
Thanks,
Tom
I have seen others do this, I can not find any docs on it.
In php, I have seen someone type in array_keys() and somehow, they are
able, in that completion, or at a later time, get it to insert the
template arguments: array_keys ( array $input [, mixed $search_value
[, bool $strict= false]] )
--
Scott * If you contact me off list replace talklists@ with scott@ *
Howdy!
I would like to use TextMate for C/C++, but I have no idea how to set up. So what do I have to do to get this simple code working?
#include <stdio.h>
int main()
{
prinft("hello world");
return 0;
}
Thanks a lot!
This qualifies as "Well, if you don't like kicking yourself in the nose,
why don't you stop doing it?" kind of suggestion.
When I open a network drive location and double click on the folder, it
opens.
Yes, if I just click on it and then click on the sub folder I really want it
works exactly as it is supposed to.
This isn't a bug. This is just me telling the world that I am incapable of
instantly changing the way I use my flippin mouse. The real answer lies in
doing a bunch of other things correctly, I just haven't started doing them
that way yet.
The only bug here is that because i double clicked on a large directory,
textMate basically locks up (because it is processing a lot of files over a
network connection and even though all CS guys are constantly trying to
avoid N^2, it keeps coming back to bite us!).
Anyone ever try to open a large spreadsheet (say anything over 6,000 rows)
in Numbers. NOT A FUN thing.
--
Brad Tittle
Tech Support
Hello All,
I believe I have found a bug in the syntax highlighting for shell
scripts. When I have a comment in a case statement and the comment
does not get highlighted correctly. Here is the text for my case
statement:
#first figure out what platform you are in, based on the uname -rs
KERNELVERSION=`uname -rs`
case $KERNELVERSION in
#linux returns "Linux kernelversionnumber"
Linux* )
OSTYPE="linux";;
#freeBSD returns "freeBSD releaseversion"
*BSD* )
OSTYPE="bsd";;
#osX returns "Darwin kernelversionnumber"
Darwin* )
OSTYPE="macos";;
#everything else
* )
OSTYPE="unknown";;
esac
also here is a link to a picture of what I am seeing on my screen: http://farm4.static.flickr.com/3575/3410707546_d7a2a67e49_o.png
Im not sure if this is even helpful but pastebins highlighting seems
to do the same as textmate but quickhighlighter.com seems to get it
correctly(what I assume is correct).
Thanks for your help.
--Colin
When I edit a Template it stops working even when I edit just one tiny letter
in an out-commented text.
I do the following:
in the 'bundle editor' I expand the 'Project' Template and then I select the
'Project.as'. Here I placed the opening curly braces to be at the same line
as the function (and not at the next line).
public function ${TM_NEW_FILE_BASENAME}() {
When I close the window and try to make a new project from template nothing
happens.
Even when I revert my changes it won't work anymore, I have to reinstall the
whole bundle!
As said I also tried just to change a tiny letter in outcommented section of
_create_as3_project.sh with the same result.
What is the proper way of editing a Template?
--
View this message in context: http://www.nabble.com/How-to-edit-Actionscript3-Templates--tp22677253p22677…
Sent from the textmate users mailing list archive at Nabble.com.
I use the Makefile bundle on my desktop and never had any issues so I when I
put it on my laptop I was a little puzzled when running Build produced this
output:
env: ruby\r\rrequire: No such file or directory
Ruby is most definitely in TM's path, and checking the path from within TM
on both machines shows that they are exactly the same. Both machines are
running Leopard with the same version of ruby, same gems, and same version
of TM installed.
Any assistance is greatly appreciated.
Thanks,
Brian
Hello, I just started using command-R to refresh in running browsers.
I find it only refreshes the front most browser window. Is this normal?
I seem to be fighting this behavior, though command-R is so handy I
want to use it. Perhaps it could be modified to work better.
If I have a few windows, and a few tabs, move to TM, command-R, it
will switch to Safari in this case, and refresh whatever is the front
most window and tab within that window. I now have to remember to
bring the window forward that has the result of the code I am working
on to the foreground.
I think for me, a better behavior would be for command-R to spawn a
new browser window, with the code ran in that window. I can then
close the window, and be back in TM. This way, my window is always
going to be the one used.
Has anyone else found this mildly annoying and looked for a solution?
I can always go back to the command-tab to the window I want method,
and press reload in the browser.
I have tried the command-shift-R method, but I have a feeling that
since I am working on remote files through a ftp/ssh app, it is not
going to work. It also does not interpret html, and shows me the raw
html code, so that method seems more designed for cli type scripts, or
code that does not end up outputting to a browser.
Thanks for any workflow suggestions
--
Scott * If you contact me off list replace talklists@ with scott@ *
Hello, I found a .tmMacro file someone put up, it will allow me to
remove trailing spaces and tabs on save. Works nice, for one flaw.
If I have any text selected, that selected text is replaces with what
seems to be the contents of the entire file.
I can not figure out how to even edit the .tmMacto once installed. I
can put the cursor in the bundle editor area, but it will not allow
any chances.
I can not open the .tmMacro file in TM, so I could use the shell, but
that seems strange, and it is a plist, and not entirely sure what to
edit.
The Macro has two commands
executeCommandWithOptions
{
beforeRunningCommand = nop;
command = "perl -pe 's/[\\t ]+$//g'";
input = document;
output = replaceSelectedText;
}
executeCommandWithOptions
{
beforeRunningCommand = saveActiveFile;
input = none;
output = discard;
}
* I can sort of hack this out on my own by making a empty command,
then recording a macro to and hooking those two together. The above
seems cleaner though.
Any ideas what I should edit? The perl seems fine, a direct copy from
the TM built in to remove spaces and tabs, maybe the output =
replaceSelectedText; needs changing?
--
Scott * If you contact me off list replace talklists@ with scott@ *
Hi all,
I am new to textmate and Java/Python programming. When I run my code
with the textmate run command, there seems to be a problem with the
order of output in html. This problem seems not to be bundle specific
(both Java and Python bundle show the same problem) so I guess it is
in the underlying executor script.
The bundles and support dir are fresh SVN checkouts.
Example code: guess.py
import random
secret = random.randint(1, 99)
guess = 0
i = 0
while guess != secret:
guess = input("Make a guess (0 to quit): ")
if guess == 0:
print "Program quit"
break
elif guess > secret:
print "to big"
elif guess < secret:
print "to small"
i = i + 1
else:
print "Congratulations, you guessed right after",i ,"tries."
Example output: order is: prompt -> program output -> input
Make a guess (0 to quit): to small
1
Make a guess (0 to quit): to small
2
Make a guess (0 to quit): to small
3
Make a guess (0 to quit): to small
4
Make a guess (0 to quit):
Output order should be: prompt -> input -> program output
I'd like to use textmate in my cs cources starting soon and it would
be great if the html output had the right order, so I can hand it out
to the teacher as a proof for my working code. At the moment this
would be rather confusing and lead to some discussions I guess.
This really just happened to me. Really. I know I produced some April Fools
jokes yesterday, but that was yesterday. This is real.
I created this Ruby script in TextMate:
s = "wackamole"
puts s
I ran it, and the RubyMate output window displayed:
woe
Weird, eh? And it is part of a longer story; the string "wag wag" was being
displayed as "w w", and the string "ruff ruff" was being displayed as empty.
(Never mind why I was testing those strings.)
I quit TextMate, restarted my computer, and everything is back to normal.
But would anyone like to suggest a cause for what happened? Cosmic rays?
Belated April Fools day easter-egg-type joke?? The conficker virus??? Has
anyone else ever seen anything like this? m.
PS The problem was presumably with TextMate, not with ruby, because using
the Terminal to run the same script (as a saved text file) using the "ruby"
command worked just fine.
--
matt neuburg, phd = matt(a)tidbits.com, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings
Hello, I find that TM has too many keyboard shortcuts for my brain to
be able to retain and be useful to me. I have developed a habit that
I use in all apps, which is to use apple help, command-Shift-? will
bring up the help menu in the app. I can type a few words, and it
will show me the menu item I need. Return and it is executed. Or I
can traverse the real menu structure.
I use this in all apps, it is handy to me.
TM apparently crashes a lot when I do this.
I am now looking to use the "Select Bundle Item", but it is too
aggressive about what it finds. Enter in the single letter "E" and it
finds all bundle items that contain a singe E. I am looking to limit
it to contains characters of at least three characters for a match.
In the help search method, if I type "br" it brings up 6 items to pick
from. In the "Select Bundle Item" it beings up about 25 or so.
Any suggestions? Over time, I am sure this is going to force me to
learn more of these, but the apple help method was gread for those one
time uses where you will not use the command again for a long time.
It also goes beyond the bundle items, and I could toggle freehand edit
mode, for example, something I rarely do, and just do not want to
bother committing to memory.
--
Scott * If you contact me off list replace talklists@ with scott@ *
Hello,
I'm working on a "matlab console" bundle, à la "R console bundle". The
goal is to emulate a matlab console in a textmate window, which is
much more practical than the terminal to edit long commands. This is
so far working quite well, running matlab in the background and
sending/receiving messages via text files.
However, when I have a matlab script opened in a textmate window, I
want to be able to execute it in the textmate window where the matlab
console lies. I thought of doing that with applescript, but the
dictionary of textmate seems pretty poor, there is no way of handling
tabs for example.
So what I want to be able to do is a run a command from a window that
write its results in a different textmate window or tab (which has a
specific name, something like "Console.Mcon"). Is this possible ? and
how ?
Thanks
Pierre
Hello,
With the actual code of LateXCommandCompletions.rb, it's impossible
to use
"alt esc" in a general context ( other than \ref{} or \cite{} )
example
\documentclass{article}
\begin{document}
\input{essai}
\in .... alt esc nothing !
\end{document}
I need to add fileExt = "" at the beginning of the file
LateXCommandCompletions.rb
But I lost LateXCommandCompletions.rb after the recent update 1.5.8
and today after the install of GetBundles and an update of the Latex
Bundle.
I would like to know if my solution is fine and how to manage my files
to avoid problem after any updates
Thanks
Best Regards
Alain Matthes
I have made a new html snippet called "href", it works, and shows up
as Bundles -> html -> href
I would rather it be in Bundles -> html -> insert tag -> href
How can I move this item?
--
Scott * If you contact me off list replace talklists@ with scott@ *
Hi everyone,
I need to bring some XML files (CellML) into textmate; problem is that
the formatting is all on one line without wrapping/indents.
Is there any way to get textmate to automatically format the one line,
and auto-indent it?
Thanks in advance,
MP
I am very intrigued by the TM SQL features, namely, running a
arbitrary SQL command in the editor, as well as the browser. So far,
reading the help, I see I have a small connection window in which I
can enter in the usual host, user, pass, and database name.
The trouble is, I do not want to open my databases up to remote
connections. Almost always they are allowed access from localhost.
Most ISP's are not going to allow access from some other host as well,
not to mention, if you do not have a static IP, you are going to be a
moving target anyway.
What are my options at this point? I have a ssh/ftp/sftp type
connection in which TM is opened against it, and I can save right back
to the server. The sql stuff happens locally on the server.
Any way to integrate that type of connection with TM's sql tools?
--
Scott * If you contact me off list replace talklists@ with scott@ *
Why do I sometimes get xcode messages when using cmd R to run ruby code? If I
click somewhere else in the document and then use cmd R, then it usually
runs the code in the file without the xcode error.
Right now though, nothing I do is working. I'm getting
xcodebuild: Error: the directory /Users/xxxx/Desktop does not contain an
Xcode project.
every time I try cmd R.
--
View this message in context: http://www.nabble.com/xcode-message-when-running-ruby-tp22820086p22820086.h…
Sent from the textmate users mailing list archive at Nabble.com.
One last question for tonight. ;-)
According to the doc, the environment variable TM_PROJECT_DIRECTORY
may not be set. But in which cases? The doc is not very precise on
that point.
Thanks.
Best regards,
Mathieu
___________________________________________
Mathieu Godart
Skype: mathieu_godart
MSN: mathieu_godart(a)hotmail.com
ASIC Integration Manager
Coolsand Technologies
___________________________________________
Greetings!
I have been using TextMate for nearly three years. I just recently switched
jobs and purchased a new MacBook. I've been using the 30 day trial for about
a week - planning to purchase my key soon.
Despite using TextMate with PHP for so long, I haven't ever used the PHP
bundle.
This evening I downloaded it - tested it for a while - but found it to make
TextMate very unstable. I'd select the bundles menu to try out each PHP
bundle, but every second or third time the app would freeze for a few
seconds, then crash.
My console indicated: 'unrecognized selector sent to instance 0x15c29800'
right before the crash.
I tried removing textmate and deleting the php.tmbundle from
/library/application support/textmate/bundles/ then i reinstalled textmate
and tried everything again - same result.
So, I removed it for the second time (and also the bundle in
/library/application support/textmate/bundles/) -
Now, when looking at my console and working on a php file, I see many
instances of "didn't find rule named source.php" -
This ticket: http://ticket.macromates.com/show?ticket_id=8D6BF285 concludes
that "That error indicates that you deleted or disabled the PHP bundle and
are working with HTML files (with embedded PHP)."
I really liked the php bundle, but I'd hate to turn an 'always stable' app
to 'incredibly unstable' ... so, I'd be satisfied with relying on my own
snippets... but I am concerned with the error that I am still getting in my
console.
Is there anything I can do to completely remove that bundle?
I don't want to purchase a key until I get this issue worked out. I'm not
sure how to proceed, so any help would be greatly appreciated.
Thanks!
Alex
dear all,
I've had some problem making up a clear subject line and stil am in
doubt whether I've succeded. What I'm trying to achieve is the
following.
My documents have often various tables and charts embedded via the
\input{table_file}
command.
While explaining my tables/charts I'm mentioning actual numbers in my
text. Is it somehow possible to create a list of numbers in my latex
document and have them called via a reference in my text? This would
enable me to run a somewhat related scenario in my numbers and udpate
both my tables with numbers and have all numbers changed in the text
as well.
I was thinking this should be possible while using \labels, \ref but
for the moment can't stretch my mind to find a solution.
Thanks for any reply,
Gert
Hello, I use DropBox to sync files on more than one machine. Can I
symblink the TM app support dirs to DropBox and use it to sync that
data to more than one machine?
DropBox does not support rsrc forks, so that seems to be the limiting
factor.
--
Scott
* If you contact me off list replace talklists@ with scott@ *
Hi,
I just switched to Textmate to write my R scripts and I admit outright
there are many features of Textmate that I do not master yet. I am
confident I'll enjoy this new environment to write my R scripts.
I have a small problem though. I was looking forward to the ability to
send lines or the selection to R.app without doing cut and paste, as I
used to do with my other text editor.
But when I do this using the R bundle's "shift-option-command-R"
keyboard shortcut (or using the command from the Bundle's menu), my
selection is preceded by a setwd() to the folder where my script
resides. Except that often my working directory was set at the
beginning of my script to be elsewhere than where the script resides.
I am curious: why was this considered advantageous in the first place?
And second, can it be disabled (and how)? Also, can one change the
keyboard shortcuts? I do not use R from Terminal, so I'd like to
switch the keyboard equivalent to something that is less demanding on
my fingers, say control-R or command-R.
Thanks in advance,
Denis Chabot
On Mar 29, 2009, at 5:00 AM, textmate-request(a)lists.macromates.com
wrote:
> On the other hand one should ask why one needs the behaviour you
> mentioned. One can do this also in a doc associated to Rdaemon.
> Remember the Rdaemon doc is NOT a time-linear console, it's still an
> editor window, thus you can run code, go some lines back, run an other
> command, press ?Z for undo, correct the command, delete unused stuff,
> etc.
> In other words why are you using two windows?
> See: http://www.bibiko.de/TM_R_ex01.mov as na?ve example.
Thanks for the information and the example. As I say, maybe what I
need to do is learn a new way of thinking about how to use R
interactively while writing and testing code, rather than just
expecting the same kind of behavior as found in a different editor.
Kieran
Hi all,
Can the Rdaemon bundle can behave in a way that's similar to ESS in
Emacs (or as near as possible given that TextMate doesn't do split
windows and frames, etc). What I want is to have an R file open in one
window (associated with the R bundle) and an R session created under
Rdaemon open in a second window. I write R code in the R file and, as
needed, send chunks of it over to the R session where they are
executed. This is the standard way of working interactively with R in
Emacs/ESS. You can select code chunks and execute them in an R process
running inside a buffer. The code is echoed in the R session when you
send it over, together with any errors or output, etc.
In TextMate, I can have an R file open and an R session running in
Rdaemon, which is great. I can select code and use "Send Selection to
Rdaemon", but it works in the background (or rather, with a progress-
meter message box). The code executes properly, but it and its output
are not echoed in the open Rdaemon window. Once the code has been
executed I can step back through the code in the Rdaemon window using
the line-by-line code history. But what I want is to see code chunks
(and their output) inside the Rdaemon window as I go. Is this possible?
I realize it's somewhat unfair to ask TM/Rdaemon to behave just like
Emacs/ESS and yet still be TM. It's just that now that TM's LaTeX
bundle is so solid, having Rdaemon able to behave in this way would
mean I could stop using Emacs ...
Thanks,
Kieran
This might be a bug or a feature. But me and a friend of mine both have this
annoying "setting" that allows the caret to move to wherever i click the
mouse in TextMate. Even if I click an area after/outside my line of text.
The caret will also move to the right, just like I'm inserting spaces, if I
navigate with the arrow keys to the right. This wont actually insert spaces,
it just looks like it.
It looks like I'm using some "free caret position" setting, that I don't
want. Any ideas here?
Thanks in advance.
/Richard
--
View this message in context: http://www.nabble.com/Caret-moves-beyond-lines-of-texts.-tp22704552p2270455…
Sent from the textmate users mailing list archive at Nabble.com.
I am running Leopard and have set up a respository using some step by
step instructions in the command line.
I then open up my project in TextMate and want to commit my code to the
repository. It tells me that my code is not a working copy, so I say ok,
lets checkout. Then it asks me for svn+ssh:// something so I type in the
file path of the repository and a big error message thus...
"Status File
ssh: Could not resolve hostname Library: nodename nor servname provided,
or not known
svn: Connection closed unexpectedly
The file /Users/lucy/Sites/wed2/Repository does not exist."
Can someone point me in the direction of the right page in the manual
that explains how I should do this?
thanks
Lucy
Greetings. When using the 'Typeset and view PDF' command
in the LaTeX bundle, in conjuction with Skim as a viewer,
the character/word/line corresponding to the cursor's
position is selected in the pdf page. Does anyone know
if this is due to some option used inside the script, or
a standard behaviour of Skim? I find it quite annoying
and would like to prevent Skim from selecting anything
(the red dot is more than enough to show the position, for me).
Thanks in advance,
Piero
Is there a native way to do brace reformatting? I believe it is
called "cuddling". I often pull a function from here or there, and
the formatting is not to my liking...
function {
# code
}
versus
function
{
# code
}
--
Scott * If you contact me off list replace talklists@ with scott@ *
Anyone have any favorite Bundles for studying new code? I typically use a
combination of ctags / vim, but I was hoping that TextMate had some magic to
make things easier . . .
Let me know!
-Dave
Guys,
Do you know if someone ever tried to create a GDB integration in TM?
Would some of you be interested in something like that? I think it is
quite easy to do something which would look like "clewn" (http://clewn.sourceforge.net/doc.html
).
Best regards,
Mathieu
___________________________________________
Mathieu Godart
Skype: mathieu_godart
MSN: mathieu_godart(a)hotmail.com
ASIC Integration Manager
Coolsand Technologies
___________________________________________
Hi,
I would like to know how to remove trailing whitespace (spaces and
tabs) when saving a document.
I currently have the Text bundle item "Remove Trailing Spaces in
Document / Selection" associated with a keyboard shortcut, but that is
not an optimal solution
With kindest regards
Jonatan Andersson.
P.S BTW, "Hello, World"
I've made another patch to GetBundles that lets you set the
"FINDER_APP" env variable, so you can tell GetBundles to open w/ Path
Finder. If the var isn't set, it defaults back to Finder.
As an additional, unrelated suggestion, I find it much easier to parse
bundle update times if the full 4-digit year is displayed:
locCom += " date: " +
Time.parse(bundle['revision']).getutc.strftime("%Y-%m-%d %H:%M")
(Change the lowercase %y to the uppercase %Y.)
Thanks,
Adam Vandenberg
http://adamv.com/http://github.com/adamv/
I use PathFinder instead of Finder; when telling GetBundles to open
the highlighted bundle in TextMate, Finder pops open in the
background.
I edited getBundles.rb to use mate directly to open the bundle;
there's probably a reason to use Finder instead, but I figured I'd
advocate for doing it this way for us Path Finder users.
Patch attached.
Is there a way to force TextMate to open it's drawer on one side even if
there is not enough screen space? I just hate it on the left.
-Yëco
--
Jasson Cascante
Senior Interactive Engineer, Interactive Engineering
Roundbox Global : enterprise : technology : genius
------------------------------------------------------------------
Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
tel: 404.567.5000 ext. 2151 | cel: +506 8810.9879 | fax: 678.623.0305
email: jasson.cascante(a)rbxglobal.com | www.rbxglobal.com
------------------------------------------------------------------
On Mon, Mar 23, 2009 at 2:39 PM, ollie saunders <oliver.saunders(a)gmail.com>
wrote:
>
> I'm experiencing slowness when I use the number keys 1-9 (not 0). There's
a
> full second's delay from pressing a number to having it appear in the file
> that I'm editing. Interestingly the problem also exists when changing
using
> Apple+Number keyboard shortcut to change between open file tabs. The
problem
> only occurs in projects.
>
> Is anyone else having this problem? Any suggestions on a solution would be
> greatly appreciated.
>
> I'm using OS X 10.4.11 and I have the ProjectPlus plug-in installed.
> --
> View this message in context:
http://www.nabble.com/Number-keys-slow-tp22668585p22668585.html
> Sent from the textmate users mailing list archive at Nabble.com.
>
>
> _______________________________________________
> textmate mailing list
> textmate(a)lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
Howdy;
Finally getting around to tweaking some html snippets, and I'm stuck -
this is what I have:
<li id="${1}"><a href="#">$1</a></li>$2
what I'm trying to accomplish is (replacing the spaces with underscores and
making it all lowercase)
<li id="this_is_a_mixed_case_string_with_spaces"><a href="#">This is a Mixed
case String with SPACES</a></li>
I'd really like to understand how to accomplish this (rather than just get
an answer).
thanks in advance
saul
Hi-
Using Ruby 1.9: ruby 1.9.2dev (2009-02-12 trunk 22259) [i386-
darwin9.6.0].
It's unhappy with the non-ASCII right-double-quotes, left-double-
quotes and ellipsis around line 20 in the command "Typeset & View
(PDF)."
Adding:
# coding: utf-8
On the second line fixes things...
HTH, Charles
Hey there, I've got my Textmate Flex compiling working great with the
AS3 bundle, I'm just wondering if there's a way I can clear
flashlog.txt everytime I compile so I don't have to keep doing this
manually?
Cheers :)
Ali
--------------------------------------------------------------------------
Alistair Colling
Interactive Developer
FPP Brand Communications (Newcastle upon Tyne)
The Courtyard
Dinsdale Place
Sandyford
Newcastle upon Tyne NE2 1BD
Telephone: +44 (0)191 261 6662
Fax: +44 (0)191 233 2511
This transmission is confidential and intended solely for the person or organisation to whom it is addressed.
It may contain privileged and confidential information. If you are not the intended recipient, you should not
copy, distribute or take any action in reliance on it. If you have received this transmission in error, please
notify the sender at the e-mail address above.
FPP Design Limited. Reg. Office: The Courtyard, Dinsdale Place, Sandyford, Newcastle upon Tyne NE2 1BD.
Registered Number 3775564. Registered in England and Wales. Visit our website at http://www.fpp.net/
Hello,
I'm hoping someone can help. I don't know if I am doing something
wrong, or if there is a bug in the CSS bundle in TM 1.5.8.
For starters, when I open up a blank CSS document and hit opt-esc, the
only option I get is "title 2" (weird that it's not 1). If I'm reading
the CSS bundle correctly, I should get a list including #, *, ., and a
bunch of HTMl tags.
If I enter a selector and curly braces manually, and then hit opt-esc
inside the braces, I get the word "display" inserted. Again, from the
bundle definition (and logically), I would expect a list of CSS
property names.
Finally, if I enter a property name manually, followed by ':' (and get
the automatic ';' appended after the cursor), and then hit opt-esc,
all I get is '--', rather than a list of relevant attributes.
Would someone please help me understand what's going on here?
For what it's worth, I am working with a fresh "pristine" copy of the
"Bundles" directory in ~/Library/Application Support/TextMate/ out of
the "Pristine Copy" folder.
Thanks,
Avram
"I realized something was wrong when I looked over and saw the mast in
the water." - Dean Barker, Team New Zealand skipper
Hi
Does anyone know is there is a way to preserve syntax highlighting and print in color??
[f] www.flickr.com/photos/bitstream
[c] 416.668.0034
[w] www.bitstream.ca
--------------------------------------------
"...all improvisation is life in search of a style."
- Bruce Mau,'LifeStyle'
One annoying issue I have with the projects panel is every time I click on a binary, textmate tries to display a text version of it...if it happens to be a large zip, textmate sometimes crashes.
Is there some way to avoid this, outside of removing all binaries from your project panel?
[f] www.flickr.com/photos/bitstream
[c] 416.668.0034
[w] www.bitstream.ca
--------------------------------------------
"...all improvisation is life in search of a style."
- Bruce Mau,'LifeStyle'
Hi All,
I patched the ant bundle as described in a post earlier in January which fixes the build command but the build target command is not working.
After selecting the target text "main" in the build.xml file and then Ant->build target, I get the following error.
/tmp/temp_textmate.9KC3Zv:33: undefined method `attributes' for nil:NilClass (NoMethodError)
Any ideas what might be wrong, or maybe there is new bundle I could get?
Thanks in advance.
Is there any way to parse the open document (via regex search) and
return the results as choices for TextMate::UI.complete?
The command might search for "\$TM_\w+" so each time I want to type
$TM_SOMETHING I could get a list of completions built from what I've
typed elsewhere in the document.
I've got a basic TextMate::UI command up and running
<http://pastie.textmate.org/421465>, and as for a parser I've been
using this command: <http://pastie.textmate.org/421473> to complete
stuff thats been indented by 4 tabs (only bummer about this command is
that the document needs to be saved).
I'd love to combine these commands, but since I don't know Ruby I
don't have any idea what to do. (I scraped both those commands off
this list).
Thanks in advance.
I think the problem is "pstricks". If this package is involved, TM
uses automatically "latex" although "pdflatex" is set as default
engine. You can try it with this small example:
\documentclass{scrreprt}
\usepackage{auto-pst-pdf}
\usepackage{pstricks}
\begin{document}
Hallo
\end{document}
The package "auto-pst-pdf" should make using "pstricks" with
"pdflatex" possible but TM doesn't consider this. The only way I
found to avoid this is using the line
%!TEX TS-program = pdflatex
at the beginning of the code.
If there's anyone who has a better idea - I'm open for suggestions.
Am 19.03.2009 um 19:25 schrieb Allan Odgaard:
> On 19 Mar 2009, at 03:21, Gewitterbukk wrote:
>
>> [...] For example when I'm using packages like "auto-pst-
>> pdf" or "pstricks" TM uses "latex" to compile although "pdflatex" is
>> set as default engine.
>
> It tries to be smart, seeing that ‘pstricks’ works with postscript,
> not PDF. But I assume auto-pst-pdf makes it work with PDF or similar,
> and the command should either be even smarter, or not smart at all!?!
>
>> When I try to compile LaTeX-Code for the first time, I get the window
>> which is shown in the screenshot "pic1" attached in the appendix of
>> this mail.
>
> You say “for the first time”, does that mean the error is gone if you
> compile again, or that you resolved the problem?
Dear TextMate/LaTeX specialists!
I consult you because I've got a problem with setting up TextMate
(TM) for LaTeX correctly. At the moment TM seems to choose between
using "latex" or "pdflatex" by itself independent of the default
engine setting. For example when I'm using packages like "auto-pst-
pdf" or "pstricks" TM uses "latex" to compile although "pdflatex" is
set as default engine. This results in problems like everyone can
imagine. The only way to avoid this is inserting the line "%!TEX TS-
program = pdflatex" at the beginning if the LaTeX code. But that's
not the general idea I think.
When I try to compile LaTeX-Code for the first time, I get the window
which is shown in the screenshot "pic1" attached in the appendix of
this mail. Up to now I've pressed the button "Set PATH and Relaunch".
Just because I don't know what "kpsewhich" means and where it is to
find. Maybe that's the crunchpoint. After that the Terminal starts,
sets the PATH and TM restarts. But it doesn't work correctly in my
opinion. "Pic2" shows my LaTeX preferences. My current PATH is "/bin:/
sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/texbin". The shell
variables are shown in "pic3". I'm using Mac OS 10.4.11, TeXLive 2008
and the current version of TM.
I would be very lucky if someone could help me by letting me know the
right settings.
Thanks a lot beforehand!
Best regards from Germany
A. van Ohlen
Guys,
I'm trying to create a completion command for the C language, using
D2. For that purpose, I wrote a function using TextMate::UI.complete.
It looks almost like that:
#!/usr/bin/env ruby
require ENV['TM_SUPPORT_PATH'] + '/lib/web_preview.rb'
require ENV['TM_SUPPORT_PATH'] + '/lib/textmate.rb'
require ENV['TM_SUPPORT_PATH'] + '/lib/ui.rb'
currentWord = ENV['TM_CURRENT_WORD']
# Build the list of completion choice.
choices = [{'display' => 'hal_Aa'}, {'display' => 'hal_Ab'},
{'display' => 'hal_Abc'}]
# Display the completion popup.
options = {:extra_chars => '_', :case_insensitive => false}
TextMate::UI.complete(choices, options)
When I call this TM command, it works fine, but pressing the '_' key,
while the popup is displayed closes it and cancels the completion.
This is not the behavior I expect as '_' has been added to the extra
chars.
Does someone know how to have the '_' character being considered as
part of the word?
BTW, in my preferences, the "Word Characters" field is "_". I don't
know if this impacts.
Best regards,
Mathieu
___________________________________________
Mathieu Godart
Skype: mathieu_godart
MSN: mathieu_godart(a)hotmail.com
ASIC Integration Manager
Coolsand Technologies
___________________________________________
The Hyperlink Helper bundle's Wrap Selection as Link will default to
"http://some-site.com/" if it can't find something else to link to (e.g.
something on the clipboard). Unfortunately, some-site.com is a real site
which people probably don't want to link to by accident.
RFC 2606 <http://www.rfc-editor.org/rfc/rfc2606.txt> states that example.com
can be used, and if someone does indeed go to example.com, they don't
get surprised.
I'm sending this info because the "Send Feedback..." portion of TextMate
brought up a page that suggested Bundle bugs to be discussed here. I don't
know if the current behavior is considered by others to be a bug, but we
had a near miss that almost caused some-site.com to be linked to in our
production web pages. We'd definitely have preferred example.com to
be in our pages had we not caught the mistake.
--
Cliff Matthews <ctm(a)sceim.net>
formerly ctm(a)ardi.com
Thanks, that's been fixed. Must be an artifact of using the bundle
editor. I guess I just wait now? The patch remains at
http://pastie.textmate.org/416564
>
> ---------- Forwarded message ----------
> From: Daniel Stockman <daniel.stockman(a)gmail.com>
> To: TextMate users <textmate(a)lists.macromates.com>
> Date: Sat, 14 Mar 2009 19:35:24 -0700
> Subject: [TxMt] Re: Updating Javascript bundle?
> On Mar 14, 2009, at 3/14 6:54 PM, Michael Newton wrote:
>
>> Okay, I've created a patch using the instructions in the wiki article;
>> I've used SVN a fair bit, but never touched git so I'll leave that to
>> folks more knowledgeable than me. The diff file is here:
>> http://pastie.textmate.org/416564
>>
>> Let me know if there's any other way I can ease the addition of this
>> patch to the code base.
>
> Beware doubly-encoded ampersands in the diff (&amp; => &)
>
--
Michael Newton
http://mike.eire.ca/
Hi
first of all, congratulations for this fantastic enrichment of the
already genial project drawer. I did instaled Project+ and it worked
well (and I got really impressed) the first time. But after
installing and restarting and running it again it failed, TM shows the
classic project drawer, not the new enhanced one. You can touch round
the preferences of Project+ but it ignores them. But vuala! I opened
with mate several files from the terminal: "m *.json" and Project+
appeared, funnily both modes were present at the same time, the
classic one an the new one. Then I close and reopen my project and it
worked well.
The conclusion: you need to reopen a project to make Project+ to
became live.
- juan falgueras
The AppleScript window object in TextMate 1.5.8 (under Mac OS 10.5.6)
seems to be broken. I get get the window name and bounds, but not the
window document:
tell application "TextMate" to return (document of front window)
=> NOTHING
Compare this to TextEdit, which has a similar dictionary:
tell application "TextEdit" to return (document of front window)
=> document "foo.txt" of application "TextEdit"
Am I doing something wrong?
Regards,
Alan
--
Alan Watson
http://www.alan-watson.org/
Fo those of you using Consolas...
Microsoft's version of Consolas displays on the Mac and in TextMate
with an incorrect line-height, most clearly exhibited in selected
text, highlighted lines, and spelling error underlines. This makes
writing in Consolas irritating to me.
The version of Consolas that ships with BBEdit has a correct line
height but no italic or bold variations, which also irritates me.
If you extract BBEdit's Consolas from its package contents, install it
and disable Microsoft's "regular" weight, Leopard seems to use the
correct line-height information from BBEdit's version and apply it to
Microsoft's italic and bold weights.
Now Consolas is beautiful.
Sources:
<http://bandes-storch.net/blog/2008/12/21/consolas-controlled/>
<http://www.command-tab.com/2008/12/16/consolas-cursor-fix/>
The Ruby Debug.tmbundle is pretty old
http://www.datanoise.com/articles/2006/8/27/control-debugger-from-textmate
and I can't get it working anymore.
When I try and set a breakpoint in a rails project I'm getting this
tooltip error in textmate:
"We are not in a state that has an associated file"
The scope for the set breakpoint command is: source.ruby - comment
Does anybody have any ideas about why?
I put a copy of the Ruby Debug.tmbundle zip directory on github here:
http://github.com/stepheneb/rubydebug.tmbundle/tree
FYI: the ruby-debug gem itself has been updated so this command invocation:
rdebug -s --no-stop ./script/server
needs to replaced with:
rdebug -s --no-stop ./script/server
Guys,
I'm currently trying to develop a command which gets some log from a
cmd pipe and send the result of the TM command to the HTML output,
just like that:
cmd_pipe = open("|my_long_script.sh 2>&1")
cmd_pipe.each_line do |line|
print line
STDOUT.flush
end
cmd_pipe.close
This allows the web preview to be updated (better than the print
`my_long_script.sh 2>&1' for that reason) while the command is
processed. But my problem now is that the web preview does not got to
the end of the file automatically... This is a bit painful while
staring at the result of the command.
Do someone have an idea to force the web preview to scroll down each
time the STDOUT is flushed? Or something like that.
Thanks in advance.
Best regards,
Mathieu
___________________________________________
Mathieu Godart
Skype: mathieu_godart
MSN: mathieu_godart(a)hotmail.com
ASIC Integration Manager
Coolsand Technologies
___________________________________________
Hi list,
I started python and therefore I downloaded v3.0.1 as a dmg and
installed it.
If I test the version in the terminal with
python -V
it returns
Python 2.5.1
The same is used within Textmate.
I thought the old one will be updated with the new version... How
could I used the new version of python and where got it installed?
Thanks in advance
Christian
When I press that combo (by accident) I see the bottom bar of the TM
interface become a full-width text field with a flashing insertion
cursor, but I have been too scared to type anything into it. Has
anyone seen this? Any ideas what it means?
Thanks in advance,
Walter
Hi,
Recently I encountered a problem of running Perl script by cmd-R.
The error is:
/bin/bash: line 9: -e require
"#{ENV["TM_SUPPORT_PATH"]}/lib/tm/executor" require
"#{ENV["TM_SUPPORT_PATH"]}/lib/tm/save_current_document"
TextMate.save_current_document
TextMate::Executor.make_project_master_current_document
TextMate::Executor.run(ENV["TM_PERL"] || "perl",
"-I#{ENV["TM_BUNDLE_SUPPORT"]}", "-Mexception_handler",
ENV["TM_FILEPATH"], :version_args => ["-e", e_sh(%q{printf "Perl
v%vd", $^V})]): No such file or directory
I have tried to use GetBundle to update but this does not help.
Textmate: 1.5.8(1498)
[Sat Mar 14 22:33:05 mbp ~]$ cat /Users/cmlai/Library/Application\
Support/TextMate/Pristine\ Copy/Support/version
11282
Help?
Okay, I've created a patch using the instructions in the wiki article;
I've used SVN a fair bit, but never touched git so I'll leave that to
folks more knowledgeable than me. The diff file is here:
http://pastie.textmate.org/416564
Let me know if there's any other way I can ease the addition of this
patch to the code base.
> ---------- Forwarded message ----------
> From: Allan Odgaard <mailinglist(a)textmate.org>
> To: TextMate users <textmate(a)lists.macromates.com>
> Date: Sat, 14 Mar 2009 15:52:19 +0100
> Subject: [TxMt] Re: Updating Javascript bundle?
> On 13 Mar 2009, at 17:14, Michael Newton wrote:
>
>> [...]
>> So, how can I get the official bundle updated with this stuff? The
>> modified 'Commands/Documentation for Word.plist' is at
>> http://pastie.textmate.org/415305 and the index file
>> 'Support/dmo_index' is at http://pastie.textmate.org/415304
>
> http://wiki.macromates.com/Bundles/HowToContribute
>
>
>
>
>
> ---------- Forwarded message ----------
> From: Daniel Stockman <daniel.stockman(a)gmail.com>
> To: TextMate users <textmate(a)lists.macromates.com>
> Date: Sat, 14 Mar 2009 13:11:59 -0700
> Subject: [TxMt] Re: Updating Javascript bundle?
> On Mar 13, 2009, at 3/13 9:14 AM, Michael Newton wrote:
>
>> So, how can I get the official bundle updated with this stuff? The
>> modified 'Commands/Documentation for Word.plist' is at
>> http://pastie.textmate.org/415305 and the index file
>> 'Support/dmo_index' is at http://pastie.textmate.org/415304
>
> If you're into the Git hotness, you could clone my fork[1] (or download a zip/tarball) of Thomas Aylott's work-in-progress restructuring of the bundle. I committed your patch into my repo, I like it a lot. :)
>
> [1]: http://github.com/evocateur/javascript.tmbundle/tree/master
>
> Regards,
> Daniel
>
>
--
Michael Newton
http://mike.eire.ca/
What's the process for updating a bundle? I got sick of looking at ads
whenever I needed a bit of Javascript documentation so I rewrote the
Javascript bundle to use developer.mozilla.org for documentation. In
addition to changing existing links, I also added dozens of very basic
methods (like document.getElementsByTagName or Array.join), statements
(like if...then...else), and operators (eg instanceof or new) that
were not included for some reason. And removed things like taint and
untaint, which haven't been supported by any browser since Netscape 3.
Hopefully the people from 1996 won't mind.
So, how can I get the official bundle updated with this stuff? The
modified 'Commands/Documentation for Word.plist' is at
http://pastie.textmate.org/415305 and the index file
'Support/dmo_index' is at http://pastie.textmate.org/415304
--
Michael Newton
http://mike.eire.ca/
Hello,
Is there an easy way to assign `Next Completion' to the `fn' key and
`Previous Completion' to `shift' + `fn' ?
(Reaching the `esc' key on a laptop keyboard is quite a stretch...)
Thanks,
Stéphane.
--
Ce message a été vérifié par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a été trouvé.
CRI UPVD http://www.univ-perp.fr
I have a WordPress 2.7 blog that I had been using with TextMate.
Around the time I upgraded WordPress to 2.7.1 and TextMate to 1.5.8
(1498), TextMate lost the ability to interact with my blog. it gives
"Error: bad login/pass combination(403)."
I've isolated the issue to when my password contains an ampersand (all
the other characters are letters and numbers). For example, when I set
the password to abcabc it works, but abc&abc does not.
Hello,
When I'm using TweetDeck, if I click on a link in TweetDeck TextMate
pops to the front and tries to open the URL. It can't and I get this
error:
This version of TextMate does not support “twitpic.com” in its URL
scheme.
If I drag TextMate to the trash, Safari opens the link as expected.
If I copy the link in TweetDeck it looks like this:
event:http://twitpic.com/1xtwr
Is there anyway to get TextMate to stop trying to open these links?
Thanks,
Adhamh