Looking at the post http://blog.macromates.com/2011/format-strings/, I was
excited by the idea of being able to dynamically include other patterns
into the matched scope.
However, it doesn't quite work. I have in my Jekyll grammar, a pattern:
{
begin = '\{% highlight (html) %\}';
end = '\{% endhighlight %\}\n';
name = 'source.$1.embedded.html.markdown';
patterns = (
{ include = 'text.html.basic'; },
);
},
This is handled fine: it matches as intended, and puts the html into the
name as expected.
However, I can't use the same trick in the included patterns:
{
begin = '\{% highlight (html) %\}';
end = '\{% endhighlight %\}\n';
name = 'source.$1.embedded.html.markdown';
patterns = (
{ include = 'text.$1.basic'; },
);
},
In this case, the syntax highlighting of the embedded code is not applied.
I know this is a simple example: I am hoping to be able to extend it to
automatically match whatever type of file I want highlighted (python, js,
ruby, html, css, ... you get the picture).
Regards,
Matt.
Is there by any chance a user defaults setting to control the length of the recent searches / recent replaces lists in TM1?
(I notice they are much longer, and scrollable, and zebra striped in TM2, which is a nice improvement)
Cheerio,
Michael Johnston
lastobelus(a)mac.com
When I open a folder which is a git working repo the SCM status icons do not
show and the go to SCM status folder does not work either by pressing the
puprple cog folder or the menu item. I¹ve fixed a previous git issue where
TM2 was not finding git by adding TM_GIT = "/usr/local/bin/git" to a
~/.tm_properties file. However the SCM status problems still persist.
Any ideas please? Thanks in advance.
Anthony
-----------------------------------------
**************************************************************************
The information contained in the EMail and any attachments is
confidential and intended solely and for the attention and use of
the named addressee(s). It may not be disclosed to any other person
without the express authority of the HPA, or the intended
recipient, or both. If you are not the intended recipient, you must
not disclose, copy, distribute or retain this message or any part
of it. This footnote also confirms that this EMail has been swept
for computer viruses, but please re-sweep any attachments before
opening or saving. HTTP://www.HPA.org.uk
**************************************************************************
Hi,
in TM1, the incremental search (^s) allows me to jump to the next match
by pressing ^s again. This silently fails in TM2. (If it's just NYI,
please simply ignore the noise.)
Christopher
I have an old TeX file which I need to recompile.
It cannot be compiled with pdflatex, but it can be compiled with
latex then dvips and then pstopdf.
Has anybody written a Textmate macro directly using this toolchain
or do I need to write the macro myself?
> When in XML mode, with the caret inside <a></a> like <a>|</a>, pressing
> ^< does not result in <a><p></p></a> as it does in TM1, but in
> <a<>></>></a>, which is not well-formed XML.
I had noticed this in HTML mode as well and I think I've found kind of a workaround. In the HTML bundle, select "Insert Open/Close Tag (With Current Word)" and change "Input" from "Selection" to "Nothing". This will prevent the behavior you are seeing but will also remove the ability to type an element name and invoking this function to make a tag out of it. TM1 seems to have more"Input" filter options.
Not sure what to do about your other issue with the ^<a completion. Maybe it is related to the input filters as well.
Hope this helps,
Craig
Dear all,
The R bundle for Avian/TM2 seems to have lost the (neat) ability to
add and move to an indented new line after typing an open brace
followed by Enter. That is, going from
{.}
to
{
.
}
by typing Enter (dot indicates caret). I got used to this in TM1 and
it saved countless little bits of time, so I'd like to get it back. I
see that it works in C, so obviously it can be done with TM2, but I'm
not sure what change I need to make to the R bundle to get it working
again. Any pointers would be gratefully received...
While I'm on the topic, it would be nice if standalone "if" statements
produced indentation on the next line (again as in the C scope), so
that I can write R code like
if (x < 0)
x <- abs(x)
without having to indent the second line manually (and then unindent
the line following it). This has never happened with the Textmate R
bundle, so perhaps Hans-Jörg could take it as a feature request... ;)
I assume it's a matter of tweaking the language grammar.
All the best,
Jon
I'm missing the old HTML/PHP bundle in TM1 - the one that was revised to work with mixed HTML and PHP. Does anyone know how I can install it in TM2 or have a replacement for use in TM2.
Cheers,
Ed Wong
Is there any .tm_properties OakLineHeightDelta equivalent? I am using -2 OakLineHeightDelta in TM1, which somehow matches to Xcode and other NSTextView based text editors.
Cheers,
--
Adam Strzelecki
From the 8956 release notes:
"Introduced callback.application.did-activate and callback.application.did-deactivate as two new semantic classes. A command with this class will be executed when the application gain/lose focus. The scope selector is matched against the “current scope” of the visible document (in each window). This allows creating a command with “Save” set to “Modified Documents” and thereby recreating TextMate 1.x’s ability to save modified documents on lost focus."
Has anyone gotten this to work? In my personal bundle, I created a new command called "Save files when focus is lost", set the Semantic Class to "callback.application.did-deactivate", set Save to "Modified Documents", and Input to "Nothing". But the files never save. Can't think what I'm doing wrong.
By the way, the command shows up in the Bundles menu, even though there's no point to having it there. Is there a way to keep the command enabled and active but off the menu?
Thanks,
Trevor
I'm using Txmate 1.5.10 on Lion.
I've always been able to run Ruby programs from within Txmate, now I can't.
I've changed a few things in my set up, though, so that might be the reason
(?).
First I downloaded Ruby 1.9.2 from RVM and I modified my path in .profile
as follows:
PATH=$PATH:.:~/.rvm/rubies/ruby-1.9.2-p290
export PATH
Could that be the reason I'm having problems?
Is there a way to click on a folder in the file browser and create a new
file? I know you can create new folders and at the moment i'm duplicating
files in place of creating them, but if you create a new folder I can't see
a way of creating a new file.
Thanks.
--
View this message in context: http://old.nabble.com/Create-New-File-tp33111522p33111522.html
Sent from the textmate users mailing list archive at Nabble.com.
Hi,
Just to know if it's plan or not to add Project File to TM2, because i use
a lot of projet and it's really borring to find the projet in the finder !
Thanks.
Hi,
When in XML mode, with the caret inside <a></a> like <a>|</a>, pressing
^< does not result in <a><p></p></a> as it does in TM1, but in
<a<>></>></a>, which is not well-formed XML.
Also, in an empty file in XML mode, pressing ^< a TAB will, in TM1, move
the caret inside the element, but in TM2, it seems to hit the snippet
bound to <a, resulting in
<name attr="value">
</name>></a>
That snippet exists in TM1, too, but it seems the priority of who gets
the TAB key first has changed. Tabbing inside a freshly created element
still works in TM2 for elements whose name is not a snippet trigger.
Christopher
I have been using the JavaScript tools bundle from
https://github.com/subtleGradient/javascript-tools.tmbundle. Recently, the
key bindings seem to not be working. I have tried removing it and
re-installing it the bundle, but this didn't help. I don't believe this is
a problem specific to this bundle (which hasn't changed), but something I
have done to TextMate to make it act differently.
Previously the command-option-R key would run the "Run in Node.js" command
in this bundle. Now I find that it runs the menu command "Text / Filter
through command". I could not figure out how to remove the key binding to
the menu command. The TextMate manual says I can change the key bindings
for the menu from System Preferences - Keyboard and Mouse, but I'm running
Lion and this seems to be different than what is described in the manual.
System Preferences - Keyboard - Keyboard Shortcuts has a place to add
Application specific shortcuts, but I could not see any shortcuts already
defined for TextMate and could not figure out how to remove any.
It also may be that something is wrong with the scope of this bundle. The
scope selector for the "Run in Node.js" command is set to "source.js", but
when I run "Select Bundle Item", "Run in Node.js" does not show up. I can,
however, pick the command from the bundles menu and it works fine.
I would appreciate any help. I really need this to work for a talk I am
giving next week.
Hi
The instructions at http://blog.macromates.com/2007/file-type-detection-rspec-rails/ obviously don't apply to TM2 as written, but does anybody have an equivalent?
I'm getting all .rb files coming up as either RSpec or Ruby on Rails, regardless of whether the filename ends in _spec.rb, and it's making things a bit awkward, to say the least. (It probably worked fine out of the box and I've done something to break it, but I can't see how to get back without nuking TM2 and all its prefs…)
Thanks
BTW, should Select > Current Scope select an entire "describe ... end" block in RSpec? It either selects one word or the whole file when I try it.
--
John Yeates
Is it possible to extend the existing web preview themes in TM2? All
variants of Avian/Themes/WebPreview, Avian/Support/web-themes, etc.
which I have been trying don't seem to have any effect on the choices
available to style the HTML output pane.
Hi
Is there any way to set 2 as the tab size and soft tabs for all file types
by default ?
I've checked this thread
http://lists.macromates.com/textmate/2011-December/033540.html, but I
didn't understood how to do that. Maybe I need some guidance :)
--
Rodrigo Flores
Hi folks,
I'm experiencing some weirdness trying to open _some_ YAML files with TextMate 2. For example when I try to open a Rails database.yml file, I'm prompted thusly:
If I click 'Open', I see this:
and TM2 locks up and I'm forced to restart. I've tried several Google searches and I haven't found any mention of this behaviour. Does anyone have any idea what might be going on?
Carpe viam,
Mike
Michael Larocque
Chief Cook and Bottle Washer
Prolumina Communications Inc.
http://prolumina.com/mlarocque/
Twitter: http://twitter.com/mrl
When I try to open files that have extended characters (e.g. curly
apostrophe) and are saved with "Western - Windows" encoding, TextMate 2
gives an "Unknown Encoding" error with a hex dump of the file and asks
for the encoding. If I choose "Western - Windows", TextMate opens the
file successfully. (The default encoding is set to the default, "Unicode
- UTF-8".) Also, if I have a project containing these files, Find In
Project fails because TextMate sees them as binary files.
Is there any way to have TextMate autodetect the encoding so that
opening and searching files works as expected? Thanks,
Trevor
In my inexperience I deleted my Blogging Bundle template. At least I saved it
as a blank file. Is there a way to get that back?
I have a Google Blogger blog that I would like to edit with Text Editor. I
can't seem to get it to work. I can't find the endpoint URL on Blogger. Does
Blogger work or can you suggest a better blogging website?
Does anyone have any good learning projects to get started with TextMate and
AppleScript?
This stuff is so fun but I feel like I am standing at the base of a mountain
and I have no idea where to begin.
Thanks,
Josh
--
View this message in context: http://old.nabble.com/Deleted-Blog-setup-template%2C-Google-Blogger%2C-Good…
Sent from the textmate users mailing list archive at Nabble.com.
The behavior of the files list changed in TextMate 2. In TextMate 1, it included the current file, but in TextMate 2, the current file is not in the list.
I know that sounds like not a big deal, but it can be a problem with large projects containing many files. On several occasions I have opened the files list, typed a few characters, and spent the next two minutes freaked out and confused because the document I know exists is "missing", only to realize it's right under my nose.
Any chance we could get the old behavior back? Thanks,
Trevor
For example, I would like to do this:
windowTitle = "$TM_DISPLAYNAME – ${TM_DIRECTORY/$TM_PROJECT_DIRECTORY//g}"
where the string in TM_PROJECT_DIRECTORY is being removed from the string in TM_DIRECTORY
Thanks!
Michael Johnston
lastobelus(a)mac.com