Created
August 15, 2015 03:07
-
-
Save z-------------/197fdbd7339814dd5d3e to your computer and use it in GitHub Desktop.
Set the tab length to 2 for all .dart files, as per the style conventions. For Atom editor.
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
| path = require "path" | |
| atom.workspace.observeTextEditors (editor) -> | |
| if path.extname(editor.getPath()) is ".dart" | |
| editor.setTabLength(2) | |
| console.log "set tab length to 2", editor | |
| else | |
| tabLength = atom.config.get "editor.tabLength" || 4 | |
| editor.setTabLength(tabLength) | |
| console.log "set tab length to " + tabLength, editor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment