Cabbage Logo
Back to Cabbage Site

User selectable external editor?

Just an idea, it might take a bit too much to implement… But I think it would be useful if the user could select a specific app to be used as an external editor, for when “view source editor” is chosen but an external editor is preferred. I know different editors have different methods for specifying a file to open, so it might be cumbersome and require “special handling” for certain editors, but I think it would be neat if possible.

In the meantime, as a short term alternative… if external editor is enabled and view source is selected, can the internal editor open and display the file in a “read only” mode? Sometimes I just want a quick look at a line or two.

I like that idea. I’ll take a look. Most editors will open a file that’s passed directly after the executable name.

I think I’d prefer to go with idea one :wink:

I have that implemented. But you’ll have to wait till I get back from my Christmas break before I can get an OSX build ready for you.

Awesome, glad to hear that wasn’t as much of a headache as I was afraid it could be.

Once I have a build in hand I’ll test with what I have available. If something you’d like me to try is freely available and reasonably reputable, I’ll give it a shot… but I don’t want to test every John Doe’s CSI 201 class project text editor. :wink:

Thanks for adding this, I think it will add a lot to ease of use!

I’ve only tested it here on Linux. I’ll give it a go myself on OSX and Windows when I get a change.

I was able to set my editor in cabbage, however when I have it set to use an external editor and I choose “view source”, it still gives me the error saying that I should disable external editor to view the source. I don’t know if this was fully implemented yet, but if so it doesn’t appear to be working in OSX.

Apologies, I never actually tried it with OSX. I will do tomorrow. I’ll let you know when I get a fix.

You can try the latest binary now. I’ve checked and I can get it to launch Sublime. Note that if you wish to launch Cabbage with an associated file you may need to call the actual binary rather than the .app bundle, but try

open -a Cabbage.app /path/to/file/filename.csd

first and see if that works. If not use

./Cabbage.app/Contents/MacOSX/Cabbage /path/to/file/filename.csd

"The installation failed.

The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance."

Are there any logs or output that might help diagnose what went wrong?

It most likely installed fine, I don’t know why that message appears. Can you remove the CabbageAudioUnits folder from your Music directory and try it again? Installers on OSX break my heart.

Ok, removing the CabbageAudioUnits folder and reinstalling did the trick, no errors reported.

open -a Cabbage.app /Users/tgrey/csound/cabbage/work/Flanged/Flanged.csd

does not seem to work… however

/Applications/Cabbage.app/Contents/MacOS/Cabbage /Users/tgrey/csound/cabbage/work/Flanged/Flanged.csd

appears to work now! Viewing source also opens the file in Sublime… this all appears to be working perfectly now, thanks as always for the help!

It’s a bit of a pain that one has to use the actual binary image rather than the .app bundle, but at least it’s something to go on for now.

Sorry to necrobump, but did this end up being implemented into the master build?

Welcome to the forums, San!

No, I don’t think this made it into the master build yet. Rory had been running off “cabbage lite” builds for me and maybe a few others for quite a while. Those builds didn’t include the editor/patcher, and could be launched with a file to render as a command line argument.

It’s filled the need pretty well, but based on a recent convo with Rory it sounds like it may be finally getting retired in favor of a more integrated build that suits both needs. I hope that will make things easier for both Rory and I (along with any others interested in using cabbage with external editors).

He’ll probably pop up with some words on the future of cabbage with external editors soon. I think it’s still something that’s been getting consideration and discussion behind the scenes.

:laughing: That’s a new one on me. Top points for that.

What I can do for now is add an option in the Cabbage IDE to automatically reload files if they have been changed on disk. That would enable you to work with an external editor without having to continuously re-save or reload in Cabbage?

I’ve added a new menu command to deal with this. You can see how it works in the gif below. You’ll need the latest beta which is currently cooking for various platforms here. An artifact link will appear when it’s done.

Thanks guys! <3

That is an absolutely fantastic idea! I will test it as soon at it is not 5:17 in the morning anymore, and I have gotten some sleep. Thank you. I’m exited to try using VIM for cabbage dev.!

Hey Rory, this looks like a great first step towards the goal of integrating our wildly different use cases!

Hopefully I can try it out soon, but I’ve still been tied to an ancient build for the radiogroup() changes.

@t_grey, it’s about time I looked into that issue again! Right, I’ll start digging through the threads…

No worries Rory, I’ve had plenty keeping me busy too! But if you need any off-forum help testing or troubleshooting the radiogroup issue, feel free to let me know. I’ll be glad to help as much as I can.