Created
February 10, 2015 23:28
-
-
Save liddiard/ae16bd7092fc2c5738c5 to your computer and use it in GitHub Desktop.
GitHub Atom editor config scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use two-space tabs for JavaScript | |
path = require 'path' | |
atom.workspaceView.eachEditorView (editorView) -> | |
editor = editorView.getEditor() | |
filepath = editor.getPath() | |
# set Tab Length for JS sources | |
if path.extname(filepath) is '.js' | |
editor.setTabLength(2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
atom.workspaceView
is apparently deprecated. Replacing it with suggestedatom.views.getView(atom.workspace)
resulted inundefined is not a function
error, though.