Enable soft wrap filtered by extension in Atom Editor
I am working with "text file formats" (like .md and .tex), as well as with "real programming languages".
I would like to have soft wrapping enabled only for a set of files, for example, .md, .tex, but not for .c, .h, .cpp, .py.
Now, I found that I could open my config.cson and create the next line
"*": "editor": "softWrap": truebut this, unfortunately, enables soft wraps for every file and they look awkward for C, Go, Python source files.
Atom soft wraps by default all .md files, even if the above configuration option is not included in the config.cson file. I would like to have soft wraps for my tex files to. How can I achieve this?
1 Answer
You need to find which package (scope?) controls the files you want to treat differently. The Atom Manual's "Basic Customization" page, "Language Specific Configuration Settings" section brings an example for this kind of customization that can be controlled from both the Settings View and the config.cson configuration file.
In my case, what I needed to do is adding the next lines to my config file
".text.plain": "editor": "softWrap": trueAs I later installed yudai-nkt/language-tex package, I added
".latex.tex.text": editor: softWrap: trueThese settings can be also modified from within the Atom GUI:
Edit
└─ Preferences └─ Packages └─(search for your language, pick a package) └─> Settings