pulsar/README.md

96 lines
2.5 KiB
Markdown
Raw Normal View History

2011-11-10 06:03:07 +04:00
# Atom — Futuristic Text Editing
2012-01-20 22:15:02 +04:00
## Be forwarned: Atom is pre-alpha software!
2011-08-28 23:46:34 +04:00
2012-03-29 22:59:51 +04:00
## Download
2011-08-19 11:36:46 +04:00
2012-04-02 22:38:22 +04:00
1. Download from [speakeasy](https://speakeasy.githubapp.com/apps/com.github.atom-osx)
2011-08-24 20:59:12 +04:00
2012-03-29 22:59:51 +04:00
2. Unzip and open the app
2011-08-25 23:38:36 +04:00
2012-03-29 22:59:51 +04:00
## Basic Keyboard shortcuts
2012-03-30 02:47:31 +04:00
Atom doesn't have much in the way of menus yet. Use these keyboard shortcuts to
explore features.
2011-08-25 23:38:36 +04:00
2012-03-29 22:59:51 +04:00
`cmd-o` : open file/directory
2012-03-29 23:21:30 +04:00
2012-03-29 22:59:51 +04:00
`cmd-n` : new window
2012-03-29 23:21:30 +04:00
2012-03-30 02:47:31 +04:00
`cmd-t` : open fuzzy file finder
2012-03-29 23:21:30 +04:00
2012-03-29 22:59:51 +04:00
`cmd-:` : open command prompt
2012-03-29 23:21:30 +04:00
2012-03-29 22:59:51 +04:00
`cmd-f` : open command prompt with /
2012-03-29 23:21:30 +04:00
2012-03-29 22:59:51 +04:00
`cmd-g` : repeat the last search
2012-03-29 23:21:30 +04:00
2012-04-02 20:08:11 +04:00
`cmd-r` : reload the current window
`cmd-alt-ctrl-s` : run specs
2012-03-30 02:47:31 +04:00
`cmd-alt-arrows` : split screen in direction of arrow
2012-03-29 22:59:51 +04:00
`cmd-alt-w` : toggle word wrap
2012-03-29 23:21:30 +04:00
2012-03-29 22:59:51 +04:00
`cmd-alt-f` : fold selected lines
2011-08-25 04:46:20 +04:00
2012-03-29 22:59:51 +04:00
Most default OS X keybindings also work.
2011-08-25 04:46:20 +04:00
2012-03-30 02:47:31 +04:00
## Init Script
Atom will require `~/.atom/atom.coffee` whenever a window is opened or reloaded if it is present in your
home directory. This is a rudimentary jumping off point for your own customizations.
2012-03-29 22:59:51 +04:00
## Command Panel
2011-08-24 20:59:12 +04:00
2012-03-29 22:59:51 +04:00
A partial implementation of the [Sam command language](http://man.cat-v.org/plan_9/1/sam)
2011-08-28 23:46:34 +04:00
2012-03-29 22:59:51 +04:00
*Examples*
2012-03-29 23:21:30 +04:00
2012-03-29 22:59:51 +04:00
`,` selects entire file
2012-03-29 23:21:30 +04:00
2012-03-29 22:59:51 +04:00
`1,4` selects lines 1-4
2012-03-29 23:21:30 +04:00
2012-03-29 22:59:51 +04:00
`/pattern` selects the first match after the cursor/selection
2012-03-29 23:21:30 +04:00
2012-03-29 22:59:51 +04:00
`s/pattern/replacement` replace first text matching pattern in current selection
2012-03-29 23:21:30 +04:00
2012-03-29 22:59:51 +04:00
`s/pattern/replacement/g` replace all text matching pattern in current selection
2012-03-29 23:21:30 +04:00
2012-03-29 22:59:51 +04:00
`,s/pattern/replacement/g` replace all text matching pattern in file
2012-03-29 23:21:30 +04:00
2012-03-29 22:59:51 +04:00
`1,4s/pattern/replacement` replace all text matching pattern in lines 1-4
2012-03-29 23:21:30 +04:00
2012-03-29 22:59:51 +04:00
`x/pattern` selects all matches in the current selections
2012-03-29 23:21:30 +04:00
2012-03-29 22:59:51 +04:00
`,x/pattern` selects all matches in the file
2012-03-29 23:21:30 +04:00
2012-03-29 22:59:51 +04:00
`,x/pattern1/ x/pattern2` "structural regex" - selects all matches of pattern2 inside matches of pattern1
2012-03-30 02:47:31 +04:00
## Key Bindings
Atom has a CSS based key binding scheme. We will add a nicer loading mechanism, but for now you can bind
keys by calling `window.keymap.bindKeys` with a CSS selector and a hash of key-pattern -> event mappings.
```coffeescript
window.keymap.bindKeys '.editor'
'ctrl-p': 'party-time'
'ctrl-q': 'open-dialog-q'
```
When a keypress matches a pattern on an element that matches the selector, it will be translated to the
named event, which will bubble up the DOM from the site of the keypress. Extension code can listen for
the named event and react to it.
2012-03-29 22:59:51 +04:00
## Build from source
1. Get [xcode 4.2](http://itunes.apple.com/us/app/xcode/id448457090?mt=12)
2. Install CoffeeScript http://coffeescript.org/ (try `npm i -g coffee-script`)
3. `git clone git@github.com:github/atom.git`
4. `cd atom`
2012-03-30 02:47:31 +04:00
5. `rake run`