While the File -> Open... dialogue has a button to show hidden files,
the File -> Save seems to have no obvious way to save a file to a
hidden directory.
I was creating an environment.plist file to save in ~/.MacOSX --- my
immediate work around was to save the file to the Desktop and use
Finder to move the file to .MacOSX --- I have set Finder to show all
files using either the defaults command or TinkerTool.
A search of the mailing list indicates that Cmd-Shift-G opens a sub
dialogue box to the File -> Save dialogue that allows you to type the
name of the directory directly but that would seem hard to discover.
Is there a preference in Textmate that modifies the File -> Save
dialogue to show hidden files ?
Phil Molyneux
Dear TextMate gods, dear everybody else :)
I've been notified that my my Taskmate bundle has been added to the
review directory:
http://macromates.com/svn/Bundles/trunk/Review/Bundles/Taskmate.tmbundle
Since the first announcement to this list quite some work has been
done on this bundle. We've been able to track down some bugs, added
some new features and tweaked everything according to the great
feedback of both Michael Sheet and early adopting users.
I've put together a list of the changes in the changelog:
http://macromates.com/svn/Bundles/trunk/Review/Bundles/Taskmate.tmbundle/CH…
Even at this early stage I'd like to say thank you to Michael for
doing an amazing job as a review gatekeeper and Nigel Green, who
attentively tested every single move I made, provided lots of feedback
and additional code as well as even a complete help file.
Now we are eagerly awaiting to get bashed down by you folks for any
glitches and mistakes in order to make this bundle even better :)
Thanks!
PS: For information about what Taskmate does please refer to the
bundled help file or the project page at http://www.artweb-design.de/projects/taskmate
--
sven fuchs svenfuchs(a)artweb-design.de
artweb design http://www.artweb-design.de
grünberger 65 + 49 (0) 30 - 47 98 69 96 (phone)
d-10245 berlin + 49 (0) 171 - 35 20 38 4 (mobile)
Greetings all. Been using TextMate for quite some time, but never had
a problem before now. Allan Odgaard suggested I post this to the list.
I installed Ruby 1.9 this morning by doing a source install from the
release tarball. I had to manually update the readline library and I
also had to change my path so that /usr/local/lib is read before /usr/
lib because of the libreadline.dylib that is contained there.
I can run Ruby 1.9 programs from the command line just fine, but if I
try to use command-R to run them from inside TextMate, I get:
------------------ BEGIN ERROR MESSAGE -----------------
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/
scriptmate.rb:4:in `require': /Applications/TextMate.app/Contents/
SharedSupport/Support/lib/io.rb:40: syntax error, unexpected ':',
expecting keyword_then or ',' or ';' or '\n' (SyntaxError) when 1:
lines.each { |line| block.call(line) } ^ /Applications/TextMate.app/
Contents/SharedSupport/Support/lib/io.rb:41: syntax error, unexpected
keyword_when, expecting keyword_end when 2: lines.each { |line|
block.call(line, name) } ^ /Applications/TextMate.app/Contents/
SharedSupport/Support/lib/io.rb:47: syntax error, unexpected
keyword_elsif, expecting keyword_end elsif sync? ^ /Applications/
TextMate.app/Contents/SharedSupport/Support/lib/io.rb:49: syntax
error, unexpected ':', expecting keyword_then or ',' or ';' or '\n'
when 1: block.call(data) ^ /Applications/TextMate.app/Contents/
SharedSupport/Support/lib/io.rb:50: syntax error, unexpected
keyword_when, expecting keyword_end when 2: block.call(data, name) ^ /
Applications/TextMate.app/Contents/SharedSupport/Support/lib/io.rb:
60: syntax error, unexpected ':', expecting keyword_then or ',' or
';' or '\n' when 1: leftovers.each_pair { |name,... ^ /Applications/
TextMate.app/Contents/SharedSupport/Support/lib/io.rb:61: syntax
error, unexpected keyword_when, expecting keyword_end when 2:
leftovers.each_pair { |na... ^ /Applications/TextMate.app/Contents/
SharedSupport/Support/lib/io.rb:67: syntax error, unexpected
keyword_end, expecting $end from /Applications/TextMate.app/Contents/
SharedSupport/Support/lib/scriptmate.rb:4:in `' from /Applications/
TextMate.app/Contents/SharedSupport/Bundles/Ruby.tmbundle/Support/
RubyMate/run_script.rb:1:in `require' from /Applications/TextMate.app/
Contents/SharedSupport/Bundles/Ruby.tmbundle/Support/RubyMate/
run_script.rb:1:in `'
------------------ END ERROR MESSAGE -----------------
I also get errors running a shell script, but not quite the same, and
it does then proceed to run the script after dumping the error
message, unlike with the Ruby script:
------------------ BEGIN ERROR MESSAGE -----------------
(erb):29:in `concat': character encodings differ (ArgumentError) from
(erb):29:in `html_head' from /usr/local/lib/ruby/1.9.0/erb.rb:743:in
`eval' from /usr/local/lib/ruby/1.9.0/erb.rb:743:in `result' from /
Applications/TextMate.app/Contents/SharedSupport/Support/lib/
web_preview.rb:116:in `html_head' from -:4:in `'
Hello World
Program exited with status 0.
------------------ END ERROR MESSAGE -----------------
As I said, I'm still able to run Ruby code from the command line, but
it's obviously less convenient, so I was hoping somebody might have
an idea what's going on. I'm still running Tiger and am on the latest
version of TextMate (Version 1.5.7 (1436)). Any thoughts, information
would be greatly appreciated.
Thanks,
Jeff LaMarche
Maybe I'm doing something wrong but I don't seem to be able to fold PHP
docblocks when they are like
/**
*
*/
even though the top fold arrow is shown (but the bottom isn't) only when
they are
/**
*
*/
however the code completion features such as doc<tab> and /**<tab> generate
the first block
Does anyone know how to fix it so that the first type of docblock folds
correctly?
Thanks
--
View this message in context: http://www.nabble.com/PHP-docblock-folding-tp14475232p14475232.html
Sent from the textmate users mailing list archive at Nabble.com.
[REPOSTING BECAUSE OF BAD FORMATTING]
Hi!
A well-known problem with Move Selection Line Up/Down
commands (Control-Command-Up/Down) is that if you use
them without selection (which means "move current
line"), the cursor ends up in the wrong place. This
has been bugging me and my friends for quite some
time, so I wrote a fix. It's two macros overriding
default key equivalents, which you can find attached
to the bug description at
http://macromates.com/ticket/show?ticket_id=58C52785 .
Please tell if this works for you.
Also, is it possible to put this fix into some
standard TextMate bundle like Text.tmbundle, so that
all TextMate users enjoy it? (Until it is fixed in the
new engine of TextMate 2.) What is the best way to do
it?
This is my first experience in TextMate programming,
and several times I've been stuck in various
dead-ends. What follows is a somewhat long description
of how I approached the problem along with some
suggestions on making TextMate easier to program. Most
people would like to skip this.
So, my first (rather silly) attempt was a huge Ruby
program which replicated functionality of Move
Selection Line Up/Down and depended on my assumption
that the cursor is always at the end of selection
(potentially allowing me to calculate all the
necessary offsets in the file). Well, it turned out
that my assumption was simply not true, as the cursor
can be anywhere inside the selection, depending on how
you've selected the text.
Suggestion 1. It would be useful if TextMate had
variables like $TM_SELECTION_START and
$TM_SELECTION_END which would return the
corresponding offsets in the file (or the cursor
offset, if nothing is selected).
On a second attempt, I decided that I should instead
go with the built-in commands, simply correcting the
cursor position for the special case when nothing is
selected. So we remember current cursor position, call
Move Selection Line Up/Down, and move the cursor back
to remembered position if nothing is selected. There
are two problems here. First, you can only call
built-in commands from macros, and it is not possible
to remember values through the steps of a macro.
Second, there is no direct way to reposition the
cursor. One indirect way to achieve this is to insert
a snippet with a $0 variable. However, to move the
cursor to arbitrary position in this fashion, we need
an output option like "Replace Document as Snippet",
which is not available. Because of these two problems,
I decided to use TMTOOLS plugin, which has "call
macro" (for calling arbitrary macros and built-in
commands from commands) and "set caretTo" (for setting
the cursor position). I got a working solution, but it
had a delay of 0.5 to 1 s, which was too slow to be
useful.
Suggestion 2. Add a way to set "global"
environment variables programmatically (from
commands). These "global" variables should be
available to all subsequently called commands (and
other bundle items) until explicitly unset.
Suggestion 3. Replace output options "Insert as
Text" and "Insert as Snippet" with just one
option, "Insert", and add a checkbox "as Snippet"
to the right. This would add such useful options
as "Replace Selected Text as Snippet", "Replace
Document as Snippet" and "Create New Document as
Snippet" without making the list of options too
long.
So, on a third (and final) attempt, I dropped TMTOOLS
and returned to the idea of a macro. Inspired by Duane
Johnson's solution for multiple insertion points, I
decided to use a special symbol (mark) to "remember"
the initial position of the cursor. So we insert the
mark at the cursor (if nothing is selected), call Move
Selection Line Up/Down, and replace the mark with
empty string (if nothing is selected), which moves the
cursor there as a side-effect. The problem here is
that Replace command always replaces current selection
with replace buffer, even if it doesn't match the find
buffer, which ruins the case when something has
already been selected in the beginning. Replace All
also ruins current selection, moving the cursor to the
beginning of the file even if it has not found any
matches. Fortunately, the Find Next/Previous command
will only change current selection if the match has
been found. So that's what we use. If there is a mark
in the text, it will get selected, otherwise, the
selection won't change. Finally, the selection is
replaced with an empty string if what's selected is a
mark. The wrong cursor position after Move Selection
Line Up/Down is always further in text than the right
position (actually, it's on the next line), so we use
Find Previous command to perform the search. Because
of this little detail, the solution is actually pretty
fast.
Suggestion 4. Replace All should not alter current
selection if no matches are found.
The only remaining question is what symbol to use as a
mark. I decided to use √ (221A, SQUARE ROOT character,
which you can type with Option-V), but I'm not sure
this is the best choice. Maybe it's better to use some
character from Private Use Area (E000--F8FF)?
Best regards,
Sergei Yakovlev
Hi all,
I am pretty new to textmate and would like to know if it's possible to
change the color of PHPdoc comments from normal comments. I've noticed
since using a lot of PHPDoc stuff in my code that it looks more confusing
than ever. Being able to change the color would help in making things more
readable.
I noticed there was a thread in 2006 that discussed this but it did not help
me. Also, I tried setting the scope of "comment.documentation" in hopes
that it my be the correct scope with no luck (it doesn't seem to match the
scope or something because nothing changes even after restarting textmate).
Any help would really be appreciated.
Thanks,
Clark Endrizzi
I apologize for being off-topic, but I think there's more expertise on
this list than I'll find elsewhere.
I'm thinking about moving my blog from Movable Type 3.2 to WordPress.
As a test, I've set up a local WP installation and imported my old
posts--all of which are written in Markdown. They look awful,
primarily because the blocks of source code in many of my posts are
not being imported properly. Here is what I've done:
1. Exported the MT 3.2 posts using MT's builtin export command.
2. Installed WP and the PHP-MarkdownExtra plugin. Activated the plugin.
3. Imported into WP the text file that came out of the MT export process.
The biggest problem seems to be that WP isn't recognizing the Markdown
formatting of the exported posts. What should be enclosed by
<pre><code>...</code></pre> are enclosed by simple paragraph tags
instead.
Has anyone here experienced and solved this problem?
--
Dr. Drang
Hi!
In XML bundle, the block doesn't fold properly
if the closing tag is not on a separate line.
Example:
<?xml version="1.0" encoding="UTF-8"?>
<document>
<page>This tag block doesn't fold properly.
It folds as if '/document' tag closes it.
The closing tag is on the same line.</page>
<page>This tag block folds properly.
The closing tag is on a separate line.
</page>
</document>
Cheers,
Sergei Yakovlev
Hi!
A well-known problem with Move Selection Line Up/Down commands
(Control-Command-Up/Down) is
that if you use them without selection (which means "move current
line"), the cursor ends
up in the wrong place. This has been bugging me and my friends for
quite some time, so I
wrote a fix. It's two macros overriding default key equivalents,
which you can find
attached to the bug description at http://macromates.com/ticket/show?
ticket_id=58C52785 .
Please tell if this works for you.
Also, is it possible to put this fix into some standard TextMate
bundle like Text.tmbundle,
so that all TextMate users enjoy it? (Until it is fixed in the new
engine of TextMate 2.)
What is the best way to do it?
This is my first experience in TextMate programming, and several
times I've been stuck in
various dead-ends. What follows is a somewhat long description of how
I approached the
problem along with some suggestions on making TextMate easier to
program. Most people would
like to skip this.
So, my first (rather silly) attempt was a huge Ruby program which
replicated functionality
of Move Selection Line Up/Down and depended on my assumption that the
cursor is always at
the end of selection (potentially allowing me to calculate all the
necessary offsets in the
file). Well, it turned out that my assumption was simply not true, as
the cursor can be
anywhere inside the selection, depending on how you've selected the
text.
Suggestion 1. It would be useful if TextMate had variables like
$TM_SELECTION_START and
$TM_SELECTION_END which would return the corresponding offsets in
the file (or the
cursor offset, if nothing is selected).
On a second attempt, I decided that I should instead go with the
built-in commands, simply
correcting the cursor position for the special case when nothing is
selected. So we
remember current cursor position, call Move Selection Line Up/Down,
and move the cursor
back to remembered position if nothing is selected. There are two
problems here. First, you
can only call built-in commands from macros, and it is not possible
to remember values
through the steps of a macro. Second, there is no direct way to
reposition the cursor. One
indirect way to achieve this is to insert a snippet with a $0
variable. However, to move
the cursor to arbitrary position in this fashion, we need an output
option like "Replace
Document as Snippet", which is not available. Because of these two
problems, I decided to
use TMTOOLS plugin, which has "call macro" (for calling arbitrary
macros and built-in
commands from commands) and "set caretTo" (for setting the cursor
position). I got a
working solution, but it had a delay of 0.5 to 1 s, which was too
slow to be useful.
Suggestion 2. Add a way to set "global" environment variables
programmatically (from
commands). These "global" variables should be available to all
subsequently called
commands (and other bundle items) until explicitly unset.
Suggestion 3. Replace output options "Insert as Text" and
"Insert as Snippet" with just
one option, "Insert", and add a checkbox "as Snippet" to the
right. This would add such
useful options as "Replace Selected Text as Snippet", "Replace
Document as Snippet" and
"Create New Document as Snippet" without making the list of
options too long.
So, on a third (and final) attempt, I dropped TMTOOLS and returned to
the idea of a macro.
Inspired by Duane Johnson's solution for multiple insertion points, I
decided to use a
special symbol (mark) to "remember" the initial position of the
cursor. So we insert the
mark at the cursor (if nothing is selected), call Move Selection Line
Up/Down, and replace
the mark with empty string (if nothing is selected), which moves the
cursor there as a
side-effect. The problem here is that Replace command always replaces
current selection
with replace buffer, even if it doesn't match the find buffer, which
ruins the case when
something has already been selected in the beginning. Replace All
also ruins current
selection, moving the cursor to the beginning of the file even if it
has not found any
matches. Fortunately, the Find Next/Previous command will only change
current selection if
the match has been found. So that's what we use. If there is a mark
in the text, it will
get selected, otherwise, the selection won't change. Finally, the
selection is replaced
with an empty string if what's selected is a mark. The wrong cursor
position after Move
Selection Line Up/Down is always further in text than the right
position (actually, it's on
the next line), so we use Find Previous command to perform the
search. Because of this
little detail, the solution is actually pretty fast.
Suggestion 4. Replace All should not alter current selection if
no matches are found.
The only remaining question is what symbol to use as a mark. I
decided to use √ (221A,
SQUARE ROOT character, which you can type with Option-V), but I'm not
sure this is the best
choice. Maybe it's better to use some character from Private Use Area
(E000--F8FF)?
Best regards,
Sergei Yakovlev
This is a strange one. The other day my Subversion commits have
suddenly stopped working in terms of uploading to the repository.
I ctrl-shift-A, use the commit and get the window for commiting the
files I've highlighted and the -m message window. Enter a message...
All good.
When I hit Commit however, I get the Subversion Commit -
"Transmitting File data" window and the barber pole but the window
never comes back with either a dialogue box for the password for the
user or anything at all. I end up having to quite Textmate in order
to kill it and then doing a command line svn cleanup on the files
that I was trying to upload.
Handling svn through the command line with svn ci file.rhtml -m "blah
de blah" works fine however.
Does anyone have any idea of what may be causing this and how to
correct it ? I've gotten so used to the svn budle it's really
cramping my style now...
thanks !
Daryl.
PS> OSX 10.4.11, Textmate Version 1.5.7 (1436), svn, version 1.4.5
(r25188)