Restrict editing to selection (like Emacs narrow)?


Emacs has this nifty feature where I can restrict the buffer to the current selection. So for example, I select a function and then restrict, and the result is that the buffer just shows the function, nothing outside it. And all editing commands will be restricted to the function (e.g. find/replace).

Hm. Actually, I want to restrict cmd-d to the function, so if there is something more specific for Atom…


That would be a nice package for someone to do. I’ll put it on my list.