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