Atom: Difference between revisions
(→Git) |
(add Usage paragraph) |
||
Line 34: | Line 34: | ||
<code>git clone <nowiki>https://github.com/idleberg/atom-language-nsis.git language-nsis</nowiki></code> | <code>git clone <nowiki>https://github.com/idleberg/atom-language-nsis.git language-nsis</nowiki></code> | ||
== | == Usage == | ||
[ | === Completion === | ||
With most commands, you can specify available options before completion. For instance, rather than completing <code>RequestExecutionLevel</code> and then specifying an option, you can directly choose <code>RequestExecutionLevel user</code> from the completion menu. | |||
To complete compile time commands, variables or predefines, *leave out* special characters: | |||
* <code>include</code> completes to <code>!include</code> | |||
* <code>INSTDIR</code> completes to <code>$INSTDIR</code> | |||
* <code>NSIS_VERSION</code> completes to <code>${NSIS_VERSION}`</code> | |||
However, you have to type <code>__LINE___</code> to complete to <code>${__LINE__}</code>. | |||
There are several special cases for your convenience: | |||
* <code>MB_OK</code> completes to <code>MessageBox MB_OK</code> | |||
* <code>onInit</code> completes to a <code>Function .onInit</code> block | |||
* <code>LogicLib</code> completes to <code>!include "LogicLib.nsh"`</code> | |||
=== Building === | |||
This package comes with support for [http://atom.io/packages/atom-runner atom-runner] to let you compile scripts within Atom. Once atom-runner is installed, you can use the default shortcut <kbd>Ctrl</kbd>+<kbd>R</kbd> to compile open scripts. Make sure to save new scripts before trying to compile them. |
Revision as of 12:23, 16 September 2015
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
This package comes with support for atom-runner to let you compile scripts within Atom. Once atom-runner is installed, you can use the default shortcut Ctrl+R to compile open scripts. Make sure to save new scripts before trying to compile them.