Difference between revisions of "Visual Studio Code"

66 bytes added ,  05:33, 3 December 2018
Added categories
imported>ChikkenChazer
(Added link to compiler package)
imported>Qazaaq
(Added categories)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Category:Text Editors]]
[[Category:Scripting]]
'''Visual Studio Code''' is a source code editor developed by Microsoft. It includes support for debugging, embedded Git control, syntax highlighting, intelligent code completion, snippets, and code refactoring. It is also customizable, so users can change the editor's theme, keyboard shortcuts, and preferences. It is free and open-source, although the official download is under a proprietary license.
'''Visual Studio Code''' is a source code editor developed by Microsoft. It includes support for debugging, embedded Git control, syntax highlighting, intelligent code completion, snippets, and code refactoring. It is also customizable, so users can change the editor's theme, keyboard shortcuts, and preferences. It is free and open-source, although the official download is under a proprietary license.


Line 17: Line 15:
==Usage==
==Usage==


After installing VS Code, install the Papyurs packages by browsing to the package's extension page and click install or the VS Code's extension installer (CTRL+SHIFT+X)
After installing VS Code, install the Papyrus packages by browsing to the package's extension page and click install or the VS Code's extension installer (CTRL+SHIFT+X)


If your project is using project files (.ppj) you may want to associate .ppj files as XML
If your project is using project files (.ppj) you may want to associate .ppj files as XML
Line 48: Line 46:


Alternatively you can utilize VS Code's build and tasks system.
Alternatively you can utilize VS Code's build and tasks system.
====Using the build and tasks system====


Note: Replace occurences of '''<GAME-DIRECTORY>''' with the path to the directory where your game is installed (Eg.: '''C:\Program Files (x86)\Steam\steamapps\common\Fallout 4''')
Note: Replace occurences of '''<GAME-DIRECTORY>''' with the path to the directory where your game is installed (Eg.: '''C:\Program Files (x86)\Steam\steamapps\common\Fallout 4''')


====Compile single file using default build task====
=====Compile single file using default build task=====


# First add the [[#Files|ScriptCompileDevVS.bat]] to your '''<GAME-DIRECTORY>\Data\Scripts\Source\User''' directory. The bat file contains basic compiler configuration for development.
# First add the [[#Files|ScriptCompileDevVS.bat]] to your '''<GAME-DIRECTORY>\Data\Scripts\Source\User''' directory. The bat file contains basic compiler configuration for development.
Line 61: Line 61:
Now, you may test to see if everything is working as expected by opening one of your .tsc files. Press CTRL+SHIFT+B (Run Build Task) to compile.
Now, you may test to see if everything is working as expected by opening one of your .tsc files. Press CTRL+SHIFT+B (Run Build Task) to compile.
The built-in terminal should automatically open and output the results.
The built-in terminal should automatically open and output the results.
If everything has been configured correctly you should see the compilation succss message.
If everything has been configured correctly you should see the compilation success message.


Tasks can be tweaked to better suit your particular needs. Please consult the documentation for more information: https://code.visualstudio.com/docs/editor/tasks
Tasks can be tweaked to better suit your particular needs. Please consult the documentation for more information: https://code.visualstudio.com/docs/editor/tasks
Line 68: Line 68:
You may also create a task for each step in the workflow (development, release, final etc.)
You may also create a task for each step in the workflow (development, release, final etc.)


====Compile file on CTRL+S====
=====Compile file on CTRL+S=====


If you want to compile the edited file every time you save the file (CTRL+S) you can add a hook in keybindings.json
If you want to compile the edited file every time you save the file (CTRL+S) you can add a hook in keybindings.json


1. Choose File > Preferences > Keyboard Shortcuts
# Choose File > Preferences > Keyboard Shortcuts
2. Click the keybindings.json link at the top of the screen (below the search input)
# Click the keybindings.json link at the top of the screen (below the search input)
3. In your keybindings.json add the following JSON object to the JSON array (between the brackets)
# In your keybindings.json add the following JSON object to the JSON array (between the brackets)


<source lang="javascript">
<source lang="javascript">
Line 125: Line 125:
}
}
</source>
</source>


==See Also==
==See Also==
*[[:Category:Text Editors|Other Text Editors]]
*[[:Category:Text Editors|Other Text Editors]]
[[Category:Text Editors]]
[[Category:Scripting]]
[[Category:Tooling]]
Anonymous user