Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you haven't already found it, the place where these keyboard shortcuts are setup is under Tools | Options | Environment | Keyboard. A lot of handy commands can be found just by browsing through the list, although unfortunately I've never found any good reference for describing what each command is intended to do.</p> <p>As for specific commands:</p> <ul> <li><p>I believe the forward/backward navigation commands you're referring to are View.NavigateBackward and View.NavigateForward. If your keyboard isn't cooperating with the VS key bindings, you can remap them to your preferred Eclipse keys. Unfortunately, I don't know of a way to change the algorithm it uses to actually decide where to go.</p></li> <li><p>I don't think there's a built-in command for duplicating a line, but hitting Ctrl+C with no text selected will copy the current line onto the clipboard. Given that, here's a simple macro that duplicates the current line on the next lower line:</p></li> </ul> <pre><code> Sub CopyLineBelow() DTE.ActiveDocument.Selection.Collapse() DTE.ActiveDocument.Selection.Copy() DTE.ActiveDocument.Selection.Paste() End Sub Sub CopyLineAbove() DTE.ActiveDocument.Selection.Collapse() DTE.ActiveDocument.Selection.Copy() DTE.ActiveDocument.Selection.LineUp() DTE.ActiveDocument.Selection.Paste() End Sub </code></pre> <ul> <li>For moving a line of text around, Edit.LineTranspose will move the selected line down. I don't think there's a command for moving a line up, but here's a quick macro that does it:</li> </ul> <pre><code> Sub MoveLineUp() DTE.ActiveDocument.Selection.Collapse() DTE.ActiveDocument.Selection.Cut() DTE.ActiveDocument.Selection.LineUp() DTE.ActiveDocument.Selection.Paste() DTE.ActiveDocument.Selection.LineUp() End Sub </code></pre> <p>If you haven't yet started playing with macros, they are really useful. Tools | Macros | Macros IDE will take you the editor, and once they're defined, you can setup keyboard shortcuts through the same UI I mentioned above. I generated these macros using the incredibly handy Record Temporary Macro command, also under Tools | Macros. This command lets you record a set of keyboard inputs and replay them any number of times, which is good for building advanced edit commands as well as automating repetitive tasks (e.g. code reformatting).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload