Labs/Bespin/UserGuide: Difference between revisions

From MozillaWiki
< Labs‎ | Bespin
Jump to navigation Jump to search
Line 97: Line 97:
=Command Line=
=Command Line=


It shows at the bottom of the page.
It shows at the bottom of the page. Here you can type some commands to do some option that are not available trough the UI.


==Commands==
==Commands==

Revision as of 22:01, 18 February 2009

THIS USER GUIDE IS STILL IN A VERY EARLY STAGE OF DEVELOPMENT

Disclaimer

This documentation is for Bespin version 0.1.1 "Naughty Nimbus" but it will be updated as new releases come out.

What is Bespin?

Bespin is an experiment in trying to create a web-based web-focused extensible code editor from Mozilla Labs. It's made by Dion Almaier and Ben Galbraith. This editor is based on new technologies regarding HTML 5.

How can I use Bespin

Requisites

To use Bespin, it's recommended that you use Firefox or Webkit Nightly Builds browsers.

Despite of this, Bespin should work in every modern browser that supports HTML 5 property "Canvas" (this excludes Internet Explorer), has a text rendering API, and support JavaScript.

Browsers that support Bespin:

  • Firefox 3.x
  • Webkit Nightly Builds (development version of Safari)
  • Google Chromium (development version of Chrome)

Browsers NOT supported:

  • Internet Explorer
  • Google Chrome
  • Opera 9
  • SeaMonkey

Making an account

To use Bespin you must create an account into Bespin Website and then log in. You'll be facing your Dashboard, welcome aboard!

Dashboard

The Dashboard is the main view of your projects, files, opened sessions, and statistics (in a future version).

Projects

This section is still in development.

Importing

You can import projects to your Bespin account from the web. To import a project you can do:

 import <project name> <url with file>

Projects must be hosted on-line and compressed in ZIP or TAR.GZ formats.

Exporting

To export a project to your computer you can do:

 export <project name> <archivetype>

<archivetype> can be ZIP or TGZ. If archivetype is not passed it defaults to ZIP

Version Control

Not supported in this version.

File View

The file view opens up when you click on any project. You can open a file by double clicking on it.

Open Sessions

This is where opened files appear. Every file shown here is still active, and you can access it by double clicking on it.

Editor

This is the main editor. You can edit your files here. It has syntax highlighting and the most commons tools for an editor:

  • Cut/Copy/Paste
  • Preview on Web (does not work on Webkit)
  • Undo/Redo
  • Save/Close
  • Change font size
  • Line numbering

Collaboration

Not included in this version.

Syntax Highlighting

Right now only CSS, JavaScript and HTML hightlighting is supported. This will be improved in a near future.

Keyboard Shortcuts

Note: The keyboard shortcuts are the same for Windows, GNU/Linux and Mac OS, there is no Cmd equivalent.

Control-J: Takes you to the command line.

Command Line

It shows at the bottom of the page. Here you can type some commands to do some option that are not available trough the UI.

Commands

General Commands

alias [alias] [command] This creates an alias between a word you want with a command p.e.:

 alias close closefile

This creates an alias that closes without saving the file you are currently working.

set [parameter]: This sets values to the configuration. If parameter is not passed a list with the available variables will be displayed. To change a parameter value you can do:

 set <variable> <value>

For example:

 set theme white

projects: Show a list with your projects.

In-Dashboard Commands

history: Shows the command history.

version: Shows Bespin version.

files [project]: Shows the files inside a given project.

help: Displays a list with the commands.

In-Editor Commands

clear: Clear the content of the file.

closefile [file]: If file parameter is passed, closes the specified file, if not, closes the current open file.

clipboard: Saves the file contents into the clipboard.

dashboard: Go back to the Dashboard

editconfig: Open the configuration file for the editor.

goto [line number]: Moves cursor to the desired line number

load [filename]: Loads the file specified in [filename]

logout: Logout the editor.

newfile [filename]: Creates a new file with the name specified in [filename]

preview [filename]: Preview the file in the web browser (does not work on Webkit)

project [name]: Creates a project with the desired name

User Configuration

Configuration File

You can access to it typing in the command line:

 editconfig

This will open a new file called "config.js"

Settings

Parameters that you can change via set:

collaborate [on|off]: Set collaboration mode. Default value: off

syntax [auto|css|html|javascript]: Set the highlighting language. Default value: auto.

autocomplete [on|off]: Set command autocompletion. Default value: off

theme [name]: Change theme. Currently there are only three suported themes. See Themes section for more info.

fontsize [number]: Change default font size. Default value: 10

keybindings [emacs]: Set emacs style keybindings

Example:

 set autocomplete on

Themes

Only three themes are currently supported:

  • Coffee (default)
  • White
  • Black

You can change between themes typing in the command line:

 set theme <theme-name>

Frecuently Asked Questions

You can see them here

Tips and Tricks

You can see them here

Known Issues

You can see them here

Bug Reporting

Have you find a bug? Tell us! Make a bug report