Morrowind
0 of 0

File information

Last updated

Original upload

Created by

mg979

Uploaded by

mg79

Virus scan

Safe to use

Tags for this mod

About this mod

Syntax highlighting, color schemes and autocomplete for editing Morrowind scripts in Sublime Text. Now for Vim too!

Permissions and credits

Morrowind script syntax for Vim and Sublime Text



Features:

- syntax higlighting
- 4 color schemes (VS Dark, Obsidian, Obsidian Light, Obsidian Dark)
- autocompletions
- autoindentation
- commands: new script, browse documentation (local, online)
- documentation popup for MWSE/MGE-XE functions
- symbols support

ChangeLog

v1.3: changed documentation hotkey, improved New Script command, full autocomplete must be called explicitly with `ctrl+space`

Usage

Vim: extract in your vimfiles/pack/__/start/ directory

Extract the `MWScript` folder in the packages folder (usually `~\AppData\Roaming\Sublime Text 3\Packages\MWScript`).
Load a script or start a new one, and assign the MWScript syntax. `te3` extension is automatically assigned to the syntax.

Syntax higlighting

All functions from MWSE/MGE + alpha/MGE-XE are supported.
Colors are: regular functions, MWSE/MGE, MWSE alpha/MGE-XE. Invalid operators are red.

Color schemes

After you assign the syntax MWScript to a file, open `Preferences -> Settings - Syntax Specific` and add one of the following:

"color_scheme": "Packages/MWScript/MWScript (VS Dark).hidden-tmTheme",
"color_scheme": "Packages/MWScript/MWScript (Obsidian).hidden-tmTheme",
"color_scheme": "Packages/MWScript/MWScript (Obsidian Dark).hidden-tmTheme",
"color_scheme": "Packages/MWScript/MWScript (Obsidian Light).hidden-tmTheme",

This is needed for syntax highlighting.

Autocompletions with fields

Normal autocomplete uses these special triggers:

PP: Player->
SS: set to
SX: setx to
II: if ( )
EI: elseif ( )
EE: else
IX: ifx ( )
MM: MessageBox ""
AA/RR: AddSpell/RemoveSpell


Full functions autocomplete list can be triggered with `ctrl+space`.



Documentation popup



Press `Alt+d, Alt+d` to display it. If called on non-MWSE/MGE-XE functions, it will search the Elder Scrolls online wiki.


Palette Commands

- New script: a basic template. Assigned file path is relative to the currently edited file.
- Browse documentation: either locally(but it's old stuff) or online (Elder Scrolls Wiki, AssimilationsLab)

To use documentation commands, have the cursor on a function, press `Ctrl+Shift+P` (command palette), digit `MWScript` and choose.


Symbols support

Symbols are used for the `go to symbol in project` command in Sublime Text.
Since there are no functions, they are defined as `;#`, that is a semicolon(begin of comment) plus #.
If you then use `go to symbol in project` command, you'll jump to that symbol.