Giter VIP home page Giter VIP logo

sublime-netlinx's Introduction

Sublime Text AMX NetLinx Plugin

sublime-netlinx

MIT License

This is a plugin for developers looking for a lighter weight alternative to NetLinx Studio, while still providing powerful functionality. On top of the features provided by Sublime Text, this plugin adds syntax highlighting, color schemes, and build support for the AMX NetLinx programming language. This is also a great option for programmers who are looking to use one editor for multiple languages.

Designed for Sublime Text 3

Installation

  1. Install Sublime Package Control
  2. Open the Command Palette (Ctrl + Shift + P)
  3. Select Package Control: Install Package
  4. Select NetLinx

NetLinx Classic Color Scheme

Sublime will use the editor's global color scheme by default. If you would like the files to look the way they do in NetLinx Studio, the sublime-netlinx package comes with a classic NetLinx color scheme.

Build Support

Build support requires the NetLinx Compile utility to be installed, as well as the NetLinx compiler provided by AMX. The AMX NetLinx compiler is bundled with NetLinx Studio.

File Transfer

File transfer is handled by FileTransfer 2, provided by AMX via the Web Update utility or as a download from the prior link.

Issues, Bugs, Feature Requests

Any bugs and feature requests should be reported on the GitHub issue tracker:

https://github.com/amclain/sublime-netlinx/issues

Pull requests are preferred via GitHub.

Mercurial users can use Hg-Git to interact with GitHub repositories.

Transitioning From NetLinx Studio

It is important to understand that sublime-netlinx is an alternative way to work with NetLinx files, not a feature-for-feature clone of NetLinx Studio. Therefore, sublime-netlinx requires a different way of thinking than what you may be used to. If you typically work with multiple programming languages, transitioning to sublime-netlinx will probably be easy and increase your productivity. If NetLinx is your only programming language, the transition may be more difficult. If you've spent a reasonable amount of time with sublime-netlinx and find yourself frustrated, sublime-netlinx may not be right for you. That's ok.

Workflow

Sublime Text does a good job of providing an interface that is far less cluttered than the NetLinx Studio IDE. In Sublime you'll spend a lot of time using the command palette (ctrl + shift + p). Due to this, the sublime-netlinx commands are available from the command palette with the prefix NetLinx.

Since sublime-netlinx is designed to be lightweight, work is delegated to Sublime Text commands and external applications. For example, although building a NetLinx file appears to happen in Sublime Text, it's only the console output of netlinx-compile that's displayed by Sublime Text. The build command delegates the work to netlinx-compile, which runs in the background.

Some of AMX's proprietary applications don't provide interfaces to work with their data and can only be used as standalone applications. NetLinx Diagnostics is an example of this. sublime-netlinx provides convenience commands to launch these applications.

Sublime Text is a very versatile editor. Keep in mind that you can customize the editor and add plugins to further improve your workflow.

Setting Up A Workspace

The easiest way to maintain a NetLinx workspace with Sublime Text is by using a netlinx-workspace workspace.config.yaml file. This file can be created by hand, by running netlinx-workspace --create, or by using a framework like netlinx-erb that handles all aspects of developing and maintaining a NetLinx project.

Ideally a project using a workspace.config.yaml file will be able to be compiled with a standard Sublime build task (ctrl + b). However, the extension discovery system issue needs to be resolved before this works. In the mean time, a NetLinx Studio .apw file can be generated from the command palette with NetLinx: Generate .apw From workspace.config.yaml. The netlinx-erb framework isn't affected by this problem, as it uses its own set of automated tasks.

Command Reference

This plugin provides commands that are accessible from the Sublime Text Command Palette (Tools -> Command Palette) (Ctrl + Shift + P).

Snippets

All of the code snippets available for auto-completion can be found under the menu:

Tools -> Snippets...

Helpful Sublime Plugins

Sublime Text plugins can be installed using Package Control.

sublime-netlinx's People

Contributors

amclain avatar

Stargazers

 avatar Kiel Lofstrand avatar Roy Bower avatar  avatar Jonathan Brenner avatar Daniel W. Thomas avatar Fraser McLean avatar Dennis E avatar  avatar Smiley Rob avatar kb avatar Tom Haskell avatar Joe Eli McIlvain avatar nocarryr avatar  avatar

Watchers

James Cloos avatar Jared avatar  avatar Krzysztof Cholewa avatar Jason DeVito avatar Dennis E avatar  avatar

sublime-netlinx's Issues

Add snippets for NetLinx Studio workspace files

Since there is no easy way to manage NetLinx Studio workspaces in Sublime Text, adding snippets could make it easier to edit the raw XML.

Master Source

<File CompileType="Netlinx" Type="MasterSrc"><Identifier>My Project</Identifier>
<FilePathName>My Project.axs</FilePathName>
<Comments></Comments>
</File>

Include

<File CompileType="None" Type="Include"><Identifier>audio</Identifier>
<FilePathName>include\audio.axi</FilePathName>
<Comments></Comments>
</File>

Touch Panel

<File CompileType="None" Type="TP4"><Identifier>My Touch Panel</Identifier>
<FilePathName>touch panel\My Touch Panel.TP4</FilePathName>
<Comments></Comments>
<DeviceMap DevAddr="dvTP_1"><DevName>dvTP_1</DevName>
</DeviceMap>
<DeviceMap DevAddr="dvTP_2"><DevName>dvTP_2</DevName>
</DeviceMap>
<DeviceMap DevAddr="dvTP_3"><DevName>dvTP_3</DevName>
</DeviceMap>
</File>

IR

<File CompileType="None" Type="IR"><Identifier>Denon,500C,RC-1176</Identifier>
<FilePathName>ir\Denon,500C,RC-1176,Unknown,1.irl</FilePathName>
<Comments></Comments>
<DeviceMap DevAddr="dvCD"><DevName>dvCD</DevName>
</DeviceMap>
</File>

Duet

<File CompileType="None" Type="DUET"><Identifier>duet-lib-pjlink_dr0_1_1</Identifier>
<FilePathName>include\duet-lib-pjlink\duet-lib-pjlink_dr0_1_1.jar</FilePathName>
<Comments></Comments>
</File>

Avoid force-push to master if possible

We have a reference to this repository in github/linguist, as this grammar is used on github.com to highlight code.

Your submodule points to a109318:

commit a109318915751ff318de4b4d3bfc34ee57cec921
Author: Alex McLain <[email protected]>
Date:   Thu May 7 11:30:05 2015 -0700

    Added package control link to readme.
    Updated Vintage plugin to Vintageous.

This commit id doesn't exist anymore on your master branch. I'm guessing this is because you force-pushed and rewrote the git commit history. As a result, the CI build of github/linguist is broken. That's not a big issue, but it can be a bit annoying.

I don't know if it was intentional or if it was a mistake. In any case, could you avoid rewriting your master branch's commit history? Other repositories may rely on it.

Add workflow documentation to readme

There needs to be documentation explaining how to set up and develop a NetLinx project using this plugin. Setup of a NetLinx Studio workspace and how it integrates with Sublime Text can be especially unclear.

Backslash escapes single quote

\' causes the comment to be classified as part of the string literal.

SEND_STRING dvScaler, '2*4\'  // set input 2 signal type to YC

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.