Author Topic: Editor based on file type  (Read 9010 times)

artimeg

  • Jr. Member
  • **
  • Posts: 13
Editor based on file type
« on: January 28, 2007, 05:26:39 PM »
Hello, first off I want to say that I love YummyFTP.

I was wondering if it would be possible to have the quick edit toolbar button be based on the file type.

I have TextMate listed as my main editor. I did see the other post that showed the shortcuts for the editors, which I originally did not notice.

For example if I have some jpg's obviously TextMate can't do anything with those, so it would be nice if Photoshop could automatically open if I choose to edit a jpg.

For the Preferences area I was thinking you could select an editor, then have a textbox area where you could add extensions like jpg,gif,psd for Photoshop then select TextMate for htm,php etc.

I am not sure if this would be easily doable or not, or if anyone else would like this feature or not. I suppose I could just used to using the shortcuts, but sometimes I am lazy and want to use mouse for everything :)

JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2157
Re: Editor based on file type
« Reply #1 on: January 28, 2007, 05:49:42 PM »
What you're looking for already exists :)

Select 'Suffix Mapping' from the 'Transfer' menu
Select the file name suffix from the list shown (add one if your suffix doesn't exist)
Click 'Choose App' on the right to select your preferred editor
Enable the 'Use as default editor' checkbox
Click Save
Close Suffix Mapping window

When you click the Edit toolbar icon (not QuickEdit - that's only for text) the default editor will be chosen depending upon the selected file's name suffix. If the suffix matches the one you configured above then your preferred editor will be chosen.

artimeg

  • Jr. Member
  • **
  • Posts: 13
Re: Editor based on file type
« Reply #2 on: January 28, 2007, 06:01:18 PM »
Excellent, thank you!

I was looking in Preferences and didn't see it, cause it's not in Prefernces :)

artimeg

  • Jr. Member
  • **
  • Posts: 13
Re: Editor based on file type
« Reply #3 on: January 31, 2007, 06:16:10 PM »
Hi, I am having a little bit of trouble getting the Suffix Mapping working for me.

For example: I created one for .gif with Preview as default editor. I can get it to launch Preview but it is also launching my default editor, TextMate.

I have tried a ton of different combinations, but I either get TextMate only, or I get Preview and TextMate.

Thanks for the help!

JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2157
Re: Editor based on file type
« Reply #4 on: January 31, 2007, 07:14:58 PM »
You'll have to un-check the 'Post-process' checkbox for the .gif mapping entry, then save it. All the other settings are just fine.

I guess it's a bit of a bug that Yummy 'post-processed' the file when it was being edited - it shouldn't do that, so I'll fix this for the next release. This option is off by default, so I guess that's why it hasn't been found to date. Thanks for finding it!

artimeg

  • Jr. Member
  • **
  • Posts: 13
Re: Editor based on file type
« Reply #5 on: January 31, 2007, 07:45:22 PM »
Hi, thanks for the quick reply.

Glad to hear me playing around helped to atleast find a bug :)

I unchecked Post-Process under Downloading/Editing for .gif. I hit save then when I hit quick edit it is launching TextMate.

JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2157
Re: Editor based on file type
« Reply #6 on: February 01, 2007, 01:29:16 AM »
QuickEdit? Are you sure? That is supposed to be the built-in text-only editor.

Do you have more than one suffix mapping entry for .gif by mistake, perhaps?

Which version of Yummy FTP are you using?

artimeg

  • Jr. Member
  • **
  • Posts: 13
Re: Editor based on file type
« Reply #7 on: February 01, 2007, 01:47:03 AM »
Sorry I meant the external edit button. Which is set to TextMate by default.

I doubled checked to confirm that I only have 1 entry for .gif. I am using the default entries for the suffix's. I did not add any myself.

I was using version 1.5.2. I thought I was on .3 but obviously I wasn't, so I have downloaded the latest version and installed it, but I am getting the same problem.

JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2157
Re: Editor based on file type
« Reply #8 on: February 01, 2007, 01:19:30 PM »
Sorry for the delay... I've been looking at this, trying to reproduce it, but I can't! I reproduced your original problem, and I've already fixed that in a newer internal build of Yummy FTP. I'll send you a download link for that shortly, so that you can see if it makes any difference for you.

