Hi,
I am trying to change the "Make" Bundle's "Run" command. I create projects
in folders and I want to execute an executable (in my case, I am writing
apps with the extension .prg for a Commodore 64 to be run inside an
emulator).
Currently, I am using a line like this:
open "$TM_PROJECT_DIRECTORY/myapp.prg"
The problem is I don't want the apps to all be called myapp.prg. What I
would like is something more like:
open "$TM_PROJECT_DIRECTORY".sub( /(.*)?\/(.*)$/, "\1/\2\2.prg" )
(I don't actually know Ruby but I used an online ruby regex explorer).
Translated, this means that I want to use the last component of
TM_PROJECT_DIRECTORY as the filename, appended to the directory and then
append .prg to the end of that.
I tried the code below:
-----------
#!/usr/bin/env ruby
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/executor"
TM_RUN = "open "+ENV['TM_PROJECT_DIRECTORY'].gsub( /(.*)?\/(.*)$/,
"\1/\2/\2.prg" )
flags = ""
Dir.chdir(File.dirname(ENV["TM_PROJECT_DIRECTORY"]))
TextMate::Executor.run(TM_RUN, flags, :verb => "Running") do |line, type|
end
-----------
This didn't work. 2 Things are wrong. 1) the regex replace didn't work - I
am guessing that the return from ENV[] isn't something you can call .sub on?
-- and 2) the Executor.run says it wants the path added to the path variable
(I know that by feeding it a hard-coded line to an existing .prg file).
Can someone maybe help me figure out how to make this go?
Thank you
Stefan
--
View this message in context: http://old.nabble.com/Executing-a-file-based-on-manipulating-TM_PROJECT_DIR…
Sent from the textmate users mailing list archive at Nabble.com.
Hi all-
Having trouble running the "new" TextMate bundle with a LaTeX file that worked via the old (or current, stable) bundle and (now) works on the command line. Here's a bit of the log:
> This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009) (format=pdflatex 2009.11.7) 6 AUG 2010 11:43
> entering extended mode
> file:line:error style messages enabled.
> **"/Users/cturner/Documents/BIZ/Personal/Resume, etc./Resume-2009/resume20090628.tex"
> (/Users/cturner/Documents/BIZ/Personal/Resume, etc./Resume-2009/resume20090628.tex
> LaTeX2e <2009/09/24>
>
> [clip...]
>
> Package: ifxetex 2009/01/23 v0.5 Provides ifxetex conditional
> )
> /usr/local/texlive/2009/texmf-dist/tex/xelatex/fontspec/fontspec.sty:18:
> ********************************************
> * XeTeX is required to compile this document.
> * Sorry!
> ********************************************.
> \RequireXeTeX ...********************************}
My document uses XeLaTex and has this as its first line:
> %!TEX TS-program = xelatex
So I imagine my problem is that XeLaTeX isn't getting run.
My default engine in Preferences is "xelatex" so, being a noobie, I'm not sure what else to do to tell the bundle my desires.
Any help greatly appreciated!
Best wishes,
Charles
I have the following snippet where the tab $1 is intended to match the
whole string (to be used in LaTeX)
${1:\NMsubject{\textbf{${2:Subject}}}}
However the tab $1 does not match the last two braces - I suspect this
is an issue with the LaTeX and TextMate use of braces.
The snippet below works as expected (but would be no use in LaTeX
${3:someText|someMoreText|${4:Subject}||}
Is there some way to get $1 above to match to the last brace ?
Phil
I'm a new user and I don't have a Unix background, so I am struggling with
Section 21.1. in the manual.
I am attempting to use TextMate as an external editor.
1. It works fine with my various Cocoa apps, with the shortcut showing up in
the Edit menu. No problems here.
2. I need to use TextMate with Tinderbox (a non Cocoa app). Users on the
Tinderbox forum have various ways of doing this, either using the "mate"
command in Terminal, or using a variety of ways of calling this command.
However, my problem is that I cannot get commands via terminal to import
text, or save it back. "mate -h" does bring up a menu of commands, so that
much is working. Quite likely, this is owing to my lack of experience with
the command line.
I have read and re-read section 21.1. but it assumes a familiarity with Unix
and CL operation which is new ground to me.
I would really appreciate a *simple*, assuming-nothing, explanation of what
I need to do to copy contents of a window from my non-Cocoa app (Tinderbox)
into TextMate, and then back again -- presumably using some variant of the
"mate" command via Terminal.
--
View this message in context: http://old.nabble.com/Difficulty-using-TextMate-as-external-editor-tp305546…
Sent from the textmate users mailing list archive at Nabble.com.
I am using TextMate 1623.
I have just gone back to learning PERL and I am now unable to ask for info (<STDIN>). I have scripts that worked previously, and now fail. All of the scripts work on the command line.
Any ideas?
T. Zakharko wrote:
>
> Dear all,
>
> I post this here because I am unsure of who is the current maintainer of
> the Sweave bundle. The help files list Alan Schussman as author, but as
> the bundle has last been updated in 2006 I have no idea if he is still
> responsible for it.
>
> To make the story short: it is sometimes desirable to run Sweave with a
> custom driver. I need it for literate programming documentation style
> where I want Sweave to skip the code parsing to allow for chunks
> containing incomplete R expressions (and I also developed a very simple
> driver that does just that). A probably more common usage would be
> invoking the pgfSweave driver instead of the vanilla one.
>
> An option like
>
> %!TEX SWeave= my_driver
>
> would be very nice. I can hack something like this together on my own, but
> this is a feature which should probably be added to the official
> distribution.
>
> Thank you,
>
> -- Taras
>
P.S. I have patched the Sweave bundle's 'Sweave,Typeset and View' command
with following:
# get the Sweave driver option
DRIVER=`grep -e '^%!TEX Sweave' "$TM_FILEPATH" | sed 's/.*=//g'`
SW=${TM_SWEAVE_WD:=${TM_DIRECTORY}}
if [ -n "$DRIVER" ]; then
echo -e "setwd('$SW')\nSweave('$TM_FILEPATH', driver=$DRIVER)" | R
--no-restore --no-save --quiet | pre
else
echo -e "setwd('$SW')\nSweave('$TM_FILEPATH')" | R --no-restore --no-save
--quiet | pre
fi
This replaces the previous R invocation and works reasonably well. Usage is:
%!TEX Sweave= my_driver
Maybe someone could patch it to the official repo...
--
View this message in context: http://old.nabble.com/Sweave-bundle-feature-request-tp30588762p30594043.html
Sent from the textmate users mailing list archive at Nabble.com.
I have noticed that especially after upgrading to 10.6, TextMate has become more and more crash prone -- especially after switching from another app back to TextMate. I use it mainly in larger LaTeX projects in conjunction with git and nowadays it would crash, two, three times a week. I often switch back and forth between Skim or Preview and Textmate. Hence, I mostly don't lose any data, because I've saved the file before switching apps, but nevertheless, it's quite disconcerting.
Back in the (good old ;-) 10.4 days, TextMate was absolutely rock solid and it was exceedingly rare for TextMate to crash. Are those known issues? Will there be more fixes down the road for 1.5 addresses stability problems? What are the root causes?
Hi,
I try to run a feature with cmd+R and it gives me the following message:
:29:in `require': no such file to load -- spec (LoadError) from :29:in
`require' from /Users/mhenrixon/Library/Application
Support/TextMate/Bundles/Cucumber.tmbundle/Support/lib/cucumber/mate.rb:23:in
`' from :29:in `require' from :29:in `require' from
/Users/mhenrixon/Library/Application
Support/TextMate/Bundles/Cucumber.tmbundle/Support/lib/cucumber/mate/feature_helper.rb:1:in
`' from :29:in `require' from :29:in `require' from
/tmp/cucumber-19009.rb:2:in `'
The RSpec specs work fine it's just my features that don't run. I hate
having to switch to console to do this. Any suggestions?
Mikael Henriksson
Tel: +46 (0) 730- 393 200
mikael(a)zoolutions.se
Hi there,
I have Python related issue within TextMate. I am trying to start Python
script directly from TextMate, but it fails.
Here comes the output from Terminal:
michalo:/Users/michalo/test> python simple.py
One
Two
michalo:/Users/michalo/test> cat simple.py
#!/usr/bin/python
import xml.etree.ElementTree as ET
def main():
element = ET.XML("<root><child>One</child><child>Two</child></root>")
for subelement in element:
print subelement.text
if __name__ == "__main__":
# Someone is launching this directly
main()
michalo:/Users/michalo/test> python simple.py
One
Two
michalo:/Users/michalo/test> python --version
Python 2.6.1
However, if I use Python bundle to start this script directly from the
TextMate (Bundles -> Python -> Run script) I get following error:
ImportError: 'No module named etree.ElementTree'
module body in xml.py at line 3
import xml.etree.ElementTree as ET
copy output
Program exited with code #1 after 0.19 seconds.
If I start it from TextMate Bundles -> Python -> Run script (Terminal)), I
am getting following error:
Traceback (most recent call last):
File "/Users/michalo/Documents/work_files/public/notes/python/xml.py",
line 3, in <module>
import xml.etree.ElementTree as ET
File "/Users/michalo/Documents/work_files/public/notes/python/xml.py",
line 3, in <module>
import xml.etree.ElementTree as ET
ImportError: No module named etree.ElementTree
michalo:/Users/michalo/Documents/work_files/public/notes/python>
Do you know what can be the source of the issue?
That's what I get from the Terminal windows (when I try to get Python
version):
michalo:/Users/michalo/test> which python
/usr/bin/python
michalo:/Users/michalo/test> python --version
Python 2.6.1
michalo:/Users/michalo/test>
And you can find attached screen shoot from text mate. I have created simple
text file:
which python
python --version
And executed it with: Bundles -> Shell Scripts -> Run script
Does anyone have an idea what's wrong here?
Cheers
Michal
A recent attempt to update bundles returned
"sh: git: command not found"
But in terminal, I see
bash-$ git --version
git version 1.7.3.1
which is something new. What's happening?
I'm running TM Version 1.5.10 (1623)
Model Identifier: MacBook5,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2.4 GHz
with OS X 10.6.5
Something odd has happened to Find in the latest build. When I selected a word and hit Cmd-E (Use Selection for Find) it appends a carriage return to the word. I can see this when I open the Find dialog.
Any idea what is happening?
Ed
Greetings,
I recently set up a new system with RVM and ruby 1.9.2 (default) as well as
1.8.7 and Rubinius. The system ruby is currently 1.8.7.
I followed the instructions here:
http://rvm.beginrescueend.com/integration/textmate/ to set up RVM and
textmate to work and play nice together. These steps work and don't.
When I use the run command textmate execute the file using the correct ruby,
for example the "puts RUBY_DESCRIPTION" returns the expected ruby 1.9.2.
However, when I "Execute line/ selection as ruby" I still get ruby 1.8.7
(the system ruby).
Looking at the bundles the "Execute line/ selection as ruby" command starts
with "#!/usr/bin/env ruby"
How should I modify the bundles such that it run the selection or line via
the TM_RUBY environment variable rather than the system ruby?
Thanks!
Shane
http://scr.im/shaneknysh
Hey Everyone,
How can I ignore .dSYM folders? I've been fiddling with this for like an
hour now and can't get the regular expression right in preferences. It's
probably the most obvious thing in the world but it's eluding me.
This is my current folder ignore pattern
!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$
I've tried adding |\.dSYM like this:
!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle)|\.dSYM)$
And a couple other variations, but with no luck
Thanks for any help!
I'm having similar issues with GetBundles, not git related (or so it appears).
Minimalistic log message:
01/02/2011 13:56:32 TextMate[GetBundles]
Installing “Haskell”
01/02/2011 13:56:32 TextMate[GetBundles]
Could not install “Haskell” by using “https://github.com/textmate/haskell.tmbundle/tarball/master”
01/02/2011 13:56:57 TextMate[GetBundles]
Installing “Closure Compiler”
01/02/2011 13:56:57 TextMate[GetBundles]
Could not install “Closure Compiler” by using “https://github.com/macek/closure-compiler-tmbundle/tarball/master”
Regards,
-Josh
____________________________________
Joshua Kehn | Josh.Kehn(a)gmail.com
http://joshuakehn.com
Hello
i would like to know if it's possible to install the latest version of ruby and python
and to avoid problem with textmate?
What is the better method to do this ?
Best regards
Alain Matthes
This is my first post to this list so I just want to say thank you Allan,
for your fantastic ideas, for that is what truly makes TextMate not only the
greatest, but orders of magnitude greater than the closest contender. I'm
positive the code is delightful as well, but it was your fantastic vision
that saw what could be achieved if you made it easy and accessible to not
just write a script, not only write a script that can manipulate one's text
to finest granularity, you didn't only give us the tools to define and parse
our languages as we see fit, but you fought to package all of it up and
spread it around in a transparent, open source, community driven way, so we
can each build off each other and do more than any of us could have alone.
Not only that, but you honestly make sitting around configuring shortcuts
something I look forward to. Currently I'm plugging an RTF -> HTML
converter into a shell script that will render to web preview so I won't
have to leave TM for anything but AppleScripts. No other program is nearly
flexible enough that I would even know where to begin. And for that, Kudos.
OK, onto the second part. I'm guessing usually people ask questions, and I
actually do have one I'll ask at the end. But here is the answer to
something I looked for, for quite a few hours and could find almost nothing.
Definitely not anything close to the solution (people were brute forcing it
with bash scripts, barf). I'm sure it's common knowledge for you haxxors
out there at this point, but the reason I'm posting this is so hopefully it
will get put up somewhere or indexed and save some people some time.
So at first, I wanted all plain-text file with any extension to open with
TextMate. No problem. Then I wanted all files with NO extension to open in
TextMate. That took a few minutes but I was about to find some instructions
that sorta worked and get it fixed from there. However I also want all
files without an extension to open in Ciaran's TM in QL plugin. It's super
easy, and now I'm like "Duh!" Here are the steps:
0. Get plugin and install it if you haven't already*. Or use a different
generator. Other generators will work, but they aren't nearly as cool.
1. [Optional] If you have a file you specifically want to know is gonna
open, go to terminal and type mdls <path/filename>. Read the value for this
key: kMDItemContentType. That is the UTI type. Remember it.
2. Type in 'mate
/Library/QuickLook/TMQuicklook.qlgenerator/Contents/Info.plist' to a
terminal.
3. Find the key "LSItemContentTypes" and start duplicating lines to add
more UTI types. I added public.source-code, p.xml, p.plain-text, p.data,
and com.apple.property-list, and I'll just continue adding more when I find
types that don't open. But p.plain-text and p.data take care of
unextension'd files.
4. Run "qlmanage -r" and "qlmanage -r cache" to both reload the generators
and clear the thumbnail cache.
* http://ciaranwal.sh/2007/11/15/quicklook-and-textmate
That's it! You can use that process to make each filetype/UTI open in
SOMETHING (run qlmanage -d 4 -p <file> and it prints the paths of all its
generators!) so you aren't starting at a gigantic icon, sitting there,
mocking you with his complete lack of utility.
OK, I do have a couple questions though (*questions in bold*): *what is the
status on true multikey bindings?* I've been poking around for a while, and
I know how to make them for the built in NSResponder action methods (delete
a line, move around, etc) with the DefaultKeyBinding.dict. I want to be
able to map an arbitrary TextMate (or other program) action to these things
however. I tried poking around in some nibs and got some method names from
menu items, but couldn't get it working with KeyBindingsEditor. Ideally I'd
be able to map it to any script, application, or action.
This is similar to what ThisService does, actually (maps any script: ruby,
osa, etc to OS X Services menu which can bind to a hotkey. Takes input,
spits out text). Another goal is to use this 'services' ability to write a
little 'Edit in TextMate' script that can take your text and a keycombo, run
a TextMate command on it and spit it back into the textbox all in the
background. My impression is that they nerfed Input Managers with Snow
Leopard, so I'm tentatively planning on using AppleScript to move the text
around, and if that is too slow I'll figure out how to write a SIMBL plugin.
*What's the opinion on AppleScript for that? Can it be done reasonably
fast in the background? *
*
*
2 last questions: first off, *what tools should I be using to write a regex
for use in the language definition?* While awesome and useful, I find
(especially large) regex's incredibly ugly and unintuitive. I would like
to have a better syntax (my tentative idea is to use a ' ' (space) for
escaping to reduce clutter), a 'metalanguage' where I can glance at a
regex-equivalent and grasp its operations and matches quickly, and a
visualizer to help even more. I am getting started on all of this, but I'd
like to know if maybe I'm reinventing the wheel and just didn't find the
right tool yet. The problem isn't that I can't write regexes, but that they
are so complicated it is a barrier to new TextMate features. If we had
something everyone could put together like legos, I think it would really
help jump start development. As it is, I can barely adjust the line endings
for the languages I have.
My final question is: There is bundle/command menu at ctrl+cmd+t, in which
a user can search their current scope by typing a command name, or search
all scopes by typing in uppercase. One can also search by keyboard shortcut
in the current scope. However* I'm unable to find a method by which to show
all commands of a certain binding in every scope. Is there such a command?
* I plan to write an application to keep track of system wide keyboard
shortcuts and this would be very useful.
Thanks again, you made coding not just fun but exciting. And always
remember, the closer you get to perfection, the easier it is for others to
complain. I'm sure you've been there. If I'm on windows, I don't mind just
clicking the buttons and doing my thing (for a few minutes). The experience
is so crappy you'd have to start over to make it good. It's only when it is
sooo sooo close to perfect, like TextMate, that I can sit and ponder and
think and pore over what exactly isn't quite perfect and could be fixed.
And luckily I can at least fix some of them when I'm using TextMate.
Cheers, mate!
Brandon
Hi Lewy, I was having this same problem; eventually I tried updating the GetBundles bundle and that fixed the problem. Have you given that a shot yet? You have to do it manually (go to the GetBundles.tmbundles directory and run 'svn up'). I also have TM_GIT set to /usr/local/git/bin/git in TextMate's Advanced Preferences.
-Daniel
Hi,
I have no idea where this question should be directed but I'll try here
first.
I have a problem with running cucumber features from inside Textmate. I get
the following error:
:29:in `require': no such file to load --
/Users/mhenrixon/Projects/blog/.bundle/environment (LoadError) from :29:in
`require' from /Users/mhenrixon/Library/Application
Support/TextMate/Bundles/Cucumber.tmbundle/Support/lib/cucumber/mate.rb:10:in
`' from :29:in `require' from :29:in `require' from
/Users/mhenrixon/Library/Application
Support/TextMate/Bundles/Cucumber.tmbundle/Support/lib/cucumber/mate/feature_helper.rb:1:in
`' from :29:in `require' from :29:in `require' from
/tmp/cucumber-32008.rb:2:in `'
TM_RUBY = /Users/mhenrixon/.rvm/bin/textmate_ruby
PATH
= /Users/mhenrixon/.rvm/gems/ruby-1.9.2-p0/bin:/Users/mhenrixon/.rvm/gems/ruby-1.9.2-p0@global
/bin:/Users/mhenrixon/.rvm/rubies/ruby-1.9.2-p0/bin:/Users/mhenrixon/.rvm/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin
At some point it just stopped working, I have had it running so obviously I
changed something somewhere down the line but I have no idea where to start
looking.
Can someone tell me what to do to make it start working again? Most of the
time I use autotest but... it's nice to be able to run a feature quickly as
well.
Mikael Henriksson
Tel: +46 (0) 730- 393 200
mikael(a)zoolutions.se
Hi all,
I have been using the R bundle in textmate for a while and so far a never
encountered any problem. Recently, I just update my machine for the new snow
leopard 10.6.3 but I can no longer use R and textmate properly: while syntax
highlighting is still working, textmate simply doesn't send any script to
the R console. I got a message that says: "Please install Rdaemon first",
which doesn't make much sense to me, since, according to the Bundle editor,
Rdaemon is alredy installed and enabled. Please, help!
Best,
Antonio.
Much of the time, the Find button is disabled until I click in the Replace
text field.
Specs:
TextMate 1.5.10
Mac OS X 10.6.5
MacBook Pro 5,1
Cheers,
Andrew Pennebaker
Thanks for the replies!
Am 28.12.2010 um 13:00 schrieb textmate-request(a)lists.macromates.com:
> I don't think this is TextMate's fault. Let me guess: You're using the ProjectPlus plug-in. Does the issue below sound like your problem?
Yes, you'd be right. I'll keep an eye on TextMate. So far, I've deactivated labels for git.
> They usually aren't accurate anyway, in my experience.
Yes, I've noticed that, too. Especially when I use manually created projects rather than just taking whole directories.
Hi all,
Don't scream, I am new to textmate and the Mac.
Latest version of TextMate. ^< does not perform as advertised but
(Shift)^< does insert opening and closing tags. Has there been a change
in the program. I do not see any other suggestion in the documentation.
I have installed, removed and reinstalled the program twice without
any change in behavior.
I am a Mac and Linux newbie!
Thanks,
Bob