Old 16th May 2013, 13:59   #1
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,354
Sublime Text

in the last couple of days, i've been working on a autocompleter for Sublime Text that i find worth mentioning here. it currently supports all nsis commands (naturally), all macros from "useful headers", all syntax from bundled plugins, and some other bits. other than the completion, it also comes with some scaffolding snippets to easily create empty scripts.

here's a video of showing it in action (who spots the syntax error?).

the project is hosted on github and there's also a wiki page for it.

this is a work-in-progress, as i intend to extend its functionality over the time. looking forward to your feedback!

ps: the package is not yet available on package control, i'm still waiting for my pull request to be accepted
Yathosho is offline   Reply With Quote
Old 18th May 2013, 00:09   #2
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,917
Wow, I glad to see how NSIS coding helpers are very good these days, I still prefer the old "notepad"


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE.
Joel is offline   Reply With Quote
Old 18th May 2013, 15:09   #3
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,354
since the package still hasn't been included to sublime text's package manager, i've created a script to download and install it.
Yathosho is offline   Reply With Quote
Old 21st May 2013, 12:52   #4
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,354
The basic completions and the add-on completions have finally been added to Package Control. The former supports all new NSIS 3.0a0, the latter supports the syntax of 165 NSIS plugins.

I've also commited the new syntax to the code highlighter and created a basic command lookup context menu. All in all that should make Sublime Text a powerful NSIS editor.
Yathosho is offline   Reply With Quote
Old 16th August 2013, 13:36   #5
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,354
I've just completed a syntax definition file (and a snippet) for NSIS Language Files

http://nsis.sourceforge.net/Sublime_...Language_Files
Yathosho is offline   Reply With Quote
Old 16th January 2014, 16:52   #6
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,354
screenshot to get a glimpse:



(someone forgot to include LogicLib in the second example!)
Yathosho is offline   Reply With Quote
Old 16th January 2014, 16:54   #7
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,354
(double post -- delete me)
Yathosho is offline   Reply With Quote
Old 21st July 2015, 06:39   #8
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,354
I have added build support for Mac OS X and Linux, but I'm still waiting for my pull request to be merged. For the time being, you can test my fork. Just clone the repository into the Sublime Text packages folder (not Packages/User)

The script iterates over some default installation paths (see below), but since I could only test this on OS X (10.7 and 10.10), Fedora 22 and Ubuntu 15.04, it might not work elsewhere.

code:
"/bin/makensis"
"/usr/bin/makensis"
"/usr/local/bin/makensis"
"/usr/local/sbin/makensis"
"/opt/local/bin/makensis"
"/opt/local/sbin/makensis"



If you're on some other Linux distro, please let me know if it works (or run which makensis to check your makensis path)
Yathosho is offline   Reply With Quote
Old 30th July 2015, 21:35   #9
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,354
Since my changes haven't yet been merged, I have created my own repository. This build system compiles NSIS scripts on Windows, Mac and Linux (possibly more). Comes with a new Wine fallback mode.

https://github.com/idleberg/sublime-makensis
Yathosho is offline   Reply With Quote
Old 5th August 2015, 14:05   #10
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,354
Now available on Package Control

https://packagecontrol.io/packages/makensis
Yathosho is offline   Reply With Quote
Old 7th August 2015, 11:50   #11
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,354
Since I find the current situation overly complicated, there are two many single packages available, I have created a custom Package Control repository with a combines package. This is probably the best solution for the moment, though I will try speaking to the maintainers of the NSIS language file definitions to improve this further.

For now add the following repository URL to your Package Control settings ("Package Control: Add repository" in the command palette).

https://nsis-dev.github.io/sublime-nsis/repository.json

Once added, you can install the package called "NSIS Developer", which includes language file definitions for NSIS, NLF and InstallOptions, command completions, snippets and the improved build system for Windows and Unix/Linux.
Yathosho is offline   Reply With Quote
Old 22nd August 2015, 15:34   #12
parasoul
Senior Member
 
Join Date: Aug 2007
Posts: 117
Pretty damn amazing. Great work and thank you
parasoul is offline   Reply With Quote
Old 9th May 2016, 18:24   #13
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,354
A new linter for Sublime Text:

https://github.com/idleberg/SublimeL...ntrib-makensis

Only highlights errors so far, since I find it difficult to combine the RegEx for both errors and warnings. It's either the inconsistent nature of how makensis outputs errors and warnings, or the weird RegEx dialect.



Anyway, still better than no linting at all!
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2016-05-09 at 20.23.08.png
Views:	267
Size:	157.5 KB
ID:	52387  
Yathosho is offline   Reply With Quote
Old 10th September 2016, 11:53   #14
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,354
As of v0.2, the linter also highlights warnings

https://github.com/idleberg/SublimeL...ntrib-makensis
Yathosho is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Tags
autocomplete, completions, snippets, sublime text

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump