NSIS Completions & Snippets
Sublime Text completions and snippets for Nullsoft Scriptable Install System (NSIS)
Details
Installs
- Total 2K
- Win 2K
- Mac 189
- Linux 186
Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
NSIS Completions & Snippets
Sublime Text completions for Nullsoft Scriptable Install System (NSIS) supporting commands, macros and plugins that are bundled with NSIS v2.46 (or higher). Also included are snippets for scaffolding different types of empty scripts and to insert code blocks. You can extend these completions for third-party plug-ins using the add-ons pack.
Screenshot of NSIS file in Sublime Text
Features
- all built-in NSIS commands, variables, defines and constants
- Plugins:
- AdvSplash
- Banner
- BgImage
- Dialer
- InstallOptions
- LangDLL
- Math
- nsDialogs
- nsExec
- NSISdl
- Splash
- StartMenu
- System
- UserInfo
- VPatch
- Headers:
- FileFunc
- LogicLib
- Memento
- Modern UI
- MultiUser
- Sections
- StrFunc
- WinMessages
- WinVer
- WordFunc
- x64
- Includes, Graphics, UIs
- Scaffolding Snippets
- Code Snippets
Installation
Package Control
- Make sure you already have Package Control installed
- Choose “Install Package” from the Command Palette (Super+Shift+p)
- Type “NSIS Completions & Snippets” and press Enter
With auto_upgrade enabled, Package Control will keep all installed packages up-to-date!
Windows Installer
This package is part of sublime-nsis-ide, a collection of packages that turn Sublime Text into a powerful editor for NSIS developers.
Using Git
- Change to your Sublime Text
Packages
directory - Clone repository
git clone https://github.com/idleberg/sublime-nsis.git 'NSIS Completions & Snippets'
Manual installation
- Download the latest ZIP file
- Unzip the archive to your Sublime Text
Packages
directory
Usage
Auto-completion
When not specifying a flag alongside a command, completion will display all available flags, with the first flag always being the default.
Scaffolding snippets
Scaffolding snippets start with the prefix scaffold
followed by the type of script you'd like to build:
- Basic Script
- InstallOptions Script
- MUI2 Script
- nsDialogs Script
- nsDialogs MUI2 Script
- NSIS Language File
- Translate MUI2 (English, French, or Spanish)
- Library
Several of the above snippets can set the number of sections in a script or add an init function.
Example:
With Sublime Text's fuzzy search in mind, you could for instance type scaffBasic
to trigger the scaffold:Basic Script
snippet and create the following script:
; Settings ---------------------------------
Name "installer_name"
OutFile "installer_name.exe"
RequestExecutionLevel user
InstallDir "$PROGRAMFILES\installer_name"
; Pages ------------------------------------
Page components
Page directory
Page instfiles
; Sections ---------------------------------
Section "section_name" section_index
# your code here
SectionEnd
; Functions --------------------------------
Use Tab
to jump to the next relevant bit of code you might want to change, Shift-Tab
to jump back.
Code snippets
Code snippets start with the prefix do
followed by the code block you'd like to insert to your script:
- help dialog
- illegal file characters define
- language dialog
- message boxes
- UAC init macro
- version information
- version compare
- IsWin, IsRunningX64, and IsServer checks
Examples:
To quickly add a message box with three buttons labeled “Yes”, “No” and “Cancel”, you could type something like doync
to trigger thedo:MB_YESNOCANCEL
snippet. This will insert the following line to the current position:
MessageBox MB_YESNOCANCEL "messagebox_text"
Use Tab
to jump between the segments of the code.
To insert a code block of version information commands, you could type doinf
to trigger the do:Version Information
snippet. This will insert several lines of code:
VIProductVersion "0.0.0.0"
VIFileVersion "0.0.0.0"
VIAddVersionKey "FileDescription" "description"
VIAddVersionKey "FileVersion" "0.0.0.0"
VIAddVersionKey "ProductName" "product_name"
VIAddVersionKey "ProductVersion" "0.0.0.0"
VIAddVersionKey "LegalCopyright" "copyright"
VIAddVersionKey "OriginalFilename" "file_name.exe"
VIAddVersionKey "Comments" "comment"
VIAddVersionKey "LegalTrademarks" "trademark"
VIAddVersionKey "CompanyName" "company_name"
VIAddVersionKey "InternalName" "internal_name"
VIAddVersionKey "PrivateBuild" "private_build"
VIAddVersionKey "SpecialBuild" "special_build"
Again, you can use Tab
to jump back and forth.
License
This work is licensed under the The MIT License.