With project DBs, how does one use Atom and/or other coding systems?

In a few posts, 4D has suggested one could move away from using 4D’s method & form editors and use some other code editor, such as Atom (which I have never used). Apparently there are some advantages to incorporating this into one’s development, particularly with GitHub version control. I downloaded Atom but could not seem to get it to ‘understand’ 4D syntax (though I tracked down a ‘4D package’ (by Miyako ??) and installed it into atom).
In Miyako’s summit presentations, he alluded to Atom but it remains a mystery to me as to how one goes about doing this, and if it really is an advantage vs. just using 4D’s editors.

So is there some tutorial on setting up / using Atom or some other code editor to do 4D? Or is it just a matter that we would need to figure it out ourselves, perhaps ‘the hard way’ ??
Thanks,
Chris

I think “move away” is something that won’t happen until far in the future, especially if you are talking about forms. I would not want to create them by hand in an editor (although, creating them dynamically with code is really useful). Many editors use some form of regular expressions for language recognition. There is no way it will accurately syntax color 4D code. Even if the editor supports a full lexer/parser, it won’t accurately color 4D syntax unless it has a lot of details that are available only by fully parsing a 4D project. For example, “Some Token” (no quotes) could be a process variable, custom constant, project method, or component project method.

See this thread for a recent discussion about editing 4D code with other tools:

I just discovered BBEdit supports CTags which is a kind of meta file that describes source code and locations of functions, variables, etc. Maybe 4D can generate CTags files that BBEdit can use to correctly syntax color 4D code.

Chris,
The basic setup for Atom, VS Code, BBEdit etc. is simply to go to the File menu, choose Open and select the Database folder. Here’s an example using VS Code:

Any changes you make (and save) in the text editor are reflected in 4D. This includes adding methods, forms and so on (not tables). Conversely the changes you make in 4D reflect in the files.

Personally this is not where I go to write methods. The method editor offers much better options for doing that. But if you need to change an object property the ability to search over all the files of a project in the text editor is what you want. This also goes for updating code, form references and any webpages that may be affected if you change a field name after using ORDA for a while.

It’s also the way you can copy things from one project to another - you can open the project in another window and copy and paste specific objects or entire forms to your current project. This replaces the drag and drop between databases we have in binary mode.

I find it very useful for databases with any sort of web interface. Within 4D there’s no way to find and replace instances of a name in code and external files like .html or constants files.

The usefulness of this will increase with your expertise using your text editor and varies from project to project.

Thank you, Kirk (and John). I am of the opinion that I would prefer to do coding primarily within 4D’s editors for the very reasons you point out. I just don’t want to be unprogressive.
I know some other editors have nifty features, such as being able to simultaneously change text in a number of lines, etc. I suppose if one is using CSS or other such technologies there could be a place for other editors in one’s development environment.
Thank you both for setting my mind a rest about the issues.
– Chris

Another of the tools that we use, liveCode, has a nifty way of hooking into a faceless version of its server running locally. It live parses/lexes your code files, turning ST, Atom, etc., into an external editor, so an external editor becomes a fantastic add-on.
I’m kind-of hoping that layout editing can get to the point where other tools can be used for some of those functions, too (Sketch is one example).
Any time you can leverage someone else’s toolset, it makes yours more valuable, easier to use, and cheaper to maintain, because that is functionality you don’t have to duplicate.