Editing modules outside of the VMD editor?

Post Reply
User avatar
TheGarnet
Posts: 36
Joined: Mon Aug 22, 2022 1:55 pm

Editing modules outside of the VMD editor?

Post by TheGarnet »

Can we edit our java source outside of the VMD editor?

I am really missing having multi-window edit. Paging back and forth in a single window is driving me a little crazy.

Would really love to edit my VM modules with Joe's editor.....
User avatar
Aarnville
Posts: 43
Joined: Sat Jun 18, 2022 5:14 pm

Re: Editing modules outside of the VMD editor?

Post by Aarnville »

There is a setting in preferences that will allow VMD to recognise edits made outside the IDE but there are a couple of limitations, the main one being that any edits you make in the auto-generated sections are ignored and overwritten when you pull the file back into VMD. This is particularly annoying if you want to refactor anything that is included in InitilaizedControls().

I ran like this for a while but it quickly got frustrating. So now I run with Notepad++ on a second monitor and manually cut and paste chunks of stuff between the two for more complex edits. NP++ does all the usual stuff with colour coding, brace matching, formatting and comprehensive search/replace and also has a superb column edit mode. It's still not ideal but definitely better for me and it's an editor I know inside out.

For a couple of my more complex modules I developed and tested much of the code in a separate NetBeans environment but that's only really useful on particular cases. Netbeans is also a good way to play with code snippets you find on places like StackOverflow where someone has asked "How do I do X?" and got half a dozen completely different replies, all of which work, leaving you wondering which is best or most efficient or, in some cases, the most understandable.
poetix
Posts: 54
Joined: Mon Nov 28, 2022 3:26 pm

Re: Editing modules outside of the VMD editor?

Post by poetix »

I am using IntelliJ to work on a Java project that builds a jar file, which my VMD project imports. Unfortunately there's no way to get the VM types into Intellij - no API jar I can import - so everything on the IntelliJ side has to be "pure" DSP / state management etc code that then gets wired up to the VM system in the VMD project. But it turns out that leads to better-organised code anyway - a separation of concerns between stuff that responds to knobs being twiddled and triggers being received, and the underlying sound engine that turns inputs into outputs.
London, UK
Developer, Vulpus Labs
Musician, w/trem
UrbanCyborg
Posts: 588
Joined: Mon Nov 15, 2021 9:23 pm

Re: Editing modules outside of the VMD editor?

Post by UrbanCyborg »

Compiler Explorer is also worth a check:

https://godbolt.org/

I always edit in an external editor, in my case Multi-Edit. Yeah, I know it's dead and gone, but it still works gangbusters for me, especially since I have a very large library of macros for it. And, I was DoSD there for a couple of years back around '05. For me, the only downside to it is that it never supported UniCode, save to translate out of it.

Reid
Last edited by UrbanCyborg on Sat Dec 10, 2022 10:18 am, edited 2 times in total.
Cyberwerks Heavy Industries -- viewforum.php?f=76
AllanH
Posts: 13
Joined: Sat Nov 26, 2022 5:23 pm

Re: Editing modules outside of the VMD editor?

Post by AllanH »

I am using Visual Studio Code with Java extensions. The seems to work well and all the [/user-ABC] tags are visible.

It is a bit dangerous as a CTRL-S in in VMD may overwrite the Java file. Its just so painful to the built-in editor.

I found Eclipse to cumbersome with VMD.
UrbanCyborg
Posts: 588
Joined: Mon Nov 15, 2021 9:23 pm

Re: Editing modules outside of the VMD editor?

Post by UrbanCyborg »

I always save from my external editor, with no problems, so long as I resave in VMD when I toggle back to it, so that it's aware of the changes.

Reid
Cyberwerks Heavy Industries -- viewforum.php?f=76
User avatar
Waverley Instruments
Posts: 129
Joined: Thu May 05, 2022 2:10 pm

Re: Editing modules outside of the VMD editor?

Post by Waverley Instruments »

UrbanCyborg wrote: Sat Dec 10, 2022 10:20 am I always save from my external editor, with no problems, so long as I resave in VMD when I toggle back to it, so that it's aware of the changes.
Same here using Sublime. Just have to be careful not to make a change in VMD if you haven't saved in the editor, otherwise you get a prompt to re-load the file when you flip back to the editor, potentially loosing your code changes :?

I keep meaning to do a VM plugin for Sublime but it's really not high priority especially as Sublime is "vaguely smart" about remembering stuff. For example, once you've used GetSmoothValue() once when editing a file, it'll remember and suggest it for auto-completion.
ColinP
Posts: 939
Joined: Mon Aug 03, 2020 7:46 pm

Re: Editing modules outside of the VMD editor?

Post by ColinP »

I don't have any problems using VMD's built-in editor. Yes, it's pretty basic but after using it for a while I can edit at very high speed. To be honest I don't even think about editing as it's something so low level that it's effectively done on auto-pilot and doesn't have much impact on productivity.

But then my first commercial programming was done on an Apple II which featured a 40 x 24 character display, all in uppercase.

Cue Monty Python's Four Yorkshiremen sketch...
Post Reply

Return to “Module Designer”