- January 9, 2018 at 5:46 pm #22762
sometimes it would be very handy to not have the cursor moved up and down when pressing the up/down keys but have the window scrolled up and down and keep the cursor position instead. that way the biggest possible amount of the document around the cursor is shown at all times. i guess this only applies to the up/down and not the left/right movements…is there such a feature already somewhere hidden in the settings and i just don’t find it? thanks in advance!January 10, 2018 at 12:12 am #22763
Emeditor’s default shortcut for this is ctrl + ↑ and ctrl + ↓
Speaking of which:
Back in the old days the scroll lock key would do this, but these days that functionality seems to be almost extinct.January 10, 2018 at 12:19 am #22764
Perhaps I first misunderstood you. If you want both the cursor and the window to move you’ll have to activate the “Move Cursor by Scrolling check box” option – I’ll get back to you with a macro to do this.January 10, 2018 at 2:06 am #22765
thanks so much for the answer! i rather meant, that the cursor should always stay vertically in the middle of the window (if the content is larger than the window). And instead of having the cursor moved up and down, only the window should scroll…ctrl+↑ and ctrl↓ also moves the cursor up and down…January 10, 2018 at 5:19 am #22766
Use the following code for toggling:
// Toggle the scrolling behaviour // !!! Important: It seems that assigning to cfg is required! !!! // !!! Simply executing document.Config.Save(); seems to have no effect !!! cfg = document.Config; cfg.Scroll.MoveCursorScroll = !(cfg.Scroll.MoveCursorScroll); cfg.Save(); // Add a message to the status bar if (cfg.Scroll.MoveCursorScroll) status = "Fixed cursor scrolling is on"; else status = "Fixed cursor scrolling is off";
Copy paste to a text file, and save as
Add this to “MyMacros” under Macros → Customise → Add (under MyMacros)
You can now assign a shortcut to that Macro (under Tools → Properties for All Configurations → Keyboard → Category: My Macros + Commands: YourMacroNameOfChoice
When toggling, the status of the setting is shown on the bottom left status bar.January 12, 2018 at 12:01 am #22773
Hey Patrick, sorry to answer so late. Thank you sooooo much for your help. It works just wonderfully. Great help! This makes it a lot easier…I first misunderstood your first answer, the checkbox did the trick, but I didn’t find it since I use a localized version of emeditor…now the macro is even a lot more comfortable. Thank you so much again, I really appreciate it!January 12, 2018 at 12:06 am #22774
You’re welcome. Glad I could help.
You must be logged in to reply to this topic.