The first version of the Scripted code editor has been released this week on github: https://github.com/scripted-editor/scripted.
Scripted in Action:
Why create Scripted?
Scripted is the result of some internal prototyping and investigative work exploring different strategies for future tools. The driving factors for exploring this space were really two-fold:
Firstly we are seeing a number of users choosing not to use an IDE but instead to go with a simpler lightweight editor (vim, Sublime, textmate). Developers typically have a set of tools they are very familiar with for common tasks (e.g. command line git) and don't feel the need to learn how to use those tools through some other user interface. These developers want tools that start pretty much instantly and continue to be extremely responsive during operation. At the moment, however, when choosing to give up the IDE they also seem to be giving up those benefits they've gotten used to like great content assist, fast navigation and early error indication. Scripted offers something lightweight and fast, also supporting key IDE facilities developers can't live without – facilities like content assist and understanding of common module systems. Those are the key focus of Scripted.
Secondly we are seeing a rise in the popularity of Cloud IDEs and the notion of Cloud workspaces. Developers connect to some remote system to do their development work and typically these tools (e.g. the Cloud9 IDE and eXo Cloud IDE) are offering a browser-based editing experience. The users workspace sits on the remote system. This kind of setup can work well for some teams although in our experience we've found there is still some need for an offline development mode as developers are not yet Internet connected 100% of the time and also it can be hard to get them to give up 'full control' and host their files remotely. In following the browser-based editing model and hosting the server locally Scripted is offering something that can meet developers needs now, but that will also enable the use of cloud workspaces in the future by simply deploying the server remotely.
The feature set
- Fast startup, lightweight.
- Errors and warnings:
- 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
- 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. in define() 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)
There is much more detail on these features in the wiki documentation.
Using Scripted to develop Scripted
Getting started with Scripted
But the basic steps are as follows:
- Ensure you have node installed
- Grab the latest packaged version (0.2.0) from here:
- Unzip it
- Ensure the scripts in the bin folder are executable (if on linux/mac) with:
chmod 755 bin/*
- Add the bin folder to your path:
- Start using it, launch it like you launch 'vi' with 'scr' or 'scripted'
Scripted will try to infer your project root at startup. It does this by searching for a close .git or .project file in the hierarchy. If you have none it will work in single file mode. To tell Scripted where the root is, you can create a simple (empty) .scripted file at the root. Scripted needs to know the root because, of course, some operations (like content assist, dependency resolution, search) happen in the context of a project.
As previously mentioned the server side technology is Node.js, but it really is a very small amount of server code. Underpinning the inferencing engine is some server side JS we have written for analyzing module dependencies.
We are currently at an early stage (version 0.2.0), our future plans include:
- 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 be for Scripted to try and automatically manage these where possible, so all the content on screen is kept relevant to the task at hand.
- Simple plugin system.
- Debugging. Exploring integration with tools like Chrome Dev Tools and node inspector.
We decided to open source early to get feedback. If you want to help us shape the editor, please join in the discussion. There is a scripted-dev google group for discussing it and a jira issuetracker for logging bugs, enhancement requests and voting on existing issues to ensure they are prioritized appropriately. If you want to start hacking on the codebase yourself we are definitely open to submissions – see the github page for more information.
Please try it out! https://github.com/scripted-editor/scripted
- Scripted Editor 0.3 release available
- Dependency analysis in Scripted
- Simple templates for the Scripted Editor
- Scripted 0.4 released
- Announcing SpringSource Tool Suite 2.0