Skip to content

Commit 8c716ee

Browse files
author
Jen Weber
authored
Merge pull request #7 from cah-danmonroe/editors
Port over Editors
2 parents e7aa080 + 671128f commit 8c716ee

File tree

1 file changed

+148
-1
lines changed

1 file changed

+148
-1
lines changed

guides/reference/dev-tools.md

Lines changed: 148 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,148 @@
1-
<!-- Copy over code editor content -->
1+
<!-- Copy over code editor content -->
2+
3+
### Visual Studio Code
4+
If you are using [VSCode](https://code.visualstudio.com/) with `ember-cli`, there's an [official
5+
extension pack](https://marketplace.visualstudio.com/items?itemName=emberjs.emberjs#overview)
6+
maintained by the Ember Learning team that adds multiple ember plugins that can help in
7+
Ember development. If you already have VSCode installed on your machine, you can
8+
[click here](vscode:extension/emberjs.emberjs) to view this extension pack inside VSCode. Alternatively, you can
9+
also search for `emberjs.emberjs` inside the [extensions view](https://code.visualstudio.com/docs/editor/extension-gallery).
10+
11+
### Atom
12+
13+
If you are using [Atom](https://atom.io) with `ember-cli`, there are some
14+
packages available specific to Ember development.
15+
16+
`Atom -> Preferences -> Install`
17+
18+
* [ember-cli-helper](https://atom.io/packages/ember-cli-helper) - ember-cli integration in Atom
19+
* [ember-tabs](https://atom.io/packages/ember-tabs) - Makes atom.io work better with Ember pods
20+
* [atom-ember-components](https://atom.io/packages/atom-ember-components) - See all controllers and components that are rendering your component. Currently only works with pods structure.
21+
22+
### Emacs
23+
24+
If you are using [Emacs](https://www.gnu.org/software/emacs/) with `ember-cli`,
25+
Emacs creates temporary backup, autosave, and lockfiles that interfere with
26+
broccoli watcher, so they need to either be moved out of the way or disabled.
27+
To do that, ensure your emacs configuration contains the following:
28+
29+
```bash
30+
(setq backup-directory-alist `((".*" . ,temporary-file-directory)))
31+
(setq auto-save-file-name-transforms `((".*" ,temporary-file-directory t)))
32+
(setq create-lockfiles nil)
33+
```
34+
35+
An [ember-mode](https://github.com/madnificent/ember-mode) package is also
36+
available. It has shortcuts for quickly navigating files in ember projects,
37+
running generators, and running build, serve, and test tasks. It also includes
38+
support for linking build errors to files and minibuffer notifications of
39+
`ember serve` status. It can be installed from [MELPA](http://melpa.org/). To
40+
use MELPA, ensure your configuration contains the following:
41+
42+
```bash
43+
(require 'package)
44+
(add-to-list 'package-archives
45+
'("melpa" . "http://melpa.org/packages/") t)
46+
(package-initialize)
47+
```
48+
49+
Then ember-mode can be installed from the package menu at `M-x
50+
package-list-packages`. After it is installed, add a file named
51+
`.dir-locals.el` to the root of your ember projects with the contents:
52+
53+
```bash
54+
((nil . ((mode . ember))))
55+
```
56+
57+
to enable it inside those projects.
58+
59+
60+
### Sublime Text
61+
62+
If you are using [Sublime Text](http://www.sublimetext.com) with `ember-cli`,
63+
by default it will try to index all files in your `tmp` directory for its
64+
GoToAnything functionality. This will cause your computer to come to a
65+
screeching halt @ 90%+ CPU usage, and can significantly increase build times.
66+
Simply remove these directories from the folders Sublime Text watches:
67+
68+
`Sublime Text -> Preferences -> Settings - User`
69+
70+
```js
71+
// folder_exclude_patterns and file_exclude_patterns control which files
72+
// are listed in folders on the side bar. These can also be set on a per-
73+
// project basis.
74+
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "tmp/class-*", "tmp/es_*", "tmp/jshinter*", "tmp/replace_*", "tmp/static_compiler*", "tmp/template_compiler*", "tmp/tree_merger*", "tmp/coffee_script*", "tmp/concat-tmp*", "tmp/export_tree*", "tmp/sass_compiler*"]
75+
```
76+
77+
### WebStorm
78+
If you are using [WebStorm](https://www.jetbrains.com/webstorm/) with
79+
`ember-cli`, you will need to modify your `.gitignore` file, enable
80+
`ECMAScript6` settings, and mark certain directories.
81+
82+
First, add the following line to `.gitignore`:
83+
```bash
84+
.idea
85+
```
86+
87+
Next, from the WebStorm menu:
88+
89+
`File > Settings -> Languages & Frameworks -> JavaScript -> ECMAScript6`
90+
91+
Click 'OK' to close the Settings modal window.
92+
93+
Next, in Webstorm's Project window right-click on each of the following
94+
directories, go to 'Mark Directory As' and mark as indicated:
95+
96+
Mark as `Excluded`:
97+
```bash
98+
/tmp
99+
/dist
100+
```
101+
102+
Mark as `Resource Root`:
103+
```bash
104+
/
105+
/bower_components
106+
/bower_components/ember-qunit/lib
107+
/public
108+
```
109+
110+
Mark as `Test Sources Root`:
111+
```bash
112+
/tests
113+
```
114+
115+
### Intellij-emberjs
116+
117+
[This plugin](https://github.com/Turbo87/intellij-emberjs) provides excellent
118+
Ember.js support for all JetBrains IDEs that support JavaScript, including
119+
WebStorm.
120+
121+
In order to install it, go to:
122+
123+
`File | Settings... | Plugins | Browse repositories...`
124+
125+
Search for `Ember.js` and click the Install button.
126+
127+
### Vim
128+
129+
If you are using [Vim](http://www.vim.org/) with `ember-cli`, Vim creates
130+
temporary backups and autosaves which interfere with broccoli, so they need to
131+
either be moved out of the way or disabled. To do that, ensure your .vimrc
132+
contains the following:
133+
134+
```bash
135+
set backupdir=~/.vim/backup//
136+
set directory=~/.vim/swap//
137+
set undodir=~/.vim/undo//
138+
```
139+
140+
And make sure to create the directories:
141+
```bash
142+
mkdir -p ~/.vim/backup; mkdir -p ~/.vim/swap; mkdir -p ~/.vim/undo
143+
```
144+
145+
Some useful Vim plugins for working with Ember.js:
146+
147+
- [ember_tools](https://github.com/AndrewRadev/ember_tools.vim) - Provides various tools for navigation and code reformatting, similar to rails.vim for Rails.
148+
- [projectionist](https://github.com/tpope/vim-projectionist) - Powerful project navigation, provided you write your own code projections. Here's [an example](https://gist.github.com/AndrewRadev/3524ee46bca8ab349329)

0 commit comments

Comments
 (0)