Bookmarks-TOC
Posted: 18 May 2018, 08:20
An idea for a feature most editors lack: permanent/portable bookmarks.
Basically it's nothing else but a search for all comment-lines that look like this:
A sidebar (or floating window) displays all these lines (search results) but without the word "NOTE". You only get to see YourBookmarkText.
It yields a kind of outline or table-of-contents, and allows easy jumping to these lines, hence the term bookmark, but with an emphasis on "permanent" because these bookmarks (;NOTE comments) are contained in the file itself. Even years later you immediately see the whole structure of your ahk-file in the sidebar at one glance.
I find it very useful for inserting "chapter headings" into my code, then seeing the whole enchilada outlined in the sidebar, very much like the TOC-sidebar in a word processor or novel-writing software.
Some editors like RJTextEdit even offer hierarchical sub-headings, others like SynWrite only support one level. In any case, it's a nice feature to have, imo.
Basically it's nothing else but a search for all comment-lines that look like this:
Code: Select all
;NOTE: YourBookmarkText
It yields a kind of outline or table-of-contents, and allows easy jumping to these lines, hence the term bookmark, but with an emphasis on "permanent" because these bookmarks (;NOTE comments) are contained in the file itself. Even years later you immediately see the whole structure of your ahk-file in the sidebar at one glance.
I find it very useful for inserting "chapter headings" into my code, then seeing the whole enchilada outlined in the sidebar, very much like the TOC-sidebar in a word processor or novel-writing software.
Some editors like RJTextEdit even offer hierarchical sub-headings, others like SynWrite only support one level. In any case, it's a nice feature to have, imo.