bobthecow / coda-cli

Makes Panic's Coda a first-class *nix citizen
http://justinhileman.info/coda-cli/
MIT License
53 stars 4 forks source link

--line flag? #2

Closed davidchambers closed 13 years ago

davidchambers commented 13 years ago

Would it be possible to add a --line flag? I'm a front-end developer, and I find myself doing this frequently:

  1. Inspect Element in Chrome
  2. Identify style sheet and line number that I'd like to change
  3. Open style sheet using, for example, coda layout.css
  4. Return to Chrome because I've forgotten the line number
  5. ⌘⇥ to Coda
  6. ⇧⌘L
  7. Enter line number

It'd be awesome to be able to instead do this:

  1. Inspect Element in Chrome
  2. Identify style sheet and line number that I'd like to change
  3. Open style sheet at the correct position using coda layout.css --line 231

I've no idea, though, whether Coda exposes this functionality.

bobthecow commented 13 years ago

Coda doesn't expose this functionality. I tried three our four ways of faking it, but the only one that worked was so heinous that I don't even want to commit it to the repo :)

If you don't mind a lotta ugly (and a feature that only works in english) here ya go:

https://gist.github.com/fbcd7592c9110d58f125

davidchambers commented 13 years ago

Thanks for the super-quick response, Justin. I had a suspicion that using AppleScript might be the only way to do it. This may seem heinous to you, but compared to a ridiculously fragile script I once wrote — which interacted via the mouse with both InDesign and Acrobat — it's positively elegant. :)