How to get certain files to automatically wrap their text?


#1

Hi,

I have set Atom up so that the keyboard shortcut: Ctrl+Alt+S causes the contents of any file I am presently editing to wrap, so that lines that so long to fit in the present window are spread out over more than one line. I was wondering if it might be possible to get Atom to automatically do this text wrapping to all files with the file extensions:

.html
.toml
.yaml
.yml

Thanks for your time,
Brenton


#2

Oh and yeah I have seen this discussion too and tried my best to put brettz9’s suggestion into use. Here is what I added to my config.cson based on this suggestion:

customFileTypes: {
  ".yml": ["editor:toggle-soft-wrap"]
}

(under core:). Needless to say (as otherwise I could have closed this discussion) it didn’t work.


#3

What you’re looking for is what is referred to as “language-specific configuration” in the documentation:

https://atom.io/docs/latest/using-atom-basic-customization#language-specific-configuration-settings

You can go to the language package settings for any language (such as the language-html package for HTML) and set Soft Wrap to true.