4. Key Bindings
• Do common things more quickly
• See them in menus and global search
• Find them and rebind them in Preferences
• Preferencesè Generalè Key Bindings
• Access many hidden commands!
5. Editor Behavior
• Preferencesè Text Editor
• Enable code folding, auto-formatter
• Enable markers and visual guides
• Change word breaking mode
• Even vi emulation!
6. Build Behavior
• Preferences è Projects è Build
• Jump to errors, warnings, or neither
• Message bubbles or error pad
• Save files before build, ask or ignore
• Whether to build before running
7. Policies
• Solution-specific style settings: formatting, naming
conventions, file header, etc.
• Edit in Solution Options
• User Preferences only apply to new solutions
• Manage policies in Custom Policies dialog
11. Global Search
• Activate with ⌘. on Mac, Ctrl-, on Windows
• Navigate to files, types, members, commands
• Smart camelCase search
• Type filter prefixes – file:, class:, command:
• Location suffix – :line,column
12. Find and Replace
• Inline search– click magnifying glass for options
• Find in Files – search/replace in project/solution
Cmd-Shift-F (Mac), Ctrl-Shift-F (Windows)
• Pin search output pads to keep results –
next search will use new pad
13. Navigation
• Go To Declaration – go directly to type, local, member
Cmd-D (Mac), F12 (Windows)
• Find References – find all places anything is used
Cmd-Shift-R (Mac), Shift-F12 (Windows)
• Navigate back to where you were
Ctrl-Cmd-Left (Mac), Ctrl-Alt-Left (Windows)
17. Code Completion
• Use camelCase to search
• Import type, add the using automatically:
Ctrl-Alt-Space
• Toggle suggestion mode, explicit commit:
Ctrl-Shift-Space
18. Hidden Editor Commands
• Expand selection: Alt-Shift-Up
• Move line up/down: Alt-Up/Down
• Block selection – edit many columns at once
Alt (Mac), Ctrl (Windows) and mouse drag
19. Context Actions
• Contextual code transformations
• Over 70 available, see Preferences è
Source Code è C# è Context Actions
• Access via context menu è Refactor
• From keyboard, Alt-Enter
20. Source Analysis
• Analyses source code on the fly
• Warns of potential errors and style violations
• Offers automatic fixes as context actions
• Hints when context actions available
• Customizable severity of rules
• Preferences è Text Editor è Source Analysis
Experimental
24. Debugger Options
• Preferences è Projects è Debugger
• Enable stepping into framework code
• Speed up debugging by disabling automatic
ToString() and property evaluation
25. Advanced Breakpoints
• Tracepoints – print expression and resume
• Conditional breakpoints – automatically resume
unless expression evaluates to true
• Run è New [Function] Breakpoint…
• Context menu è Breakpoint Properties
26. Watches
• Watch any expression, not just variables
• Turn hover inspection into pinned watch on
editor surface by clicking pin icon
• Watches/locals turn blue when value changes
30. Creating Add-ins
• Whole IDE built on add-in model, extremely extensible
• Commands, templates, build, syntax schemes, context
actions, pads, editors, analysis rules, project types…
• Most of the IDE is open-source (MonoDevelop)
• Publish at http://addins.monodevelop.com, install from
Add-in Manager
36. Navigation Commands
Command Mac Windows
Go to Definition Cmd-D F12
Find References Cmd-Shift-R Shift-F12
Navigate Forward/Back Ctrl-Cmd-Left/Right Ctrl-Alt-Left/Right
Next/Previous Result Cmd-Opt-Up/Down F4 / Shift-F4
Find in Files Cmd-Shift-F Ctrl-Shift-F
Find Cmd-F Ctrl-F
Next/Previous Usage Cmd-Shift-Up/Down Ctrl-Shift-Up/Down
37. Hidden Editor Commands
Command Mac Windows
Expand selection Alt-Shift-Up
Insert line below Shift-Enter
Dynamic abbrev Ctrl-/ Alt-/
Delete to end of line Ctrl-K
Move line up/down Alt-Up/Down
Subword motion Ctrl-Left/Right Alt-Left/Right
Block selection Alt-Mouse-Drag Ctrl-Mouse-Drag
38. Debugger Commands
Command Mac Windows
Start/Resume Cmd-Enter F5
Pause Cmd-Opt-P Ctrl-Break
Toggle Breakpoint Cmd- F9
Step Over Cmd-Shift-O F10
Step Into Cmd-Shift-I F11
Step Out Cmd-Shift-U Shift-F11
40. Code Generation Window
• Contextual generation of members/statements
• Depends on context
• Edit è Show Code Generation Window
• Alt-Insert on Windows
41. Catchpoints
• Pause at the point an exception is thrown, even
if it’s handled
• Run è Exceptions, add exception types to the list
• Breaks on all subtypes
42. Code Templates
• Code snippets with smart linked regions
• Edit è Insert Template/Surround With...
• Or type short name, Tab twice
• Create and edit in Preferences è
Text Editor è Code Templates
43. Inspect Threads and Stack Frames
• Double-click thread in threads pad to show stack
• Double-click stack frame to show location
• External code frames show in italic
• Editor highlights current stack frame in yellow
and other frames in green