massung
2021-7-30 15:23:07

Is there any way to make DrRacket line-wrap when in Scribble mode?


spdegabrielle
2021-7-30 15:31:12

this works for me?


massung
2021-7-30 15:31:55

Yeah, but that does it for all file types. I prefer not to word-wrap source code or have to toggle on/off all the time.


spdegabrielle
2021-7-30 15:31:56

I don’t get scribble specific wrapping in drracket?


massung
2021-7-30 15:32:17

Although, I guess to racket, it’s all “source code” :slightly_smiling_face:


spdegabrielle
2021-7-30 15:32:35

its a good idea.


spdegabrielle
2021-7-30 15:32:46

I see why you would want to do it


spdegabrielle
2021-7-30 15:34:28

I believe the code is in framework. but would you want there to be a settings panel where you specify what code types get wrapped and what don’t?


massung
2021-7-30 15:35:48

I think ideally the editor would change the “word wrap” option to something like “word wrap for these langs…” and allow the user to edit a list, and one option would be “all”?


spdegabrielle
2021-7-30 15:37:57

Would it be hacky to have a directive in a comment at the end of the lang line?


massung
2021-7-30 15:38:49

not only hacky, but bad (IMO). it would mean I couldn’t look at someone else’s source code and use my settings w/o modifying the source


spdegabrielle
2021-7-30 15:43:17

ah yes, that gets rapidly complex, I was thinking of an ‘Edit time phase’ https://dl.acm.org/doi/10.1145/3428290


spdegabrielle
2021-7-30 15:46:56

would it be word wrap these #lang’s , or word wrap these file types(extensions)? All the parts are there in Dr Racket and framework to build it yourself, but it doesn’t exist currently.


spdegabrielle
2021-7-30 15:47:57

I wonder if DrRacket’s Quickscript could be used to provide a keybinding to toggle wrapping mode?


laurent.orseau
2021-7-30 16:01:31

Quite likely. It should also be feasible to have a direct keybinding. You just need to find what is triggered, and hopefully it’s just a method call


spdegabrielle
2021-7-30 16:02:03

@massung that was quick!


massung
2021-7-30 16:05:14

I haven’t tried any quickscripts in racket yet


spdegabrielle
2021-7-30 16:29:44

let us know if you need a hand


spdegabrielle
2021-7-30 16:29:59

:grin: