3

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": true

but 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?

atom soft wraps md files, but not tex files

3

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": true

As I later installed yudai-nkt/language-tex package, I added

".latex.tex.text":
  editor:
    softWrap: true

These settings can be also modified from within the Atom GUI:

Edit
└─ Preferences
   └─ Packages
       └─(search for your language, pick a package)
          └─> Settings

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.