Code editor improvements

Hi, I have some recommended improvements to the code editors…

  • Add ‘Move to trash’ option under bulk actions

  • Remember the list sort order forever E.g. Sort by name

  • Add another ‘Update’ button at the bottom of the editor (For quick access after pasting a long file)

  • Templates - Single click buttons to copy the shortcode or Template tag

  • Templates - Detect dynamic tags with wrong casing E.g <shortcode> instead of <Shortcode>

  • Styles - Don’t return errors for declarations with 4 space indents (4 spaces is standard in many code editors etc.)

Some of these are for people who code in an external editor and copy/paste into L&L, but these are the things I’ve noticed after many hours of editing templates and styles. :slight_smile:

Some solid ideas in there, I’ll pass those along! I’d love to hear a little more about this idea though:

Are you referring to displaying items using the List loop? By default, that just loops through things in the order that the items are written on the list. You could then use the Loop attribute `sort_field=“field” (maybe? I haven’t tested this myself) to reorder that list while you’re looping through it. But if you wanted that list to always be alphabetical instead of in the order it was initially defined, I feel like you’d just change the order of the list when you’re defining it in the first place.

Maybe I’m totally misunderstanding what you’re referring to so if you could clarify what you mean by that one a bit, that’d be helpful in deciding if/how this should be implemented.

Hey @Rips,
You can actually use Ctrl + S to update/save your code instead of going all the way up to click the Update button. I thought this might come in handy for you.

1 Like

Sorry, I wasn’t super clear there. This was just in reference to the list of templates, layouts, styles etc. The default is to sort by most recent saved, but I would prefer they are always sorted by name.

A loop sorting feature that would be useful is to save the user’s sort order preference to a session cookie so that things like product sorting can be maintained as the user explores different categories.

Thanks for the tip. This works for me. :slight_smile:

btw, you can also indent it really quickly with Shift + Tab!

I write all my code in Sublime Text and then copy/paste to the L&L editor. There’s way too much of it to manage inside the L&L editor. Most code editors default to 4 space indents these days.