I’m trying to create a command using AppleScript to open CodeKit and select the CodeKit project associated with the current TextMate 2 project.
CodeKit’s docs want this:
tell application "CodeKit" to select project containing path "~/clients/aProject/app.scss”
So I wrote this:
#!/bin/bash
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
osascript <<EOF
tell application "CodeKit" to select project containing path "$TM_PROJECT_DIRECTORY"
EOF
That launches CodeKit but does not select the project; CodeKit opens to the last used project, not $TM_PROJECT_DIRECTORY.
I’ve tried both “TM_PROJECT_DIRECTORY” and "’$TM_PROJECT_DIRECTORY’”.
What did I get wrong?
Bob
-------------------
Robert J. Rockefeller
Richmond Hill, GA
www.bobrockefeller.com
Is there a way to swap the include* / exclude* property order in TM2?
I have a project that is comprised of shared code used by many different
projects. Every time another developer adds files and directories to their
area of the source tree I have to add another exclude value in my
.tm_properties. Ideally I would like to exclude everything and only
include the directories and files that are specific to what I'm working on.
Reading the TM docs, it appears that the order is first to parse the
"include*" (which defaults to everything) then parse the "exclude*."
Because of this I can't figure how to, by default, exclude everything and
only include what I'm interested in.
Thanks for any help.
-- DV
--
View this message in context: http://textmate.1073791.n5.nabble.com/exclude-include-in-tm-properties-tp29…
Sent from the textmate users mailing list archive at Nabble.com.
I'm trying to match the following code in the D language grammar:
static if (true) {}
void foo ()
{
static if (true) {}
}
The first static-if is correctly recognized as
"keyword.control.conditional.d". But the static-if inside "foo" is
recognized as a method "meta.definition.method.d". I managed to get the
top level static-if correctly recognized by moving the pattern for the
static-if before the pattern for a method. But I don't understand why
that doesn't work inside "foo".
The full scope of the static-if inside "foo" is:
source.d
meta.block.d
meta.definition.method.d
entity.name.function.d
The language grammar is available here [1]. Are the patterns evaluated
in the wrong order or something like that?
Another thing I noticed is the "static if" on the top level seems to be
recognized as a single word. When I use the hot keys for moving the
cursor a word it jumps from the start of "static" to the end of "if",
instead of to the end of "static".
[1]
https://github.com/jacob-carlborg/d.tmbundle/blob/d2/Syntaxes/D.tmLanguage#…
--
/Jacob Carlborg
I'm trying to build TextMate and suddenly got this error:
[235/1222] Compile ‘Frameworks/crash/src/info.cc’…
FAILED: xcrun clang++ -include build/Shared/PCH/prelude.cc -c -pipe
-fPIC -gdwarf-2 -m64 -mmacosx-version-min=10.7 -funsigned-char
-D'NULL_STR="\uFFFF"' -DREST_API='"https://api.textmate.org"' -Wall
-Wwrite-strings -Wformat -Winit-self -Wmissing-include-dirs
-Wno-parentheses -Wno-sign-compare -Wno-switch -IShared/include
-fcolor-diagnostics -DNDEBUG -Os -fvisibility=hidden -std=c++1y
-stdlib=libc++ -I"/usr/local/include" -o
build/Frameworks/crash/src/info.o -MMD -MF
build/Frameworks/crash/src/info.o.d -Ibuild/include
Frameworks/crash/src/info.cc
Frameworks/crash/src/info.cc:61:3: error: thread-local storage is not
supported for the current target
thread_local stack_t stack;
I have successfully compiled TextMate before and have not seen this
error. info.cc has not been updated since April last year, I'm pretty
certain I've compiled TextMate after that. Could this be related to my
recent upgrade to OS X 10.10.3?
I have Xcode Version 6.3 (6D570) and Clang:
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix
BTW, both "__thread" and "_Thread_local" works fine.
--
/Jacob Carlborg
Multiple find-and-replace with Regexes, stepping through each one by one, the last one can be overstepped and insert the replacement tokens themselves (such as $1 $3)
Thanks,
John Joyce
Hi all,
I noticed code folding in TM2 in Ruby is slightly broken with multiline comments (using the =begin … =end construct)
Newlines within the comment introduce a new folding start.
Thanks,
John Joyce
When using ^W to select the next instance of a word, is there anyway to
step backwards if you go too far? In Sublime I think you just add a shift
to the key combo and it does this.
It sucks to be well into a nice fat multiple selection only to go a bit too
far and have to start over again.
Thoughts?
PS. I love TM!
--
Tom Smyth
Worker-Owner, Sassafras Tech Collective
Specializing in innovative, usable tech for social change
sassafras.coop *·* @sassafrastech
Resident, Touchstone Cohousing
touchstonecohousing.org
I am trying to follow these instructions and I do not understand how to
create a new command. Can someone please explain how this is done?
https://coderwall.com/p/j7qqsa/minify-your-css-inside-of-textmate
In your Bundles menu, go to Edit Bundles and select your favorite CSS Bundle
(I am personally a huge proponent of mCss
<http://minimaldesign.net/downloads/tools/textmate-css-bundle> ). Add a new
Command, and enter make the command contents the following code:
# Create the minified filename
NEWFILE=${TM_FILENAME%\.css}'.min.css'
# Minify into that file
curl -X POST -s --data-urlencode "input@${TM_FILENAME}" \
http://www.cssminifier.com/raw > $NEWFILE
# And open it
mate $NEWFILE
You can make your key equivalent anything you'd like, I set mine to Cmd +
Shift + R. Once you have done this, give it a whirl. You should see that
your styles.css generates a styles.min.css in the same directory, as well as
opens it in Textmate.
To note: if you don't have the Textmate command line utility installed,
simply delete the last line of this command to stop seeing errors.
Hello
The title says it all. I am running Textmate 2 (just reinstalled after
deleting ~/Library/Application Support/Avian, ~/Library/Application
Support/Textmate folders) on the latest version of Yosemite and get the
above error using the Latex bundle. The message then reads :
Command returned status code 1.
Upon editing the command, I get
---snip---
#!/usr/bin/env ruby18
# coding: utf-8
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/process"
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/htmloutput"
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/save_current_document"
# To enable the typesetting of unsaved documents, you must change the
“Save” setting of
# this command to “Current File” and add the variable TM_LATEX_AUTOSAVE
to TextMate's
# Shell Variables preferences. Be warned that your document must be
encoded as UTF-8 if
# you excercise this option — becauseTextMate.save_current_document
cannot know the file
# encoding you prefer.
TextMate.save_current_document unless ENV["TM_LATEX_AUTOSAVE"].nil?
texmate = ENV["TM_BUNDLE_SUPPORT"] + "/bin/texmate.py"
engine_version = TextMate::Process.run(texmate, "version")
TextMate::HTMLOutput.show(:title => "Typesetting
“#{ENV["TM_DISPLAYNAME"] || File.basename(ENV["TM_FILEPATH"])}”…",
:sub_title => engine_version) do |io|
TextMate::Process.run(texmate, 'latex', :interactive_input => false)
do |line|
io << line
end
end
::Process.exit($?.exitstatus || 0) # exitstatus is nil if our process is
prematurely terminated (SIGINT)
-- snip --
Unfortunately, I am not very good with shell commands.
Can anyone offer help ?
Christof