Until then, my suggestion at the moment would be to un-check the 'Post-process' checkbox in the 'Global settings' panel on the left of the Suffix Mapping window. If that doesn't work, try clicking the 'Defaults' button to reset all the mappings to to factory settings and then re-setup your .gif entry, ensuring that all the post-processing options are disabled.

Let me know how it goes.

artimeg

  • Jr. Member
  • **
  • Posts: 13
Re: Editor based on file type
« Reply #9 on: February 01, 2007, 06:53:29 PM »
Hi. No problem I am in no rush.

I unchecked the Post-Process under Global Settings and I get TextMate trying to edit the gif.

I have reset the mappings to default.

Went to gif entry and selected "Use as default editor" under downloading/editing on the right.

No options are checked under Global Settings.

I have attached an image of how my gif mapping section is currently after hitting Defaults button.

Is there a way to backup all of my ftp sites (usernames, passwords, and locations), bookmarks, etc... Because I don't mind backing up that info and starting from scratch setting up the Mapping just to rule out that there is some weird option I have selected some how.

Thanks for all of the help. If this is all too much trouble I really don't mind it if it doesn't work. It's not a deal breaker I still love Yummy :)

JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2157
Re: Editor based on file type
« Reply #10 on: February 02, 2007, 09:27:46 AM »
Thank you for your patience, understanding, and support! :)

However, I really want to get this sorted out - I can't leave something not working. The weird thing is that this feature is working just fine for me, and I know for a fact it is working for others too - just search this forum to see.

I can't send you a newer build just yet as I'm having trouble with something else that I need to resolve.

In the meantime, a clean install may be worthwhile trying, as you have suggested. All your Bookmarks are stored in one place: Macintosh HD -> Users -> yourname -> Library -> Preferences -> Yummy FTP -> Bookmarks

Drag everything inside the Yummy FTP folder except the Bookmarks folder to your Trash and then also Trash the file named 'com.yummysoftware.yummy-ftp.plist' which is located in the Preferences folder.

Now launch Yummy FTP again, re-setup your .gif entry and see if it is working as expected.

Just for the record, what version of OS X are you using, and what Mac are you using?

Thanks,
Jason

artimeg

  • Jr. Member
  • **
  • Posts: 13
Re: Editor based on file type
« Reply #11 on: February 02, 2007, 09:32:20 PM »
Sorry it took me awhile to get back to you.

Darn, no luck.

I backed up my bookmarks folder, then deleted 'com.yummysoftware.yummy-ftp.plist' file.

I removed Yummy with AppZapper, which I made sure it got the Preferences --> Yummy FTP folder.

I then reinstalled Yummy.

Opened the Mapping options dialog box. Selected .gif and clicked Use as default editor under downloading / editing.

Selected a .gif file under server view. Hit CMD+E then tried clicking Open in External Editor both of which opened the .gif in Textmate.

I wanted to make sure TextMate itself wasn't causing a problem, so I changed the default editor in the Yummy Preferences  --> Server Options --> Remote Editing to CSSEdit, then tried builtin editor. Neither of which helped. Everytime the default editor opened instead of Preview.

I am using a MacBook Intel Core 2 Duo running Mac OS X 10.4.8.

JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2157
Re: Editor based on file type
« Reply #12 on: February 03, 2007, 03:44:11 AM »
Ok, maybe there's an Intel-specific issue. I've been doing all my testing on my development Mac, which is still a lowly G4 PPC... yes, I'm a poor developer! ;)

I do have an old Intel Core-Solo Mac Mini, which I bought specifically to make the Universal Binary of Yummy, so I'll see what that does and report back.

justG

  • Full Member
  • ***
  • Posts: 44
Re: Editor based on file type
« Reply #13 on: February 03, 2007, 08:33:06 AM »
I thought I'd try to help by adding another data point.  I'm on a Mac Pro. I followed artimeg's order of tasks, changing the suffix mapping options so that Preview would be the default editor.  In Server Options, my default editor is the built-in one.  Hitting cmd+e opened the GIF in the built-in editor. I couldn't find the "Open in External Editor" option.

Hope that helps.  If I can do anything else, please let me know.

JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2157
Re: Editor based on file type
« Reply #14 on: February 03, 2007, 12:53:17 PM »
Oh my! Yes, indeed it is an Intel-specific issue. Bug officially squashed! :)

I'll send you a build shortly with the fix included.

Thank you both!