How to replace a tree-view method in my package?


Hi everyone,

I’m writing a package that re-enables permanent deletion of files. To do this, I want to overwrite the tree-view method removeSelectedEntries. But the current documentation doesn’t give me the slightest clue of how I should do that…
It would be great if anyone could give me a hint.


  • Short way: Fork tree-view and change the code
  • Long way:
    1. Fork tree-view
    2. Add specs for all of the below
    3. Add configuration option
    4. Update the code to respect the configuration option
    5. Submit a Pull Request

You could write a package that monkey-patches a default-installed package, but I personally wouldn’t recommend it.


Lol, never thought of submitting a pull request. Thanks!


Monkey-patching may be an option if you doesn’t intend to publish your code (like when patching something from your init script), but as @leedohm said, I wouldn’t recommend it either, the more Atom come close to 1.0 the less this kind of dirty trick will do.


Submitted PR:


I have some package break every other atom release. Monkey-patching is only one thing that can cause this. I have several monkey-patches in my packages and ironically they haven’t caused a problem.