This documentation is archived and is not being maintained.

Emacs Specific Shortcut Keys, Emacs Scheme

Visual Studio 2008

The following shortcut key combinations mimic commands available in Emacs and are used while editing code in the integrated development environment (IDE).

Cut and copy commands work differently in Visual Studio than they do in Emacs.

To use the Emacs cut and copy behavior

  1. On the Tools menu, click Options.

  2. Expand Text Editor and then click All Languages.

  3. Under Settings, unselect Apply Cut and Copy commands to blank lines when there is no selection.

  4. Click OK.

Command

Keys

Description

Edit.EmacsExtendedCommand

ALT + X

Places the cursor in the Find/Command box on the Standard toolbar.

Edit.EmacsFindReplace

SHIFT + ALT + 5

Displays the replace options in the Quick tab of the Find and Replace dialog box.

Edit.EmacsPasteRotate

ALT + Y

Pastes an item from the Clipboard Ring tab of the Toolbox to the file and automatically selects the pasted item. Press ALT + Y again to paste the next item to the Clipboard Ring.

Edit.EmacsQuit

CTRL + G

Stops the current command or code and deactivates the region.

Edit.EmacsUniversalArgument

CTRL + U

Prompts for an integer, returns negative if the first character entered is a hyphen. When a non-digit character is entered, the prefix for the command is set to the entered integer. If no integer is entered, the default value is 4. Repeatedly invoking the command multiplies the current value entered by the previous accumulated value.

Command

Keys

Description

Edit.EmacsBreakLine

ENTER

Inserts a new line.

Edit.EmacsBreakLineIndent

CTRL + J

Inserts a new line and indents it.

Edit.EmacsCharTranspose

CTRL + T

Transposes the characters on either side of the cursor. For example, Ed|n Sub would be changed to read End| Sub.

Edit.EmacsDeleteSelection

CTRL + DELETE

Deletes the current selection.

Edit.EmacsDeleteToEOL

CTRL + K

Deletes from the cursor to the end of the current line.

Edit.EmacsLineOpen

CTRL + O

Inserts a new line after the cursor. The cursor stays in the current line.

Edit.EmacsQuotedInsert

CTRL + Q

Reads another key and inserts the key into the buffer. Keys must be 8-bit ASCII characters. Use this command to insert control characters, meta characters, or graphics characters into the buffer.

Edit.EmacsWordCapitalize

ALT + C

Capitalizes the character to the right of the cusor or the first character of the next word if the cursor is between words.

Edit.EmacsWordDeleteToEnd

ALT + D

Deletes the characters to the right of the cursor to the end of the word.

Edit.EmacsWordDeleteToStart

ALT + BACKSPACE

—or—

ALT + DELETE

Deletes the characters from the left of the cursor to the start of the word.

Edit.EmacsWordLowercase

ALT + L

Changes the selected text to lowercase characters.

Edit.EmacsWordTranspose

ALT + T

Transposes the words on either side of the cursor. For example, |End Sub would be changed to read Sub End|.

Edit.EmacsWordUppercase

ALT + U

Changes the selected text to uppercase characters.

Command

Keys

Description

Edit.EmacsCharLeft

CTRL + B

Moves the cursor one character to the left.

Edit.EmacsCharRight

CTRL + F

Moves the cursor one character to the right.

Edit.EmacsDocumentEnd

END

—or—

SHIFT + ALT + . (period)

—or—

SHIFT + END

—or—

CTRL + X, ]

Moves the cursor to the bottom of the current document.

Edit.EmacsDocumentStart

HOME

—or—

SHIFT + ALT + , (comma)

—or—

SHIFT + HOME

—or—

CTRL + X, [

Moves the cursor to the top of the current document.

Edit.EmacsGoToLine

ALT + G

Displays the Go To Line dialog box, which allows you to navigate to a specific line of code in the current document.

Edit.EmacsLineDown

CTRL + N

Moves the cursor down one line.

Edit.EmacsLineEnd

CTRL + E

Moves the cursor to the end of the current line. If you use word wrap, the cursor moves to the physical, not the displayed, end of the current line.

Edit.EmacsLineStart

CTRL + A

Moves the cursor to the beginning of the current line. If you use word wrap, the cursor moves to the physical, not the displayed, beginning of the current line.

Edit.EmacsLineUp

CTRL + P

Moves the cursor up one line.

Edit.EmacsPopMark

CTRL + X, CTRL + SPACEBAR

—or—

CTRL + X, CTRL + SHIFT + 2

Moves the cursor to the current mark and then removes the mark for the location stack.

Edit.EmacsScrollLineCenter

CTRL + L

Scrolls the document so that the current line is now in the center of the viewable area in the editor.

Edit.EmacsScrollLineTop

SHIFT + ALT + 1

Scrolls the document so that the current line appears at the top of the viewable area in the editor.

Edit.EmacsScrollPageDown

CTRL + V

Scrolls down within the document.

Edit.EmacsScrollPageUp

ALT + V

Scrolls up within the document.

Edit.EmacsSetMark

CTRL + SHIFT + 2

—or—

CTRL + SPACEBAR

Adds a mark to the location stack for the current cursor.

Edit.EmacsSwapPointAndMark

CTRL + X, CTRL + X

Moves the cursor to the current mark in the location stack and moves the current mark to the location where the cursor mark was when the command was invoked.

Edit.EmacsWordNext

CTRL + RIGHT ARROW

—or—

ALT + F

—or—

ALT + RIGHT ARROW

Moves the cursor to the first character in the next word.

Edit.EmacsWordPrevious

CTRL + LEFT ARROW

—or—

ALT + B

—or—

ALT + LEFT ARROW

Moves the cursor to the first character in the previous word.

Command

Keys

Description

Edit.EmacsFileSaveDirty

CTRL + X, S

Displays a list of modified files and allows you to select which files to save.

Command

Keys

Description

Edit.EmacsCloseOtherWindow

CTRL + X, 1

When a window is split, this shortcut closes the pane that does not have focus.

Edit.EmacsOtherWindow

CTRL + X, O

Switches focus between panes when a window is split.

Edit.EmacsSplitVertical

CTRL + X, 2

Splits the current document in half vertically. The current line of code is centered in each window.

Show: