2009
08.02

One of a very few things that bug me about Panic’s Coda code editor is not being able to switch keyboard focus between editor pane and file list pane. It’s especially required when editing files directly on ftp server, where “Open quickly” menu command doesn’t work.

Using the Coda’s Objective-C API I managed to overcome described problem by making a simple plugin that does just one thing: switches keyboard focus between two panes. You can find plugin, and it’s source code, below. Feel free to do anything you want with it.

Source code
Coda plugin

12 comments so far

Add Your Comment
  1. Glad to see you “back.”

    I have tried to download the plugin, and now the source as well, but keep getting Zero KB files from your server.

    Please advise.

    Thank you for your time and consideration.

    Todd

    • @Todd,

      Thx for commenting and warning me.
      I had a bug in my download script. Everything should work fine now.

      Feel free to try to download again.

      larna

      • Thanks for the quick reply. Downloaded and happily keyboard focusing.

  2. Err bad choice of modifier as CTRL+1 or 2 is commonly used for Spaces. Anyway to change this aside from changing my system preferences?

    • The only other way is to change the key bindings in the source code, and then recompile it.
      I used CTRL as modifier because i don’t use those shortcuts for switching Spaces. I can’t really see anything wrong with changing plugins key bindings through Keyboard shortcuts in System preferences.

  3. This plugin isn’t working for me, and really need it to. I’m running Coda 1.6.5. I even removed all the other Coda plugins I’ve had and still nothing. Any ideas? The shortcuts aren’t mapped to anything else in Coda.

    In fact when I press the shortcuts the “Plug-ins” menubar item highlights for a second, but Coda doesn’t actually do anything.

    Also, in the Files section, when highlighting a file, what button just opens it directly? Couldn’t figure that out, so if did get this to work, couldn’t open a file.

    Thanks

    • When you have file highlighted, you can press CMD + DOWN ARROW to open selected file, or go into selected directory.

      As of what’s happening with the plugin, if menu item is highlighted that means Coda reacted to key presses and activated plugin. Try pressing keyboard arrows (up – down) to move through the list, after you tried to switch to file tree view.

  4. Love the plugin! You should note that you need to set Preferences > Files > Open Files With > Double Click. Otherwise every time you hit up/down on a file, it auto-opens and keyboard focus moves back to the editor pane.

  5. Great plugin! Now I want a key binding to actually OPEN the remote file… cmd+o just opens local files, ctrl+q only searches local files, cmd+enter doesn’t seem to work, enter just renames… BAGH! How do I open the remote file without having to grab my mouse?

    • Glad to hear you liked my plugin.
      CMD + DOWN opens a currently selected file, or enters the currently selected folder. CMD+UP exits the current directory an goes one directory UP. Just as in Finder. :)

  6. Wow. Brilliant! Thank you tons, this was a huge frustration for me. No longer.

    My left pinky will get a workout now!

  7. The only other way is to change the key bindings in the source code, and then recompile it.I used CTRL as modifier because i don’t use those shortcuts for switching Spaces. I can’t really see anything wrong with changing plugins key bindings through Keyboard shortcuts in System preferences.
    +1