andrwj
11/10/2017 - 3:54 AM

Atom: Set default grammer/syntax of new document to 'markdown'

Atom: Set default grammer/syntax of new document to 'markdown'

atom.workspace.observeTextEditors (editor) ->
  original = editor.getGrammar()
  if original? and original is atom.grammars.grammarForScopeName('text.plain.null-grammar')
    editor.setGrammar(atom.grammars.grammarForScopeName('source.markdown'))