1

As a preface I'm using ViEmu although I dont think this affects anything. I would simply like to scroll up in the Text Editor along with moving the cursor to the relative screen position.

As an example, if my text editor displays 100 lines of viewable code (1 - 100) and my cursor is on line 20, when I scroll down to the next viewable 100 lines (101 -200) I would like the cursor to be at 120.

Using the VS command Edit.ScrollDown scrolls the code down as expected but leaving the cursor at line 20 instead of moving it to 120. Is there another command to use or any way to alter this behavior?

Justin Soliz
  • 2,781
  • 3
  • 25
  • 33
  • What happens when you just press the Page Down key on your keyboard? – DGH Jul 20 '12 at 23:27
  • I actually didnt think of that, I'm using bootcamp on a macbook without a dedicated page up/down key. I looked up the command (fn + arrow key) and it's pretty close... it keeps the cursor at the edge of visible code which is tolerable as opposed to leaving it 300 lines away. – Justin Soliz Jul 20 '12 at 23:32
  • do you know the VS command that maps to that? – Justin Soliz Jul 20 '12 at 23:32
  • Glad (fn + arrow) works decently for you. I have no idea what command, if any, that would actually map to. You'd have to dig through the VS help files or look for a options screen that lets you modify the keyboard shortcuts and hotkeys. – DGH Jul 21 '12 at 08:51
  • Use EditPoint.LineDown() instead. – Hans Passant Jul 21 '12 at 13:17

1 Answers1

1

As noted in the question you seem to be wanting to re-map Page Down to another key (due to limited keyboard).

To identify which command a key is mapped to open the keyboard customisation dialogue and type in the current key into the short key text box and then look at what it is currently mapped to.

Unfortunately this doesn't work for page down (control-page down does work, but that doesn't help here).

Entering "page" into the command filter does: Edit.PageDown is mapped to Page Down in the text editor. Map this command to another shortcut.

Richard
  • 106,783
  • 21
  • 203
  • 265
  • Not sure if this is new or not, I just noticed a keyboard option for `ViEmu.KeypressCtrlU` and have sinced mapped `ctrl+u` and `ctrl+d` to these commands. – Justin Soliz Aug 28 '12 at 20:54