Customizing the Editor in Fugu

When I changed hosts for my blog, it also meant that I could no longer just SMB the files around. I had to find an actual SFTP/SCP-client for my Macbook. A quick Google search turned up Cyberduck and Fugu. I arbitrarily chose Fugu. (Turns out this was the right decision. Dustin convinced me to try Cyberduck; version 2.6.1 crashed three times in a row while I was trying to type in the hostname. But I digress…)

Fugu is pretty slick, but it would only open files for editing using one of the preset editors, none of which I had. I decided to see if I could change the list of available editors to include TextEdit, since I was only editing basic CSS.

Turns out you can. Here’s how.

1. Right click on the Fugu application and choose “Show Package Contents”

picture_1.png

2. Navigate to Contents, Resources, ODBEditors.plist

picture_2.png

3. Open the ODBEditors.plist file in TextEdit. Scroll to the bottom of the file and either create a new entry or modify one of the existing entries. I modified the emacs entry, since I don’t plan on ever using it. You can copy and paste the following into the file:

Updated text version thanks to Rich:

<dict>
    <key>ODBEditorBundleID</key>
    <string>com.apple.TextEdit</string>
    <key>ODBEditorCreatorCode</key>
    <string>ttxt</string>
    <key>ODBEditorLaunchStyle</key>
    <integer>0</integer>
    <key>ODBEditorName</key>
    <string>TextEdit</string>
</dict>


Original post text version:

<dict>
    <key>ODBEditorBundleID</key>
    <string>-</string>
    <key>ODBEditorLaunchStyle</key>
    <integer>0</integer>
    <key>ODBEditorName</key>
    <string>TextEdit</string>
    <key>ODBEditorPath</key>
    <string>/Applications/TextEdit.app</string>
</dict>

Original post image version:
picture_3.png

4. Save the file and you’re good. Load up Fugu, click Fugu, Preferences. In the preference pane, click the Files icon. In the External Text Editor, choose the name of the editor you just created. In my case, TextEdit.

picture_4.png

Viola! You can now command-J to edit files with your chosen editor from Fugu.

14 thoughts on “Customizing the Editor in Fugu”

  1. This is great but I’m getting permission error:

    /Applications/dev/Fugu.app/Contents/Resources/externaleditor /Applications//TextEdit.app “/private/tmp/Fugu/tmp.mr09ON/RUNNING.txt” “/root/RUNNING.txt”; exit
    execve /Applications//TextEdit.app failed: Permission denied
    /Applications//TextEdit.app exited with 2

  2. Hey jvence,

    Looks like you have too many “//” in your “/Aplications//TextEdit.app” string. Remove the duplicate / and you should be good. You probably mistyped it while you were editing the ODBEditors.plist file.

  3. Thanks for the hint Jessie! You can also change the order they appear, so your favourite editors appear at the top of the list – personally, I’d have TextEdit, Bluefish and vi as my top 3.

    This doesn’t matter so much, but it’s worth a mention: A fully correct TextEdit entry looks like this:


    ODBEditorBundleID
    com.apple.TextEdit
    ODBEditorCreatorCode
    ttxt
    ODBEditorLaunchStyle
    0
    ODBEditorName
    TextEdit

    If you’re not sure of an app’s creator code, just Google it! :-)

  4. Instead of a nice image of the text that should be included, how about using a Textbox so that all we need to do is copy and paste the text into ODBEditors.plist ?

    1. Muneeza, I’m not sure what is wrong. Did you modify the ODBEditors.plist file exactly as stated above? Does TextEdit exist in your Applications folder?

        1. Hey Alex, I’m no longer using Fugu, so I don’t know if the fix above still works. It’s possible Apple has changed something in the last few years that breaks it. Good luck and let me know if you figure it out!

        2. Thanks a lot for your reply … may ask what you use? I searched the web, but it was not clear to me whether there are good alternatives to fugu …

          1. I use Transmit (http://panic.com/transmit/). It’s not free, but I like it. Since I’m no longer a broke college student, I don’t mind paying for software.

            But if you *are* a broke student or if you just need something free, you might try Cyberduck (http://cyberduck.ch/). It looks like development is ongoing, so it may be better now than when I tried it seven years ago. :) It isn’t free through the App Store, but I think it’s still free if you download it directly from their site.

  5. This may help some… install Apple’s developer tools. That comes with a plist editor (at least what I have in 10.6.8) you will be able to edit in a very friendly graphical environment… then all you have to do is to open package for the text editor you want to map (I did that for gedit), copy the necessary information that you will need to paste in the newly created entry in Fugu’s ODBEditors.plist, save, launch Fugu, goto prefs (command-comma) and select the newly added editor :)

  6. I have added the external text editor with the help of this post , thanks! However, if I edit files and save them, they are not updated on the server. They are saved in some temporary folder in fugu. How can I save file back on the server after modifying it ?

    Thanks

    1. I’m not sure what’s going on. I wrote this 14 years ago, and I’ve stopped using Fugu since then, so I can’t test.

      Generally with SFTP software, I download the file, edit it, then re-upload it. If you open it from the server, it probably is temporarily saved somewhere on your local machine and may need to be manually uploaded. But I’m not sure how Fugu works anymore. Good luck!

Leave a Reply to jvence@gmail.com Cancel Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.