Is it possible to add an icon to the toolbar that enables/disables the line wrap feature? I am a new user of Komodo Edit, and this is a useful feature (built into my previous editor) as I often work on projects with long lines. Presumably the toggle would be between “None” and the selected (or default if none selected) feature (e.g., “Word” or “Character”) in the “Smart Editing” menu.
Sure, right click in the toolbox and add a new custom toolbar. Then right click the toolbar and add a new user script that contains:
I successfully added the Toolbar and user script, but it is hidden by default on startup. Is there a way to show the custom toolbar by default?
I suspect if your window is not large enough then the custom toolbar will not be visible. Right click on the titlebar/toolbar and select “Customize”. You should see your custom toolbar is there and visible. You may have to turn off or rearrange other toolbar elements to ensure yours is visible.
My screen is sufficiently large. However, just to be sure, I disabled all other toolbars. Upon restart, the user script is enabled (eye open icon) but my toolbar is shown as disabled (eye closed icon). In case it is helpful, this is Komodo Edit running on Windows 10. Also, this occurs with “Classic Mode” enabled and disabled.
I’m not sure what the matter is then. Do you have any idea @careyh?
My toolbar item never shows up in the toolbar at all. I think we might have a bug on our hands. @Bryan, can you confirm that the toolbar item actually shows up ever?
Yes, it shows up for me if enabled via: View > Toolbars > Customize. It remains visible until the program is closed and re-opened.
Yep, i enabled it and it’s on but it never shows up in the toolbar. What icon are you using? Are you 100% you’re not confusing it with another toolbar item?
We’re working blind from here so if you could provide screenshots that would help us a lot in assisting you.
The icon was selected automatically - I didn’t see an option to pick one. Yes, I am sure that the toolbar/icon is the custom one that I created for the line wrap toggle. When you click it, the line wrap is toggled. Additionally, as shown in the attached screenshot, you can see that the user script name “Toggle Line Wrap” is shown in both the icon dialog (that pops up when the icon is hovered) and the user script name in the Toolbox on the left-side of the screen.
As an aside, the toolbar was added automatically to the “Toolbar - Right.” I didn’t see an option to select which one it was added to and I don’t know how to move it to the “Toolbar - Left.” I’m not sure if this affects the issue.
I don’t know what I was doing last time I tried this but it’s working fine for me as well. Thank you for the screenshot just to confirm your findings @Bryan.
Can you try this in Help > Troubleshooting > Safe Mode and see if the issue persists?
I’m not sure if this is possible to change at the moment. @nathanr.
I don’t think it’s related as now that I’ve tested it properly, it’s working fine for me. The toolbar item persists as visible after restart.
Where it gets added is indeed not configurable atm, this will likely follow in Komodo 11.
@careyh I’m not sure exactly what you would like me to try. However, I went into safe mode and re-added the custom toolbar and user script (the one I added originally did not carry over to safe mode). I restarted Komodo Edit, then went back into safe mode and there was no trace of the new custom toolbar (either in the toolbox or in the customize toolbar window). In the regular (non-safe) mode, the same behavior persists. Except now the original line wrap button that I added does not do anything when clicked.
On a related note, the toolbar with the save icon hides randomly. It can only be re-displayed by hiding and showing it again in the customize toolbar window.
@nathanr I use the custom toolbar function for my favorite userscripts.
In Komodo 9 i can configure the custom toolbars trough View > toolbars:
In komodo 10 the option to configure you’re custom toolbars is missing:
@babobski hit Customize