Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Feb 24, 2022. It is now read-only.

The Scripted code editor

License

NotificationsYou must be signed in to change notification settings

vmware-archive/scripted

Repository files navigation

Welcome to Scripted

Build Status

What is Scripted?

Scripted is a fast and lightweight code editor with an initial focus on JavaScript editing.Scripted is a browser based editor and the editor itself is served from a locally running Node.jsserver instance.

What are the key features?

  • Fast startup, lightweight.
  • Syntax highlighting for JavaScript, HTML and CSS.
  • Errors and warnings:
    • JSHint is integrated to provide error/warning markers on JavaScript code.
    • AMD and CommonJS module resolution: there is basic resolution where unresolved references will be marked as errors.
  • Content assist:
    • Basic content assist for HTML, CSS
    • For JavaScript, content assist is driven by a type inferencing engine which is aware of AMD/CommonJS moduledependencies and also uses JSDoc comments to help it understand the code.
  • Hovers: hovering over a JavaScript identifier will bring up the inferred type signature.
  • Navigation:
    • press F8 on an identifier (that the inferencer has recognized) and the editor will navigate to the declaration.
    • this also works on module identifiers (e.g. indefine() clauses)
  • Formatting: JSbeautify is integrated
  • Sidepanel: alongside the main editor a sidepanel can be opened - currently this can be used to host a second editor.
  • Key binding to external command: Key bindings in the editor can invoke external commands (less, mvn, etc)

The editor is actually theEclipse Orion editor with a few additional bells and whistles.Anyone familiar with editing in Eclipse will immediately know many of the key bindingsthe Scripted editor supports.

Many of these are covered in this introductory screencast:

How do I try it out?

The only pre-req for trying it out is that you have Node.js installed. Grab it from here:http://nodejs.org/.The team has been testing with a range of versions from 0.6 to 0.8 but haven't tested all of them exhaustively. It is recommendedthat you try to use the latest (0.8.16 at time of writing).

Installing the most recent release via npm

npm install -g scripted

(possibly with asudo prefix on linux/mac). This will install the most recently published release. There are no further steps if installing via this route andscr command will immediately be available to launch Scripted.

Installing the very latest code via npm

This will install directly from master.

npm install -g https://github.com/scripted-editor/scripted/tarball/master

(again possibly with asudo). Master is under constant development so you may see a hiccup or two but we try to keep it fully functional.

Download a packaged zip

Version 0.4.0 zip
Version 0.4.0 Release Notes

Version 0.3.0 zip
Version 0.3.0 Release Notes

Once unzipped, ensure the bin folder contents are executable on mac/linux:chmod 755 bin/*

And add the bin folder to your PATH.

mac/linux: export PATH=<pathToUnzipLocationOrClone>/bin:$PATHwin: set PATH=<pathToUnzipLocationOrClone>\bin;%PATH%

Clone the repository and install it or run from it:

git clone https://github.com/scripted-editor/scriptedcd scriptednpm install

If you already have a clone of the scripted repo and want to update to the latest master, don'tforget that you also need to update external dependencies that may have changed. Run the followingcommands from the root of your clone.

git checkout mastergit pullgit clean -fxdnpm install

Running it

Whatever route you took to installing it, just run:

scr myfile.js

When working with Scripted, think about it like usingvi/emacs. From wherever you are in your terminal window youcan launch Scripted and start editing a file.

Launching scripted will cause the Node.js server to start in the background.

Here are some of the more vital key bindings to use once the editor is open. WhereCmd/Ctrl is specified it meansCmd on Mac andCtrl on Linux/Windows:

  • F1 - open help to show all key bindings (or press '?' in the top right)
  • Cmd/Ctrl+s - save!
  • Cmd/Ctrl+Shift+E - open/close subeditor
  • Cmd/Ctrl+Shift+F - open Find File dialog. Inside the dialog, you can search for files in the project by regular expression and:
    • Click a result to open it in main editor
    • Shift+Click a result to open it in sub-editor
    • Cmd/Ctrl+Click a result to open it in a new tab
  • Cmd/Ctrl+Shift+o - open outline view. A dialog will present the functions and you can quickly navigate to them
  • Cmd/Ctrl+F - in-file search
  • Ctrl+Space - content assist
  • F8 - navigate to declaration
  • Shift+F8 - open declaration in subeditor
  • Cmd/Ctrl+F8 - navigate to declaration in new tab
  • Alt+Shift+F - format

On the left hand side is a traditional navigator for opening different files. Above the editor is a breadcrumb, hover over a component to see other files in that directory.

The editor does support a degree of customization, see the section on theFeatures page.

Scripted receives most testing in Chrome and Firefox, you may need one of those browsers in order to get the most out of it.

Anything else I need to know before using it?

When you open Scripted on a file, it will attempt to infer the root of your project by locating the nearest.git/.project filein the hierarchy. Knowing the root is important because that is the scope in which searching and dependency analysis is done. Ifyou don't have one of these markers for the root, you can create an empty.scripted file to indicate the root.

Current status

As of Jan 2013 the project is at version 0.3. There is a long way to go but the team have been using Scripted to develop Scripted for a while now.

Further reading

Where can I ask questions, provide feedback or raise issues?

What's next for Scripted?

  • Even smarter inferencing, leading to better content assist and easier navigation.
  • More panes for the side panel. Currently there is just an editor pane but we intend to include search results panes,documentation, git information panes, perhaps code preview and simulated code execution panes. The intention will befor Scripted to try and automatically manage these where possible, so all the content on screen is kept relevantto the task at hand.
  • Simple plugin system.
  • Debugging. Exploring integration with tools like Chrome Dev Tools and node inspector.

If you have more ideas for what you'd like to see, let us know viaaGithub issue orourscripted-dev discussion group.

Can I contribute?

Sure! Just pressFork at the top of this github page and get coding. Before we accept pull requests we just need you to sign a simple contributor'sagreement - which you can findhere. Signing the contributor's agreement does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do. Active contributors might be asked to join the core team, and given the ability to merge pull requests.Pull requests should ideally reference a JIRA ticket in theissuetracker that details what the request is addressing.

The codebase is entirely JavaScript/HTML/CSS.

If you are keen to contribute but aren't sure what to work on, take a look atthegithub issues for inspiration.The codebase is very new in places and isn't that tricky to get to grips with.

If you don't feel like coding but still want to contribute, please join the discussion on the issues and scripted-dev group.

About

The Scripted code editor

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors13

Languages


[8]ページ先頭

©2009-2025 Movatter.jp