Skip to main content

vscode_setup

VS Code and topas-editor

VS Code can be configured to interact with TOPAS in a similar way to jEdit using the “topas-editor” extension. VS Code is a powerful editor that allows lots of customisation. The default topas-editor has a full set of TOPAS menus, various colour schemes, and short cut keys to interact with TOPAS. It works with TOPAS Academic, the Bruker version of TOPAS and tc.exe. The only jEdit feature not readily available is the ability to cursor-select beyond the end of a line.

It has been used on >100 different PC’s, but you should still treat it as a test version. Email John when you find problems.

1. You can install topas-editor by going to the VS Code extensions market place (normally the four squares on the left panel of your VS Code window and typing “topas editor” in the search box that appears then install.

2. You then need to set up the TOPAS menus. In the VS Code window type shift-ctrl-p (on a windows pc) to bring up the command palette and and start typing “Topas menu setup” then select and execute the command. This should happen automatically if you quit VS Code and restart. You can also do the same thing by typing ctrl-tu.

3. Confirm you are happy to install the TOPAS menus, then navigate and select the TOPAS directory.

4. You should be able to see TOPAS menus by clicking on the “triangle in circle icon” on the left.

5. Your VS Code screen should look something like the image below (tbc). The left and right hand views are “TOPAS Dark” and “TOPAS Light” themes.

6. Consider turning on the “auto update” feature so you get bug fixes and menu updates.

7. If you have your own custom menus they will get overwritten when topas-editor updates. Store them in a separate .json file and use the “Add my menus” command to reinstall them.

Using VS Code Topas Editor

Information on using the Topas Editor extension is in its readme file. You can view this by clicking on the “Te” icon in the extensions panel of VS Code.

A step-by-step tutorial on Rietveld and Pawley refinements is here.