Toggle Soft Wrap not working as expected


Lots of problems with Toggle Soft Wrap in Atom:

  • There’s no shortcut key.
  • There’s no notification in the menu that it’s turned on.
  • It is on a per-file basis; I want to turn it on and off globally without resorting to editing some obscure settings file.
  • It isn’t “sticky”; the setting turns off when I restart Atom.

These problems have been discussed, like here and here, so I don’t know why no one has done anything about it.


As I stated in the other topic:

My soft-wrap-indicator package solves the indication problem of whether a file has Soft Wrap turned on and also makes it easy to toggle by clicking the indicator in the status bar.


Does it come with a key shortcut? Ctrl+W or Ctrl+Shift+W would be nice.


No, I tend not to put shortcuts into my packages because there are just too many chances for conflicts. (I don’t want to get into religious arguments with people about which keys are the “right” ones to use :laughing:) I’ll take a look later today and see if I can make it easy to add one.


No, it doesn’t solve the indicator problem. It gives a workaround, and for that you should be commended, @leedohm, but the main problem lies in Atom.

  • Your plugin doesn’t make an indicator appear in the View menu, like it should be.
  • Your plugin doesn’t make soft wrap turn on or off across all files.
  • Your plugin doesn’t make the setting “stick”.

Atom should fix this. Thanks for the workaround, but it doesn’t fix the problems—it merely provides a temporary bandage.


@garretwilson any news or workarounds in this problem?

I disable “soft wrap” to can go or select the start/end of a long line that is displayed in multiple lines. Another problem i wish it was fixed


I know of nothing new. I’ll note that this issue is nowhere as irritating as and Don’t open previously opened files on new start, though.


When opened, Atom restores the state of the most recent window unless you open it with a specific target. The tree view is only meant to show the files for one project, so of course it clears itself when you open something completely new. That is how the devs chose to design it and there are packages that implement persistent project lists. I personally use Project Viewer, so I have my whole project library on the right-hand side and my temporary tree view on the left-hand side.


Could you point me to documentation that explains this? Thanks.


Certainly. The first sentence of the in the tree view repo:

Explore and open files in the current project.

Still unsure? Open up multiple project folders and press Ctrl-Shift-F to open the Find in Project panel. Search for something common to the contents of both folders, and you’ll find results from both.

You can even view the logic in the Atom repo itself. When Atom quits, it pushes the most recent window state to .atom/storage/application.json. When it opens, it checks first for paths provided in the invocation, and if it doesn’t find any, it loads application.json. If you go look at that file while you have Atom open (one window, to keep it simple), you will see that the contents are exactly the same as your tree view. The tree view was never intended to be persistent.


I don’t want to get into a pedantic discussion over the semantics of “project”. It is clear that Atom tree-view has an “Add Project Folder” option. It is also clear that sometimes Atom discards the added “project folder” without asking. Many people feel that this behavior is unexpected (to say the least) and that is why was created.

Further discussion of that behavior should probably go on the issue itself rather than here.


Which can also be interpreted as “add a folder to the project”. Considering the behavior of find and the tree view, which of these is more likely to be the designer’s intent?

It is also clear that sometimes Atom discards the added “project folder” without asking.

You make it sound so random. If you add a project folder, close Atom, and then open Atom again, your folder persists. If you do not have an Atom window open and you open a folder, your project becomes the folder you just opened.

Many people feel that this behavior is unexpected (to say the least) and that is why was created.

There are always funky behavior elements when moving to a new application. The wonderful thing about Atom is that we have packages to create new functionality that suits our workflows.

#9643 is open, and the devs haven’t said whether or not they’re considering a change. I was merely responding to the implication that the behavior of the tree view is a bug and offering a solution so that you no longer have to find it irritating.