Way to view code blocks with loooong lines better
See original GitHub issueCode blocks with long lines (as they appear in stack traces and similar) are shown with a scroll bar on Github:
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
That, combined with the 700px width of the comments makes it very hard to get an overview of the actual content.
It would be awesome if something like a “fullscreen” button would appear in the top right of the code block that e.g. takes the code block out of the comment box and lets it use the full screen width.
Bad mockup:
(Uses width:1800px; position:relative; left:-480px;
to simulate the effect)
Maybe this could also be dynamic so it just uses the size it needs to the lines be fully displayed.
If the total screen width still is not enough, it would still show the scrollbar of course.
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (9 by maintainers)
Top Results From Across the Web
Way to view code blocks with loooong lines better · Issue #1515
Code blocks with long lines (as they appear in stack traces and similar) are shown with a scroll bar on Github: Lorem ipsum...
Read more >1 Code::Blocks Project Management
The display of line numbers in Code::Blocks can be activated via 'Settings' →'General Settings' in the field 'Show line numbers'. The shortcut Ctrl-G...
Read more >Code blocks, but better - Pedro Duarte
In this post, I'll share with you how I built a custom code block component. ... Choose whether to display line numbers or...
Read more >Long code blocks inside if statements or for loops
It's generally a good idea to be able to see the whole of a method on one screen. ... If the function contains...
Read more >Reading from a File in Code Blocks - YouTube
More About File Input · C++ Tutorial 29 - Reading and Writing to Files - fstream · C++ file handling for beginners! The...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In GitHub Dark we use the following global css:
You can toggle a class of “nowrap” on the body to toggle the feature - this also works if you paste in the above css into the “Custom CSS” block of RGH.
There is also a GitHub toggle code wrap userscript that adds a button within each code block to allow toggling of the line wrap.
Thanks for sharing the example. Makes sense.
I agree this could be useful. It should only be as wide as not needing a scrollbar anymore.