DWIM Narrowing

The other day I saw a nice bit of code from Michael Fogelman that implemented a “do what I mean narrowing” function. That seemed pretty neat and I made a mental note to add it to my init.el. Then Artur Malabarba over at Endless Parentheses, a site you should definitely add to your feed, took that code and improved it a bit.

His best idea, though, was to add it to his toggle map. Now, for almost all uses of narrowing, a single, easy-to-remember key sequence will do what he wants. That means he no longer has to remember all the different narrowing calls and their key sequences; he just has to type 【Ctrl+x t n】 and the desired narrowing takes place. I’ll definitely be adding his implementation to my version of the toggle map.

This entry was posted in General and tagged . Bookmark the permalink.