2

Would it be a good (and feasible) idea to have panning in code blocks?

People keep pasting these wide-spaces unreadable code blocks. I'm sometimes willing to do someone else's styling job, but not before I know the question is worth editing at all. The combination of scrolling up/down and left/right is tiring. Panning would be very helpful to get a quick impression of what a code-block is about.

enter image description here

There have been all kinds of requests to facilitate reading code blocks, most of them proposing some resizing feature

(to name a few)

Maybe there are a good reasons why such features have never been implemented. Panning/dragging (as in http://jqueryui.com/draggable/) might be a happy medium.

The Android has a similar feature. (but of course Android and html are totally different).

  • 7
    Mouse-based panning would eliminate the easiest way to select and copy text. – Charles Nov 30 '13 at 17:02
  • 1
    This is why, when possible, I edit code blocks to eliminate horizontal scrolling. – gunr2171 Nov 30 '13 at 17:10
  • While I like this idea, @Charles has a good point; that's why many (decent) programmers (even those who don't use vim) don't have lines that require horizontal scrolling. Just use multiple lines; it's not like you're coding an assembly pneumonic that's over 80 characters? – Cole Johnson Nov 30 '13 at 19:22
  • @Charles You are right and I had this in mind when I included the last meta link. I admit it's a problem, maybe a dilemma. As for eliminating scrolling - of course we shouldn't have wide-spaced code blocks. I just wish each OP would think that way. – Gert Arnold Nov 30 '13 at 19:58
  • 1
    @ColeJohnson pneumonic - lung disease? – Rosinante Nov 30 '13 at 22:47
  • @GertArnold you are free to edit the code block to remove the need for horizontal scrolling as long as you don't edit the code itself – Cole Johnson Dec 1 '13 at 5:22
  • @Rosinante mnemonic* (speech to text) – Cole Johnson Dec 1 '13 at 5:24
  • 1
    Feels like a browser or mouse feature to me. (Using my touchpad, I can already pan everywhere by using two fingers to scroll, which can move in any direction. And implementing it in JavaScript would start another discussion: should moving down the pointer move the content up or down?) – Arjan Dec 1 '13 at 9:38

You must log in to answer this question.

Browse other questions tagged .