Technically, it is … but there is no built-in method for doing so. There are a couple packages including Project Manager and Editor Settings that offer this capability. I have the following in my
init.coffee because I wanted to understand the mechanisms better and teach myself a little more CoffeeScript:
# Settings to assign based on grammar name.
'Shell Script (Bash)':
# Apply the settings to the editor session.
# editorView - EditorView to which to apply the settings.
# settings - The settings to apply.
applySettingsForGrammar = (editorView, settings) ->
editor = editorView.getEditor()
for key, value of settings
when 'showInvisibles' then editorView.setShowInvisibles(value)
when 'softWrap' then editor.setSoftWrap(value)
when 'tabLength' then editor.setTabLength(value)
# Apply grammar-specific settings.
# editorView - EditorView to which to apply the grammar-specific settings.
applySettings = (editorView) ->
settings = grammarSettings[editorView.getEditor().getGrammar().name]
return unless settings?
# Executes for each and every EditorView, past and future.
atom.workspaceView.eachEditorView (editorView) ->
editorView.getEditor().on 'grammar-changed', ->