- AuthorPosts
- November 24, 2010 at 8:59 am #9112derekcohenParticipant
I have F2 set to go to the next bookmark.
Is there a way for this to either start at the top of the document or when it gets to the end of the document start again from the top.
At present it just goes down the document and so doesn’t find bookmarks above the current line
thanks
Derek
November 24, 2010 at 6:49 pm #9113Yutaka EmuraKeymasterHello Derek,
You might want to assign F2 as “Next Bookmark in This Document” command. You can change keyboard assignments from the Keymap on the Help menu.
Thank you,
November 25, 2010 at 5:46 pm #9115CrashNBurnMemberI have F2 set to “Next Bookmark in This Document”, but as the OP indicated, he’d like it to wrap to the beginning when it reaches the end — like the Find option [x] Move to Start/End of Document.
November 25, 2010 at 6:08 pm #9116Yutaka EmuraKeymasterHello CrashNBurn,
I see. Then you will need to write a macro so that EmEditor will go to the beginning of document when it reaches to the end of document.
Thank you!
November 25, 2010 at 6:52 pm #9118CrashNBurnMemberthat, I currently don’t know how to accomplish.
It looks like it would require the plugin value GET_LINE_INFO
to know whether the line has changed since before you pressed “F2”. And I don’t see how the javascript and plugin structure relate to one another.Nor do I see how one can easily assign a shortcut-key to a macro, so that it will automatically run without user-intervention.
Now with Autohotkey, I have an idea how it could be done. Monitor object changed when F2 is pressed. If the object hasn’t changed then goto beginning of document (Ctrl+Home) and unhook the RegisterCallBack for object changed.
November 26, 2010 at 7:12 pm #9123Yutaka EmuraKeymasterI made a macro for you. NextBookmark() method will return false if EmEditor can’t find the next bookmark in the document.
bFound = document.selection.NextBookmark();
if( !bFound ){
document.selection.StartOfDocument(false);
document.selection.NextBookmark();
}
December 7, 2010 at 7:52 am #9144derekcohenParticipantbrilliant! thanks
- AuthorPosts
- You must be logged in to reply to this topic.