vue2-grammar/README.md

62 lines
2.2 KiB
Markdown
Raw Normal View History

2019-12-02 05:05:47 +01:00
# SWMF Configuration
2019-11-26 14:02:14 +01:00
2019-12-02 03:24:52 +01:00
> This is a Visual Studio Code extension and should be installed from the [VS Code extensions marketplace](https://marketplace.visualstudio.com/items?itemName=svaberg.swmf-grammar)
2019-11-26 14:02:14 +01:00
2019-12-02 05:05:47 +01:00
This extension provides syntax highlighting, outline view, breadcrumbs, and some code completion for [Space Weather Modelling Framework (SWMF)](http://csem.engin.umich.edu/tools/swmf/) configuration files, such as the BATSRUS `PARAM.in` file. The rules are based on the [SWMF manual](http://csem.engin.umich.edu/tools/swmf/documentation/SWMF.pdf) section 3.2.2.
2019-11-26 14:02:14 +01:00
2019-12-02 03:24:52 +01:00
Automatically highlights files ending in `.in` and `.IN`.
2019-12-01 10:36:36 +01:00
2019-12-02 03:24:52 +01:00
![Features demo](images/demo.png)
2019-11-26 14:02:14 +01:00
2019-11-28 07:47:06 +01:00
## Features
2019-11-26 14:02:14 +01:00
2019-12-02 05:05:47 +01:00
* Syntax highlighting;
* Hierarchical document tree in the [outline view](https://code.visualstudio.com/docs/getstarted/userinterface#_outline-view);
* [Breadcrumbs](https://code.visualstudio.com/updates/v1_26#_breadcrumbs) support;
* Toggle comment using `!` as comment character;
* Code folding between `#BEGIN_COMP` and `#END_COMP` markers;
* Autoclosing of `#BEGIN_COMP`.
2019-12-02 03:24:52 +01:00
## Installation
This is a [Visual Studio Code](https://code.visualstudio.com/download) extension. It is best installed from the [on-line extensions marketplace](https://marketplace.visualstudio.com/items?itemName=svaberg.swmf-grammar), or from inside VS Code `Preferences/Extensions` and search for `swmf-grammar`.
2019-12-02 05:05:47 +01:00
Alternatively, the extension can be built and installed manually as in the next section.
2019-12-02 03:24:52 +01:00
2019-12-02 05:05:47 +01:00
### Manual installation from source code
> This should only be required for developers.
1. Clone the repository and enter into the folder
2019-12-02 03:24:52 +01:00
```bash
2019-12-02 05:05:47 +01:00
git clone git@github.com:svaberg/SWMF-grammar.git
2019-12-02 03:24:52 +01:00
cd SWMF-grammar
```
2019-12-02 05:05:47 +01:00
2. Install the required packages with `npm`
2019-12-02 03:24:52 +01:00
```bash
npm install
```
2019-12-02 05:05:47 +01:00
3. Create a package using `vsce`
2019-12-02 03:24:52 +01:00
```bash
vsce package
```
2019-12-02 05:05:47 +01:00
This should generate a `swmf-grammar-?.?.?.vsix` file in the current directory.
4. Manually install the extension in VS Code (you may want to replace the wildcards in the version number)
2019-12-02 03:24:52 +01:00
```bash
code --install-extension swmf-grammar-?.?.?.vsix
```
To test the installation, open the current folder in VS Code
2019-12-02 05:05:47 +01:00
2019-12-02 03:24:52 +01:00
```bash
code .
```
2019-12-02 05:05:47 +01:00
2019-12-02 03:24:52 +01:00
and view the file `demo.in`.