Visual studio Vs Sublime Vs Scite. Fight!

Discuss features, issues, about Editors for AHK
toralf
Posts: 792
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Visual studio Vs Sublime Vs Scite. Fight!

22 Dec 2019, 04:30

Since most of my scripts consist of multiple files with one file with the auto exec section and that includes all the other files (I call it master file) I have some three more question regarding VSC:
1) Does it offer the ability to specify a project with a master file? Meaning: when I code inside of a include file and want to test it, I can hit a hotkey or press a button and the master file gets executed with AHK?
2) Does it support autocomplete and intellisense over all include files? Meaning, when I’m in on of the include files does it offer variable or functions names from other include files?
3) does it have an interface through which it can be controlled from outside? meaning, can it be automated e.g. with AHK without simulating key strokes?

For 1) I have scripted a tool for Notepad++ since it offers 3). But I have not succeeded with 2) yet. If VSC would offer this out of the box, I would be willing to look further into it.
ciao
toralf
User avatar
boiler
Posts: 6199
Joined: 21 Dec 2014, 02:44

Re: Visual studio Vs Sublime Vs Scite. Fight!

22 Dec 2019, 09:41

1) At least with the code runner extension I use, it only runs the file in the active pane or the selected text.
2) It seems that it does not autocomplete across included files or even other open files (although I thought I remember it doing the latter). Intellisense does not work for user-defined functions for AHK with the extension I use (by far the most popular AHK-specific extension). It does for other languages, so perhaps someone will develop an extension for that eventually.
3) There is an API for writing extensions.
User avatar
kczx3
Posts: 1168
Joined: 06 Oct 2015, 21:39

Re: Visual studio Vs Sublime Vs Scite. Fight!

22 Dec 2019, 12:48

There are varying levels of intellisense that VSCode can produce. It is all dependent upon how sophisticated of a parser you want to write. The built in JavaScript language server is capable of a vast number of features including variable resolution within scopes. For that, an AHK parser would need to know exactly where a function begins and ends. The begin part is easy enough with regex however that won't suffice to find the end. This would be necessary to handle v2 especially since you can have nested functions which aren't available globally.

I've been playing around with creating my own syntax highlighter and started looking at parsing symbol definitions. Most of it is beyond my level of coding though. And so far this has all been file specific. Nothing with multiple files and parsing an entire workspace.
toralf
Posts: 792
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Visual studio Vs Sublime Vs Scite. Fight!

22 Dec 2019, 19:11

I posted my previously mentioned tool ( AHK Project Manager) to show what I'm looking for.
ciao
toralf

Return to “Editors”

Who is online

Users browsing this forum: No registered users and 2 guests