Atom: Difference between revisions
(→build) |
(→build) |
||
Line 61: | Line 61: | ||
==== build ==== | ==== build ==== | ||
With the [https://atom.io/packages/build build] package and | With the [https://atom.io/packages/build build] package and a [https://atombuild.github.io/#language-nsis build provider] (e.g. [https://atom.io/packages/build-makensis build-makensis]) installed, you can compile scripts using the default <kbd>Cmd</kbd>+<kbd>Alt</kbd>+<kbd>b</kbd> shortcut (or <kbd>F9</kbd>). | ||
==== script ==== | ==== script ==== |
Revision as of 14:21, 26 March 2016
Description
An all around NSIS language package for GitHub's new Atom editor
Grammar
Syntax highlighting of all commands in NSIS versions 2.46 & 3.0b1 and their included plug-ins
Completions
Tab-completions for syntax, useful snippets for quick scaffolding
Extension Packages
You can further extend #nsis support in Atom.
Installation
Atom Package Manager (apm)
Install package from apm install language-nsis
(or use the GUI)
Git
Change to the Atom package directory and clone the repository:
git clone https://github.com/idleberg/atom-language-nsis.git language-nsis
Usage
Completion
With most commands, you can specify available options before completion. For instance, rather than completing RequestExecutionLevel
and then specifying an option, you can directly choose RequestExecutionLevel user
from the completion menu.
To complete compile time commands, variables or predefines, *leave out* special characters:
include
completes to!include
INSTDIR
completes to$INSTDIR
NSIS_VERSION
completes to${NSIS_VERSION}`
However, you have to type __LINE___
to complete to ${__LINE__}
.
There are several special cases for your convenience:
MB_OK
completes toMessageBox MB_OK
onInit
completes to aFunction .onInit
blockLogicLib
completes to!include "LogicLib.nsh"`
Building
There are several ways to build NSIS scripts within Atom, each of them depending on a separate build package.
Note: You might have to add makensis to your PATH environmental variable in order to use any of the mentioned building tools.
build
With the build package and a build provider (e.g. build-makensis) installed, you can compile scripts using the default Cmd+Alt+b shortcut (or F9).
script
With the script package installed, you can compile scripts using the default Super+I shortcut.
atom-runner
With the atom-runner package installed, you need to create a runner task to compile scripts. From the command-palette run “NSIS: Set build command for atom–runner” and makensis
will added as runner for NSIS files. Use the default shortcut Ctrl+R to compile your scripts.
atom-build
You can also create .atom-build.json
to use with atom-build. From the command-palette run “NSIS: Create .atom–build file” to add it to your current project folder. Use the default shortcut Ctrl+Alt+B to compile your scripts.