Skip Navigation

[Resolved] Code Formatting Options in Editors

This support ticket is created 6 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 4 replies, has 3 voices.

Last updated by Beda 6 years, 9 months ago.

Assisted by: Beda.

Author
Posts
#550133

Hello,

Can we get better code formatting controls for the various editors throughout Toolset? I've found that when working on a complex view etc that the code can get sloppy looking in the editor and at times is hard to follow.

1) Indent Character Type - Right now Toolset editors appear to use 2 spaces for indents. Like many devs though, I much prefer using tabs. Can we get an option to select which character type the editors use for indents?

2) Indent Character Width - Can we get the ability to set the width of whatever indent character we chose in the option above? For example, I want to use tabs for indenting and I want each tab to be the width of 4 characters.

3) Number of Indent Characters - When indenting code, how many of the above indent characters should be used. For example, right now Toolset appears to use 2 spaces, whereas a user may want to use just a single space or tab.

4) Turn Off Line Wrapping - Can we get an option to turn off/on line wrapping? Line wrapping often makes the code harder to follow so it would be nice if we could turn it off/on when needed. This option should probably be accessible from the editor as it would be changed more frequently than the other options above.

5) Resize Code Editor - Can we get the ability to resize the code editor? I know there is an option to have the code editor grow as code is added, but this eventually makes the code editor too tall. Can we get the same functionality as TEXTAREA fields in browsers, where we can drag a corner of the editor to resize it? Can we also get an option that expands the editor full-screen, but with the buttons and controls still visible!

6) Font Size - Can we get the ability to set the font size used in the code editors?

There's probably more, but even the above changes would make coding in Toolset much more enjoyable.

Thanks!

#550155

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Peter,

Thank you for contacting our support forum.

I have marked this ticket as a feature request and assigned it to the appropriate supporter to handle this ticket.

Thanks,
Shane

#550254

I will consider the resize options.

The other requests we will most likely not implement, unless we get a lot of requests of this kind.

I have forwarded it to the developers.

Thank you.

#550505

Indent character type and turning line-wrapping on and off are absolute basics of any code editor. These don't seem like huge changes and yet they improve the coding experience greatly. I hope you reconsider.

#550633

The thing is, Toolset is not a code editor Plugin.

We just use Codemirror for the editors, but we do not provide a Code Editor Plugin that is focused on this task.

Hence I do not think this will be implemented with a lot of options and settings but rather kept as is.

I will update here as soon I know a bit more.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.