Giter VIP home page Giter VIP logo

sublimetext-nodejs's Introduction

Nodejs Sublime Text 2 Package

Overview

The Nodejs Sublime Text 2 Package provides a set of code completion, scripts and tools to work with nodejs.

Code Completion

The package code completion is generated from the main nodejs libraries and global namespaces. To invoke the code completion start typing the namespace you want (For example, type fs) and then Ctrl + Space, you get this:

A picture of the file system context menu

Node Commands

You can access node commands in two ways.

  • Via the menu in Tools -> Node
  • By accessing the Command Palette and typing node

The current commands available are (with Windows binding, other bindings are provided):

  • Run current script in node (Alt + R)
  • Run current script in node debug (Alt + D)
  • Run current script in node and arguments (Ctrl + Alt + r)
  • Run current script in node debug and arguments (Ctrl + Alt + D)
  • Uglify Code
  • NPM Command
  • Build documentation (builds the completion files)

Snippets

Also included are some boilerplate snippets. They include functionality such as a http server, reading the contents of a directory, etc.

To access these snippets type node in your editor followed by Ctrl + Space

If you have any boilerplate code you would like to see in here, get in touch.

Install

You may install Nodejs via the Sublime Text 2 package manager, or using git with the below commands:

MacOSX

`git clone git://github.com/tanepiper/SublimeText-Nodejs.git ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Nodejs`

Windows

`git clone git://github.com/tanepiper/SublimeText-Nodejs.git "%APPDATA%\Sublime Text 2\Packages\Nodejs"`

Build Systems

PLEASE NOTE: The build system will be refactored to provide different nodejs build systems (such as jake)

If you have a JavaScript file open, by selecting selecting Tools -> Build Systems -> Nodejs and then hitting Ctrl + B, you will activate the node build system on your file and node will try to run it. You may need to add a path variable to the settings object for this if your node executable is not found

Todo

  • Replace the Nodejs.sublime-build to work with jake
  • Reorganise menu structure
  • Improve code completion snippets where possible
  • Provide an interface for writing JavaScript plugins

Author & Contributors

Tane Piper - if you find this plugin useful then please ping me if you would like to donate to my Sublime Text 2 licence fund

sublimetext-nodejs's People

Contributors

aaronpowell avatar fredericosilva avatar tanepiper avatar

Stargazers

 avatar

Watchers

 avatar

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.