Saturday, December 14, 2013

Chrome Dev Tools - Code Collapsing / Folding in Source Editor On Its Way!

I should be able to highlight some code or act on an entire file by hitting a keyboard shortcut (I'm accustomed to Ctrl-M, Ctrl-M to collapse/expand a selected chunk) and have that code visually collapse to just the definition/signature line and a + show up on the left side of the IDE which I could click to re-expand that collapsed piece of code. Ideally, collapsing would also work anywhere there are mandatory closing symbols on a separate like (such as each/while/do/if/else/etc...)

What went wrong? The behavior just doesn't exist as of right now that I can find.

Did this work before? No

How to solve the issue? Ask the Chrome Dev Team to implement it via the bug submitted below :)


The value of this behavior is evident when you consider how often it appears elsewhere even in Chrome (any collapsable treeview demonstrates this). Elements tab does it, all the tabs in the right-pane of Elements (Styles, Computed, Event Listeners, etc..) also do it. Nearly every major IDE does it (Netbeans, VIM, Eclipse, Visual Studio, etc..)

This is extremely valuable to me when working with larger code files to the extent that I'm still using other IDEs instead of DevTools when working with larger or more complex files.

If you're not familiar with this behavior somehow, http://vimeo.com/4020903 does a great job at showing the behavior, some potentially configurable options and perhaps a pattern to emulate since it's VIM and oss.

If you like the idea, go vote (not sure if it matters now, but it can't hurt) by clicking the star at the top left of the bug report below.

0 comments :

Post a Comment

Followers