How to quickly open class in VS Code
Is there an easy way to open classes in VS Code?
In studio you go open and just type the class name and it opens up the class.
In VS Code need to know the full path, is there a quick way? It is probably the one thing preventing from using VSCode full time (apart from not seeing the .luts or csp files)
Product version: IRIS 2022.1
VSCode has such feature, from Menu Go -> Go to file, (cmd+P/ctrl+P)
Even quicker way to get there is CMD-E twice (on Mac) or CTRL-E twice (Windows)
It would be great to have a cheat-sheet for all of these keyboard shortcuts and other tricks, especially in terms of "if you used to do X in Studio, here's how to do that in VS Code".
A few months ago I happened across the incantation for the VS Code equivalent of Studio's "Find in Files" (free text search of server-side classes) but forgot the key combination and haven't had the time to try to figure out which docs to check and guess at whether it's a standard feature of VS Code or of the ObjectScript plug-in.
@Marc Mundt I completely agree with you! There is a really awesome reference for InterSystems Studio Hotkeys in the docs:
https://docs.intersystems.com/iris20201/csp/docbook/DocBook.UI.Page.cls?...
Having a mapping to VSCode would be very useful.
For VS Code's native Search facility to search the server-side code your ISFS workspace gives you access to you must follow the instructions in the "Enable Proposed APIs" section of the extension's README (which is also available here). One of the steps will have to be repeated each time your InterSystems ObjectScript extension gets upgraded from MarketPlace with a new version.
@Marc Mundt and @Ben Spead ask and you shall receive. The cheat sheet has been published: https://intersystems-community.github.io/vscode-objectscript/studio/#key...
@Raj Singh Thank you!!
Curious - why wasn't this a D.C. article? Is it because the location on github.io allow multiple people to collaborate on the content?
@Ben Spead the only reason was it took me longer to write the article. Just published here: https://community.intersystems.com/post/studio-vscode-migration-docs-now...
Thanks @Raj Singh - makes sense
Mark, if you are using the server-side editing paradigm, which matches what you're used to with Studio, make sure you follow the instructions in the "Enable Proposed APIs" section of the extension's README (also available here). Until you have done this the Ctrl/Cmd+P technique mentioned by Dmitry won't find anything when you are working server-side.
Also, server-side editing mode can deal with CSPs. See https://intersystems-community.github.io/vscode-objectscript/serverside/..., or if you use Server Manager's "pencil" button alongside a namespace in order to create your isfs workspace, hold the Alt key down when clicking it and you'll get a workspace folder which shows you the CSP app files.
Also added a request to open routine upon the error message. At the line of error.
There's already an extension to help you with that:
https://marketplace.visualstudio.com/items?itemName=georgejames.gjlocate
Thanks, @John Murray !
Tried - doesn't work for me:
for <UNDEFINED>zOnPhase+79^%ZPM.PackageManager.Developer.Processor.Default.Document.1
it shows:
f.png)
I have logged this at https://github.com/george-james-software/gjLocate/issues/3