Hi everyone, Great discussion about the icons (though I agree it's perhaps the least important aspect of TM). During a bout of insomnia I fancifully thought up one that would just be "\B", as in "escaping BBEdit" :)
More seriously, I found myself opening BBEdit yesterday just for the web color palate. Does anyone know of a similar swatch picker (perhaps standalone) that would work within TM? Generally I use only a few colors, but I'm color-coding cell backgrounds based on numeric scales and need to see the whole "spectrum" as it were to help choose them.
Thanks for any tips...
Paul
On 24-11-2004 11:55, Paul Nordstrom August wrote:
Hi everyone, Great discussion about the icons (though I agree it's perhaps the least important aspect of TM). During a bout of insomnia I fancifully thought up one that would just be "\B", as in "escaping BBEdit" :)
More seriously, I found myself opening BBEdit yesterday just for the web color palate. Does anyone know of a similar swatch picker (perhaps standalone) that would work within TM? Generally I use only a few colors, but I'm color-coding cell backgrounds based on numeric scales and need to see the whole "spectrum" as it were to help choose them.
There's an extension to Apple's Colorpicker that adds a view to display the hex-value of colours. I don't have a link to it, but iirc it's listed on versiontracker.com
Jeroen.
Thanks Jeroen, Actually on examination the regular Apple Color manager contains web safe colors... They don't get pasted in (as with BBEdit's color palette) but it's still useful (and contains every color one would need!). (Hope people don't mind the image, but might help others.)
Is there any way to select a word, in e.g. "$bg = TM_COLOR", apply the color from the apple palate, then convert it into the HTML encoding with a macro? Way beyond my very humble skills I'm afraid :)
On 24 Nov 2004, at 12:20, Jeroen van der Ham wrote:
On 24-11-2004 11:55, Paul Nordstrom August wrote:
Hi everyone, Great discussion about the icons (though I agree it's perhaps the least important aspect of TM). During a bout of insomnia I fancifully thought up one that would just be "\B", as in "escaping BBEdit" :) More seriously, I found myself opening BBEdit yesterday just for the web color palate. Does anyone know of a similar swatch picker (perhaps standalone) that would work within TM? Generally I use only a few colors, but I'm color-coding cell backgrounds based on numeric scales and need to see the whole "spectrum" as it were to help choose them.
There's an extension to Apple's Colorpicker that adds a view to display the hex-value of colours. I don't have a link to it, but iirc it's listed on versiontracker.com
Jeroen. _______________________________________________ textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/mailman/listinfo/textmate
On Nov 24, 2004, at 10:55, Paul Nordstrom August wrote:
I found myself opening BBEdit yesterday just for the web color palate. Does anyone know of a similar swatch picker (perhaps standalone) that would work within TM?
I too has encountered that issue. One way around it is to open the Font panel ( cmd + T ) and then click on the "Text colour" button in the top bar there for a Color Picker palette. You can't programatically copy the colour value or anything like it, but you can mentally copy your desired colour values. It is far from ideal, but perhaps it saves you from starting up/switching to BBEdit.
Experience leads me to believe Allan probably has worked out - or can work out - a solution for it relatively quickly if enough people would need it and it wouldn't require too much time and work on his part. (??)
Personally, I would be satisfied with the system wide Apple Colour Picker palette that's available in Mail and other apps, and then have the value of the selected colour saved on the Clipboard as a hex-value for pasting into location.
Anyway, just my 2 pence worth of ideas. : )
Kind regards,
Mats
You can check iPick. http://www.schismband.com/k9prod/products.html
Works well and source code is available.
-- Fred B.
On 24-nov.-04, at 12:27, Mats Persson wrote:
On Nov 24, 2004, at 10:55, Paul Nordstrom August wrote:
I found myself opening BBEdit yesterday just for the web color palate. Does anyone know of a similar swatch picker (perhaps standalone) that would work within TM?
I too has encountered that issue. One way around it is to open the Font panel ( cmd + T ) and then click on the "Text colour" button in the top bar there for a Color Picker palette. You can't programatically copy the colour value or anything like it, but you can mentally copy your desired colour values. It is far from ideal, but perhaps it saves you from starting up/switching to BBEdit.
Experience leads me to believe Allan probably has worked out - or can work out - a solution for it relatively quickly if enough people would need it and it wouldn't require too much time and work on his part. (??)
Personally, I would be satisfied with the system wide Apple Colour Picker palette that's available in Mail and other apps, and then have the value of the selected colour saved on the Clipboard as a hex-value for pasting into location.
Anyway, just my 2 pence worth of ideas. : )
Kind regards,
Mats
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/mailman/listinfo/textmate
I'm sure if we can come up with some good reasons, Allan will consider adding one in. I've been thinking for a while that TM could have a pallet API, for things like a color picker, color swatches (a few blocks of color that paste in as hex), HTML entities.
So, the ultimate question is can users (other than HTML/CSS designers) gain from a color pallet as a hard-coded feature? If it's something that a large % of users could use, then I'm sure we've got half a chance of convincing Allan :)
I'll sent him a few ideas in the next coupla days...
Justin
On 24.11.2004, at 16:25, Justin French wrote:
So, the ultimate question is can users (other than HTML/CSS designers) gain from a color pallet as a hard-coded feature? If it's something that a large % of users could use, then I'm sure we've got half a chance of convincing Allan :)
Count this Ruby/TCL/PHP/nameityourself hacker in. Although I don't mind if it's external or hard-coded, as long as it's easily pluggable by a command.
//jarkko
-- Jarkko Laine http://jlaine.net
Justin French wrote:
So, the ultimate question is can users (other than HTML/CSS designers) gain from a color pallet as a hard-coded feature? If it's something that a large % of users could use, then I'm sure we've got half a chance of convincing Allan :)
One more.. I'd love to have a quick way of turning colors into RGB hex values - maybe even drag'n'drop the little colored blocks into the text and getting the codes there?
(I've started switching to the the Terminal's color pallet, remembering the RGB values, and then to BBEdit's ASCII pallet to get the Hex values, but that's just me :-P )
/MS
On Nov 24, 2004, at 17:02, M Spreij wrote:
One more.. I'd love to have a quick way of turning colors into RGB hex values - maybe even drag'n'drop the little colored blocks into the text and getting the codes there?
Yes, I'm looking into supporting drag'n'drop and pasting of colors this instant -- hopefully I can integrate this nicely with the drag-commands.
I'm also open for the mentioned palettes as long as this is a generic system -- I'm thinking something like just a new output option for commands (and the format would then be XML or similar). It would be more than palettes, more like custom UI with definable actions since it could then also be used for file templates (those which require additional options) and most likely also for e.g. having commands open menus for a further choice, similar to what Ian (?) requested for his PHP completion.
But I think if it's just added on top of the existing system it will be to clumsy -- I need to rework this to be "simpler".
It currently bogs me that the user needs to set how to interpret the output from commands, especially since a command can't then change it at run-time. OTOH it does simplify a lot of commands, since they then won't have to output structured text.
Op 24-nov-04 om 17:02 heeft M Spreij het volgende geschreven:
Justin French wrote:
So, the ultimate question is can users (other than HTML/CSS designers) gain from a color pallet as a hard-coded feature? If it's something that a large % of users could use, then I'm sure we've got half a chance of convincing Allan :)
One more.. I'd love to have a quick way of turning colors into RGB hex values - maybe even drag'n'drop the little colored blocks into the text and getting the codes there?
I made a quick little command for TextMate that shows a color picker, and inserts the hex value.
Note/Bug: I wanted to do 'tell application "TextMate" to choose color', but this will cause a deadlock. Applescript will wait till TextMate is done running his command, and TextMate won't stop running the command till Applescript is done. I just said, 'tell application "Finder" to choose color'. So you have to switch back to TextMate afterwards, which is a bit annoying :-)
On Nov 24, 2004, at 19:26, Jan Sabbe wrote:
I made a quick little command for TextMate that shows a color picker, and inserts the hex value.
Cool! :) Though you may want to mention that it requires Ruby 1.8.
I just said, 'tell application "Finder" to choose color'. So you have to switch back to TextMate afterwards, which is a bit annoying :-)
You could add “tell application "TextMate" to activate” as the last command.
Op 24-nov-04 om 20:13 heeft Allan Odgaard het volgende geschreven:
On Nov 24, 2004, at 19:26, Jan Sabbe wrote:
I made a quick little command for TextMate that shows a color picker, and inserts the hex value.
Cool! :) Though you may want to mention that it requires Ruby 1.8.
I just said, 'tell application "Finder" to choose color'. So you have to switch back to TextMate afterwards, which is a bit annoying :-)
You could add “tell application "TextMate" to activate” as the last command.
Well no, same problem. osascripts waits for textmate to complete, textmate waits for osascript to complete.
On 11/24/04 1:49 PM, "Jan Sabbe" jan.sabbe@student.kuleuven.ac.be wrote:
Well no, same problem. osascripts waits for textmate to complete, textmate waits for osascript to complete.
Maybe pipe command to devnull. I had a similar problem with an applescript I wrote to launch a tcl/tk program. Maybe my script can help:
do shell script "wish /Applications/CrossFire/CrossFire.tcl >& /dev/null &" --the output is piped to dev/null so this launcher can quit delay 5 --this delay is required so it doesn't open another instance of Wish when activating below tell application "Wish Shell" to activate
On Nov 24, 2004, at 20:49, Jan Sabbe wrote:
You could add “tell application "TextMate" to activate” as the last command.
Well no, same problem. osascripts waits for textmate to complete, textmate waits for osascript to complete.
Ah, of course. Try instead this command:
osascript >/dev/null 2>&1 -e 'tell application "TextMate" to activate' &
It's important with the stdout/stderr redirection.
On Nov 24, 2004, at 20:13, Allan Odgaard wrote:
I made a quick little command for TextMate that shows a color picker, and inserts the hex value.
Cool! :) Though you may want to mention that it requires Ruby 1.8.
And for those w/o Ruby 1.8 here's a version which uses awk for the formatting:
osascript -e 'tell application "Finder" to activate' -e 'tell application "Finder" to choose color'|tr -d ,|awk '{printf("#%02x%02x%02x", $1/256, $2/256, $3/256)}'
This is a grrrreat "plugin" and shows just how plain awesome the extensibility of TextMate is!!!
I had to change 'ruby' to '/usr/local/bin/ruby' to get the command to work. In command line even 'ruby' worked but when launched from TextMate, ruby was not found. This is probably an issue with the non-interactive/interactive shells that has been discussed before. Anyway, putting the whole path into the command helped.
The command also puts a newline character after the color value. This can be avoided by recording a macro where you: 1) Invoke the command. 2) Click right-arrow. 3) Click backspace.
This gets rid of the newline so you can add the semicolon right after the hex value ;-)
//jarkko
On 24.11.2004, at 21:34, Allan Odgaard wrote:
On Nov 24, 2004, at 20:13, Allan Odgaard wrote:
I made a quick little command for TextMate that shows a color picker, and inserts the hex value.
Cool! :) Though you may want to mention that it requires Ruby 1.8.
And for those w/o Ruby 1.8 here's a version which uses awk for the formatting:
osascript -e 'tell application "Finder" to activate' -e 'tell application "Finder" to choose color'|tr -d ,|awk '{printf("#%02x%02x%02x", $1/256, $2/256, $3/256)}'
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/mailman/listinfo/textmate
-- Jarkko Laine http://jlaine.net
According to Jarkko Laine:
The command also puts a newline character after the color value. This can be avoided by recording a macro where you:
- Invoke the command.
- Click right-arrow.
- Click backspace.
You should be able to get rid of it by changing the line to the following (untested):
<string>echo -e "color = `osascript -e 'tell application "Finder" to activate' -e 'tell application "Finder" to choose color'`; puts color.inject('#') {|tot,cur| tot += ('%04X' % cur)[0..1]}.chomp" | ruby</string> (notice the added .chomp).
Op 25-nov-04 om 10:23 heeft Jarkko Laine het volgende geschreven:
This is a grrrreat "plugin" and shows just how plain awesome the extensibility of TextMate is!!!
I had to change 'ruby' to '/usr/local/bin/ruby' to get the command to work. In command line even 'ruby' worked but when launched from TextMate, ruby was not found. This is probably an issue with the non-interactive/interactive shells that has been discussed before. Anyway, putting the whole path into the command helped.
Yeah, you have to set up your PATH in .bashrc
The command also puts a newline character after the color value. This can be avoided by recording a macro where you:
- Invoke the command.
- Click right-arrow.
- Click backspace.
This gets rid of the newline so you can add the semicolon right after the hex value ;-)
You could replace 'puts' by 'print'.
I updated the command: * it can use ruby 1.6.8 (installed by default on osx, so it should be in your path) * switches back to TextMate after picking the color * doesn't print the newline, doesn't select the output, so you can just continue typing
I'd put it on the wiki, but it looks very empty :-) Anyone doing some major restructuring on it?
now if only I had had this about 60 minutes ago, when I typed in the colors by hand from the Apple palette!
Many thanks! I tried the first version but didn't work; I guess I had the wrong version of ruby or just the default one...
brilliant, and really cool to boot :) Paul
On 25 Nov 2004, at 16:46, Jan Sabbe wrote:
I updated the command:
- it can use ruby 1.6.8 (installed by default on osx, so it should be
in your path)
- switches back to TextMate after picking the color
- doesn't print the newline, doesn't select the output, so you can
just continue typing
On Nov 25, 2004, at 16:46, Jan Sabbe wrote:
I updated the command:
- it can use ruby 1.6.8 (installed by default on osx, so it should be
in your path)
You didn't like the version I did with awk? ;)
I'd put it on the wiki, but it looks very empty :-) Anyone doing some major restructuring on it?
Previously the rollback link was hit by GoogleBot, so David removed it temporarily. It then got hit by wiki-spam a few times, and there is no rollback, so that's why the main page just links to the most recent un-spammed revision.
Currently it's only the main page which is "blank". Maybe David can give an ETA on when the rollback will be back!?!
On 25.11.2004, at 17:10, Allan Odgaard wrote:
Previously the rollback link was hit by GoogleBot, so David removed it temporarily. It then got hit by wiki-spam a few times, and there is no rollback, so that's why the main page just links to the most recent un-spammed revision.
Just a thought, but wouldn't making the rollback link something else than a plain link help here? I doubt that bots would follow e.g. a form button, or would they.
Not meaning to twist the blade here, I'm sure you're already thought about how to fix the vulnerability :-).
//jarkko
-- Jarkko Laine http://jlaine.net
Op 25-nov-04 om 17:10 heeft Allan Odgaard het volgende geschreven:
On Nov 25, 2004, at 16:46, Jan Sabbe wrote:
I updated the command:
- it can use ruby 1.6.8 (installed by default on osx, so it should be
in your path)
You didn't like the version I did with awk? ;)
Well yeah, but I bought the pickaxe 2 (ruby book) recently, and I want to get my money's worth out of it. I'm doing everything in ruby now :-)