Trying to override preferredLineLength for markdown file


I’m using Atom for blogging, and I’ve been writing a lot of markdown. My goal is to set up Atom so that Markdown files have a line length of 80 characters and auto-wrap at the 80 characters. I’ve pasted the following into my config.cson, but Atom doesn’t seem to be regarding it in any way:

    preferredLineLength: 50
    softWrap: true
    softWrapAtPreferredLineLength: true

I’ve verified that the scope of my Markdown file is indeed source.gfm. I’ve also tried this in safe mode, and it is still not working. Updating the global configuration from the settings GUI or from the config.cson file does exactly what I want, but I would like to only change these settings for Markdown.

Does anyone know what I’m doing wrong? It’s possible that I just don’t understand something about the scope-specific configuration. Thanks for your help!


Try the .source.gfm selector instead.

Also you can edit these settings for the specific language using the language packages settings from the settings-view. Just go to the packages tab and search for language-gfm and from there edit these settings, that way you don’t have to edit the config.cson directly.


Thanks @Ben3eeE! Changing it to .source.gfm did the trick. I figured it was something silly like that. I also didn’t realize I could edit those settings from the language-gfm settings. Thanks for the info.