"Find in Project" is a form of "find all", but I would like to see a
better implemenation of this.
Basically, "Find All" would work on single and multiple files (as
with BBedit's "Multi file search"), not just a project, and the
results would be either the whole block as currently, or only the
exact search term. Finally, I should be able to have the results
appear in a new document, or at least be copy/pastable.
I never, ever use column selection or typing, so perhaps the
following behavior is useful there.
Frequently I have a block of code I need to indent. Say my Ruby code
looks like this:
class Foo
def bar
puts "yay"
end
end
I lazily select parts of the lines I want, (because it's faster than
being sure to select the entire line) represented by the | in the
following showing the start and end of the selection:
class Foo
de|f bar
puts "yay"
en|d
end
When I press cmd-], I expect:
class Foo
def bar
puts "yay"
end
end
(which is what BBEdit gives me), but what I get is:
class Foo
de f bar
puts "yay"
end
end
...where's the logic in that? If I have no text selected, but the
carat is in the middle of the line, cmd-] shifts the whole line (as
desired). I suggest that the 'break-the-line' method only occur if
the selection is columnar - i.e. if the start column of later lines
is the same as the start column of the first line.
Stakeout looks fantastic! Here's what I'm envisioning for my AS
development:
I have a command set up right now to cd to my project directory and run
rake if it finds a Rakefile, otherwise running MTASC into a temp file
to check the syntax, formatting the output and giving me a clickable
error list. What I'd like to do is be able to run this command any time
a class file is changed. Problem is I don't think there's any way to
tell TxMt to run a command from outside the GUI. Is there any way we
could get some kind of access to Commands through the tm utility?
___________________
Ben Jackson
Diretor de Desenvolvimento
ben(a)incomumdesign.com
http://www.incomumdesign.com
On 06/09/2005, at 19.29, Jeff Powell wrote:
[ I've cc'ed the ML, since this is a popular request, yet you're the
first to suggest solving the problem with a command :) ]
> It's pretty basic really --- I've got a project setup in TM and
> quite frequently, I will need to make a copy of a file inside of
> the project [...] Can I make a command that might do the duplication?
Yes, make a command that saves current file (since it duplicates
what's on disk). The actual command should be:
--------8<--------
# so we can work with relative paths
cd "$TM_DIRECTORY"
# construct a default name for the duplicate
def_name=`perl -pe <<<"$TM_FILENAME" 's/^(.*?)(\.[^.]*)?$/$1 copy$2/'`
# prompt user for a name
CocoaDialog inputbox --text "$def_name" --button1 "Duplicate" --
button2 "Cancel"|{
# if user selected 'Duplicate' and file doesn't exist
read res; read new_name;
if [[ "$res" == "1" && ! -e "$new_name" ]]; then
# do the actual duplication
cp -p "$TM_FILENAME" "$new_name"
# force TM to refresh project drawer and open duplicate
{ osascript -e 'tell application "SystemEvents" to activate' \
-e 'tell application "TextMate" to activate'
open -a TextMate "$new_name"; } &>/dev/null &
fi
}
While waiting for proper chunk undo, is it possible for a macro or
command that can do something similar? I'm thinking it would
recognize text between spaces for each chunks; that way, whole words
undo at a time. It's not perfect, but would certainly be easier than
cmnd-zzzzz...
I just realised you can use the same tab trigger for different
snippets. When you use the trigger, you get a menu to choose between
the snippets assigned to it.
awesome.
Just a warning based on fresh experience :-), "r" is next to "t" in a
QWERTY keyboard, so there is a chance you type "rm file" instead of
"tm file". I just did!
-- fxn
this new snippit in the 'Source' group is cool. It would be even cooler
if it did the right thing when user hits the enter key within the banner
text. The right thing would be insert a new banner line below current
line and put cursor in its usual starting position on the new line.
Entering a new line character currently breaks the banner in an ugly way.
I've started to port the Desert theme from gvim to TextMate. You can preview
it here: http://kevinmarsh.com/upload/tm-desert/Desert.plist It is by no
means complete, so if anyone wants to make any changes/improvements feel
free to do so. I just made a quick port 'cause it's so purdy.
-Kevin
--
Kevin Marsh <kevin.marsh(a)gmail.com>