If you don't have it already, download the Atom editor. Install it, run it at least once and be sure to quit it, then:
cd ~
# If you have an atom config already:
mv .atom .atom-bak
git clone [email protected]:substantial/atomfiles.git .atom
cd .atom && bin/update-packages
We want to build a config that we enjoy using and that we all feel comfortable and productive in.
- Tenets should be agreed upon, discussed, modified or removed if they do not fit.
- This config should be usable by all disciplines and all skill levels. It should be approachable enough for all, but powerful enough for power users.
- There is no owner. All at Substantial have an equal say in what goes in it.
- No forks, we should all run off of master. It's ok to use branches to experiment with things.
- Performance is an important part of the experience and should not be neglected. Poorly performing addons should be optimized or removed.
- No Vim mode. No Emacs mode. It is good to take inspiration from them, but we should see if we can build something as usable for all without that as a wholesale starting point. Readline keys are great and fine, but we should be sure to keep standard OS X arrow key movements as well.
- Avoid overriding keys common to other OS applications (like cmd+s).
- Try to avoid overriding default atom key bindings. If multiple keys are bound to the same thing (like cmd+t and cmd+p) it is more OK if the less common one is overridden.
- It is never finished. It should be refined, added to and optimized indefinitely.
- Be mindful of the fact that others use this config. If you have good reason to make huge changes, communicate them and seek advice on them. We shouldn't worry about backwards compatibility too much, but we should be mindful.
Most of the default Key Bindings are still enabled. Below are custom and particularly important key bindings.
Key | Command | Preview |
---|
| **File Management** |
⌥⌘N | Advanced New File |
⌥⌘O | Advanced Open File |
⌃- | Toggle Tree View |
⌃X C | Duplicate File |
⌃X M | Move/Rename File |
⌃X D | Delete File |
| |
| Fuzzy File Finder |
⌘P | Open Fuzzy File Finder |
⌘B | Open Fuzzy File Finder for recently opened files |
⌃S | Open file in horizontal split |
⌃V | Open file in vertical split |
| |
| Window Navigation |
⇧⌘K | Focus Previous Pane |
⇧⌘J | Focus Next Pane |
⌥⌃P | Toggle automatic pane resizing |
| |
| Editing |
⌃I | Auto Indent |
⌃Y | Paste from kill ring (press repeatedly to toggle through things previously copied.) |
⇧⌃Y | Paste last thing pasted |
⇧⌘' | Toggle quotes - replace ' with " or vice versa |
⇧⌘C | Open Color Picker |
| |
| Moving Around - Most can be combined with ⇧ to select text |
⌃F | Move right |
⌃B | Move left |
⌥F | Move to next word |
⌥B | Move to previous word |
⌃P | Move up |
⌃N | Move down |
⌥P | Move up to next blank line |
⌥N | Move down to next blank line |
⌥S ░ | Move to right before next ░ on line, like vim t
(hold or double tap to select) |
⌥R ░ | Move to right after previous ░ on line, like vim T
(hold or double tap to select) |
⌃8 | Find next word under cursor, like vim *
|
⌃3 | Find previous word under cursor, like vim #
|
⌃S | Fuzzy Search Forward |
⌃R | Fuzzy Search Reverse |
| |
| Selecting Text |
⌘L | Select Current Line - Can be repeated to select multiple lines |
⌘I | Expand Region (word, inside parens, etc.) |
⇧⌘I | Shrink Region (word, inside parens, etc.) |
⌃O ( | Select inside parentheses (works for {[<'"t
) |
⇧⌃O ( | Select around parentheses (works for {[<'"t
) |
⌥S⌥S ░ | Select to right before next ░ on line, like vim vt
|
⌥R⌥R ░ | Select to right after previous ░ on line, like vim vT
|
| |
| Multiple Cursors - If multiple things are selected, you can type to change them all at once. You can also use regular navigation keys to move multiple cursors around at once. This is helpful for making lots of similar changes at once. |
⌘D | Select Next - First press selects entire word. Next adds next instance of word under cursor to selection |
⌘K ⌘D | Skip Selection - After ⌘D, if you don't want it but want the next instance |
⌘U | Undo Select Next |
⌃⌘G | Select All instances of current word (works w/ File Find too) |
⇧⌘L | Split Selection into Multiple Cursors - Turns a selection of multiple lines into separate selections/multiple cursors. Try hitting ⌃A afterwards to get the cursors to the beginning of the lines |
⌘Click | Add Cursor - Good for quickly adding multiple cursors for multiple changes in places that would be tricky with find or ⌘D |
| |
| Find and Replace |
⌘F | Find in File |
⌘G | Find Next in File |
⇧⌘G | Find Previous in File |
⇧⌘F | Find in Project |
⌃⌘N | Find Next in Project |
⌃⌘P | Find Previous in Project |
⇧⌃⌘F | Focus Find in Project Results |
| |
| Git (git plus) |
⇧⌘H | Open up git plus fuzzy find (try typing 'checkout' to see options) |
-
Install
my-new-package
:~/.atom/bin/install-package my-new-package
-
Commit the change to
packages.txt
and pull request it.
-
Use the Install section of preferences to install a package.
-
Run:
~/.atom/bin/update-packages
-
Answer "keep" when asked about your package.
-
Commit the change to
packages.txt
and pull request it.
-
Use the UI to update packages.
-
Run:
~/.atom/bin/update-packages
-
Commit the changes to
package.txt
and pull request it.
- advanced-open-file - A more reasonable file open/new with tab completion.
- color-picker - Adds a color picker.
- project-find-navigation - Quickly navigate project find
- pigments - Displays colors in projects and files.
- Linter - Enable displaying lint (code style) warnings.
- linter-eslint - Linter plugin for eslint
- expand-region - Expand selection to quotes/braces/brackets/etc.
- language-haml - HAML support
- react - React support
- block-travel - Move the cursor by code blocks
- tabularize - Align code
- lazy-motion - Rapid cursor positioning w/ fuzzy search.
- find-and-till - Quickly jump to a character on your current line (like Vim's find and till)
- painless-panes - Automatically resize panes
- clip-history - Paste from clipboard history like emacs' kill-ring
- pane-split-moves-tab - Opening a new split moves the current file to that split instead of duplicating it.
- recent-files-fuzzy-finder - See recently opened files in a Fuzzy Finder dialog.
- docblockr - Work within doc blocks like jsdoc.
- wallaby - Instant test runner for javascript http://wallabyjs.com/
- set-syntax - Set file syntax with command palette