I get the following dialog when I try to run git commands from the editor
and yet git is installed in /usr/bin. Any idea on how to solve this?
[image: Inline images 1]
Hi Allan,
I spoke too soon. In the process of trying to install my personal bundle I somehow managed to corrupt it in both TM 1 and TM 2. Oddly, the desired macro now works as it should, but many other commands, snippets, and macros have disappeared. I tried copying over a clean copy from a backup but the problem persists. I must be doing something very wrong.
Any help will be gratefully appreciated.
Jenny
>>
>> [?] Here it is:
>>
>> \\( $0$TM_SELECTED_TEXT \\)
>>
>> Scope Selector: text.tex.latex
>>
>> Key equivalent: $
>>
>> In TM 1, the $ key outputs \( $0$TM_SELECTED_TEXT \). The curser is inside the math formula brackets \( \). It stays inside, regardless of what I write, until I type $ again. Then the cursor moves outside. That is just what I want it to do.
>
> The ?step two? of having ?$? inside the math brackets jump outside is likely done by a macro bound to ?$? and scoped to ?string.other.math.latex? because the snippet alone would not be able to do two different things depending on context.
>
> You can however change it to something like:
>
> \\( ${1:$TM_SELECTED_TEXT} \\)
>
> This will allow you to use tab to ?jump out?. Additionally it will keep the selected text selected (don?t know if you would consider that a feature or not).
>
> You can also improve the scope selector to: text.tex.latex - string.other.math
>
> That way its key equivalent will not fire when already inside a math string (you can also try this scope selector change alone, at least then you won?t get the snippet inserted again).
>
>> If I erase the snippet, then in both TM 1 and TM 2, the same thing happens. Inputting $ the first time yields $ $0$TM_SELECTED_TEXT $. The second time, the cursor moves outside. This would be fine, except that many of us have moved away from using $ signs to set off equations in Latex.
>
> It does sound like you have a custom ?jump out? function bound to ?$?. You can use Bundles ? Select Bundle Item? then switch to ?All Scopes? and ?Key Equivalent?. Now press ?$? to see a list of everything bound to that key. Although it?s really 1.x where you want to perform this search (which doesn?t have the ?All Scopes? option, but you can open up the window while the caret is inside math brackets, and it should search that scope).
Thanks for the helpful tips. This information helped me sort out the problem. When I exported my personal bundle to TM 2 last year, some of the macros must not have carried over. I tried to reinstall and ran into the "delta version" problem. I found instructions from you about how to fix this and now everything works as it should.
I am now officially moving over to TM 2!
Jenny
Hi,
I am using TextMate version 2.0.0 alpha 9359 and Python on OS X 10.8.2 with python bundle installed and updated 4 weeks ago. I can successfully run the script with Cmd-R (TM_PYTHON correctly set up). However, I would love to use Python interactively, sending lines independently to a known (and possibly started via Textmate) session of python on Terminal. What I am doing at the time is copying-and-pasting the commands from TextMate and python (picture). I have tried the build in command ctrl-sft-E (see picture), but it does not work.
I am not familiar with the scripts in TextMate and I am sure that somebody has working scripts to start a session of python on Terminal and be able to interactively send commands from the editor to it? Many thanks in advance for any help.
Best regards,
Ivan
Greetings,
it seem that my TM_PYTHON variable is being ignored.
I have it set to
/Library/Frameworks/Python.framework/Versions/Current/bin/python
which executes like so:
============
()[maye@alpha1 ~]$
/Library/Frameworks/Python.framework/Versions/Current/bin/python
Enthought Python Distribution -- www.enthought.com
Version: 7.3-2 (32-bit)
Python 2.7.3 |EPD 7.3-2 (32-bit)| (default, Apr 12 2012, 11:28:34)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "credits", "demo" or "enthought" for more information.
>>>
============
and then I wrote this little test script:
======
#!/usr/bin/env python
import sys
print sys.version
======
which, when executed via Cmd-R, returns:
====
2.7.2 (default, Jun 20 2012, 16:23:33)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)]
====
I also cross-checked what happens when I use env in the Terminal:
=====
()[maye@alpha1 ~]$ env python -c "import sys;print sys.version"
2.7.3 |EPD 7.3-2 (32-bit)| (default, Apr 12 2012, 11:28:34)
[GCC 4.0.1 (Apple Inc. build 5493)]
()[maye@alpha1 ~]$
====
So, it works in the Terminal fine, what do I have to do so that
Textmate's Cmd-R picks up the right interpreter, WITHOUT changing the
shebang (because the env-shebang is so common for online sources, it
would be a major pain to always have to remove or change it) ?
Best regards,
Michael
PS.: Running TM2 9373 on Mac OSX 10.8.2
Hi Allan,
It is truly wonderful to see so much activity again! I see so many improvements and am optimistic TM 2 will soon set the stage once again.
Here is my problem: I have continued to use TM 1, primarily the Latex bundle, because of one old snippet which does not work as it should in TM 2. I use it many times a day and would not like to give it up.
Here it is:
\\( $0$TM_SELECTED_TEXT \\)
Scope Selector: text.tex.latex
Key equivalent: $
In TM 1, the $ key outputs \( $0$TM_SELECTED_TEXT \). The curser is inside the math formula brackets \( \). It stays inside, regardless of what I write, until I type $ again. Then the cursor moves outside. That is just what I want it to do.
In TM 2, the $ key outputs \( $0$TM_SELECTED_TEXT \). The curser is inside the math formula brackets \( \). It stays inside, regardless of what I write, until I type $ again. Then I see \( \($0$TM_SELECTED_TEXT \) \) and the cursor is still inside. Not good!
If I erase the snippet, then in both TM 1 and TM 2, the same thing happens. Inputting $ the first time yields $ $0$TM_SELECTED_TEXT $. The second time, the cursor moves outside. This would be fine, except that many of us have moved away from using $ signs to set off equations in Latex.
Best regards,
Jenny
This topic resurges periodically. Allan (the main developer of TextMate) has stated the projects feature has not been implemented in TextMate 2 on purpose in favor of a completely filesystem-based approach. From his comments, it is clear that putting projects back into TextMate 2 is, if it is on his todo list at all, on the very bottom. After all, TextMate 2 is still an alpha, and there are other things that need to be fixed first. So I wouldn't hold my breath and wait for projects to return any time soon. Perhaps they'll be back in TextMate 3, who knows ;-)
Even though TextMate 2 is open source now, no one has volunteered (yet?) to add projects support. Right now, your best chance is to adapt your workflow or to continue using TextMate 1.5.
If you search this mailing list, you'll notice that I'm in the same boat as you, to me projects was what made TextMate 1 so appealing to me. There are a few things I've done to adapt:
(1) I've given up on symlinks, I open several editor windows instead.
The reason is that while symlinks work for single files, they don't work well for folders: if you create a symlink to another folder, you will not have a small triangle next to it which you can use to expand it. Double-clicking it works fine, but navigation is more cumbersome and there is a difference in how to work with symlinked and non-symlinked folders. Allen has explained why it is not easy to make this work properly (you have to account for all sorts of eventualities), and I don't think fixing this is very high on his list of priorities. If it is fixed at some point, perhaps I'll revisit it.
What I've done instead, I keep open the linked folder in a separate editor window. Definitely less elegant, but it works.
(2) Use good .tm_properties presets
The .tm_properties file allows you to set presets for a specific folder. There is one »master« .tm_properties file and it is worth spending a little time to customize it. However, I rarely edit the .tm_properties file of a specific folder (e. g. to hide certain auxiliary files). I often resort to the Terminal to open files instead of using the file browser.
.tm_properties is definitely more powerful than project presets in some respects, and perhaps if bundles make use if it (by editing the file or something), it could replace some of the functionality of projects.
(3) Use »mate .« to open folders.
Instead of »open project.tmproj«, I now type »mate .« to open a folder after navigating to it. I use git from the Terminal anyway, so I have become accustomed to opening folders like that. I keep several Terminal tabs open, one for each location in the filesystem I need (e. g. auxiliary files or documentation).
If you have more specific needs, just let us know. Perhaps there is a work-around.
Hope that helps.
Max