Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Code folding?

tkdennis's profile image tkdennis posted 1 month ago in General Permalink

I found the code folding shortcut keys in the preferences, but I haven't been able to make them work on any code. Is there a certain group of keywords or comments it works with? I'm using a MySQL connection, not in word wrap mode.

Thanks!

ansgar's profile image ansgar posted 1 month ago Permalink

Yes, SynEdit has support for code folding, I just did not spend attention to it yet. I'm not sure that's at all valuable for SQL code, is it?

tkdennis's profile image tkdennis posted 1 month ago Permalink

I use it quite a bit to jump around long scripts.

My scripts generally look like this:

line 5  : #region link news and posts
line 56 : #endregion
line 58 : #region link news and pictures
line 102: #endregion
line 103: #region cross-reference posts and pictures
line 137: #endregion

I assign a hotkey to collapse all, then I can click or hotkey GotoLine to jump into the right section. I didn't see a way to jump to a certain line number in HeidiSQL though.

Thank you

Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.
ansgar's profile image ansgar posted 1 month ago Permalink

I have to add some code to activate folding in SynEdit. For example I have to define what starts a folding region, and what ends it. I just overtook your proposal and get this:

Description

Note the horizontal scrollbar in spite of the pressed "Word wrap" button. SynEdit does not support wordwrap when code folding is active.

If you file a feature request I will attempt to add that code to one of the next builds.

tkdennis's profile image tkdennis posted 1 month ago Permalink

That looks great! I opened the feature request 1132: HeidiSQL/HeidiSQL/issues/1132#issue-679585354

Thank you!!

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.