WebIDE suggestion: horizontal scroll bar in code editor #5196
Replies: 1 comment
-
Posted at 2016-01-12 by tve -1 (unless it's optional) Posted at 2016-01-12 by CrashingDutchman I don't have a problem with this being an optional setting! On big screens it's often no issue probably, but I use a MacBook pro and the IDE makes a mess of my code with the line wraps... @tve: Do you want to elaborate why you don't want (need?) such a setting? Posted at 2016-01-12 by Frida -1 too Posted at 2016-01-12 by CrashingDutchman Would you care to elaborate @frida? Posted at 2016-01-12 by UliMerkel +1 (optional seems a good way) Posted at 2016-01-13 by @gfwilliams I'm afraid this isn't that high priority for me - however it's probably pretty easy to add if you wanted to. The source is at https://github.com/espruino/EspruinoWebIDE and it's all HTML/JavaScript/CSS - it's probably some kind of issue around here Posted at 2016-01-13 by DrAzzy Option to turn off line wrap and get horizontal scrollbar would be a nice-to-have (though as @tve said, it must be optional - IME, about 60~80% of the time, you want the automatic wrap) - but I think it's a pretty low priority. Personally, I don't much like the right side of the WebIDE in general, so I'm not sure how much my perspective should even be trusted - I use sublime text for anything not trivial because it reminds me how I spelled things as I start to type them, and I find the text more readable, and it's very good about not losing data if closed uncleanly (an issue since upgrading from win10). I normally copy+paste from sublime into the right side to send. I'd love to make a plugin for Sublime that would do "send to Espruino", and I guess we have the command line tools to enable that now - but I don't have the time, nor do I know python anymore. Posted at 2016-01-13 by @gfwilliams Ahh right - sorry, the right hand side. So it's not the bit of CSS I linked to then. Still, it's just CodeMirror so it's even easier to fix The only tricky bit I see is making it take effect without a restart.
There must be a way of saying 'run this executable with these arguments'? Pretty much every text editor has that - then you just point it at the Espruino CLI with the filename as an argument. Posted at 2016-01-13 by CrashingDutchman Without using the setting @gfwilliams referred to I have been able to get it working to my liking, including making it an option in General Settings. Not sure about the quality of my code, so I will not submit my changes. However, most likely tomorrow I will make a version available from my own site so someone can have a look at it. Any objections? Posted at 2016-01-13 by @gfwilliams Great! Not at all - if you make the changes to a fork of EspruinoWebIDE on your GitHub account then it'll be easy to see what changed and keep track of the differences? Posted at 2016-01-13 by @allObjects ...switchable 'wrap/nowrap' would be another option ontop of at what position in line to wrap. Some smart(er) editors do wrapping with context sensitive indenting of the 2nd to last line of the wrapped line. Too long lines is anyway a bad thing for quickly reading and grasping... that's the reason news papers have decent narrow columns to create the least tiring experience. Code though is not linear like a novel, therefore some editors have collapse options for code blocks in order to give a better overview on available (vertical) screen space. Posted at 2016-01-14 by CrashingDutchman My changes are here: https://github.com/jdschuitemaker/EspruinoWebIDE Posted at 2016-01-14 by @gfwilliams Thanks - looks good! Differences here Is there any way to remove the editor-specific stuff from Posted at 2016-01-15 by CrashingDutchman @gfwilliams I moved my changes from editorBlockly.js and code.js to editorJavascript.js. Seem to work... Anyone wants to try? Posted at 2016-01-26 by CrashingDutchman Has anyone tested my changes? @gfwilliams? Is there a chance that my changes make it to the version in the Chrome store? If so, would I need to initiate that? How? Thanks! Posted at 2016-01-27 by @gfwilliams I haven't had time to try them I'm afraid. If you issued a pull request for your changes I could pull them in and out them in the latest version - but please could you:
thanks! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-11 by CrashingDutchman
I have checked the settings and have not found an option to enable a horizontal scroll bar.
Long lines of code wrap to the next line which doesn't help with readability. Could we have a scroll bar at the bottom of the code editor (as the output dialog has)?
Beta Was this translation helpful? Give feedback.
All reactions