One of the new features of the Roslyn based code editor is Quick Actions. Let's see how you can use Ctlr+Enter, Enter combination instead of Ctrl+., Enter :)
@ 11-13-2014
by Tugberk Ugurlu


Visual Studio 2015 preview went public yesterday and we can enjoy the new Roslyn based code editor for C# and Visual Basic :) You can learn more about these new cool things about the code editor on Visual Studio blog.

One of the new features is something ReSharper user are very familiar with: quick actions. Sometimes inside the editor, you will see a yellow lamp popping up:

Screenshot 2014-11-13 22.14.49

This indicates that there are possible actions that you can take on this piece of code. You can bring up these actions by hitting "Ctrl+."

Screenshot 2014-11-13 22.15.54

Later, you can chose the action from the list and apply it by hitting ENTER. For very obvious stuff like the above removing unused using sample, you want to apply the action instantly. If you are using ReSharper before, I’m 99.9% sure that you will find yourself hitting "Ctrl+., ." :) as it’s easier than moving your finger from "." key to "Enter" key :) Luckily, we can come with a better keyboard shortcut for this which is "Ctrl+Enter, Enter" :)

Inside Visual Studio, go to Tools > Options:

Screenshot 2014-11-13 22.26.16

Search for keyboard and you will see the "Keyboard" section under "Environment" pane:

image

Search for "lineopenabove" command there which actually uses "Ctrl+ Enter" shortcut. Remove that by hitting "Remove" button:

image

Now, search for "quickaction" and apply the "Ctrl + Enter" shortcut as shown below:

vs-quickaction

Hoping that this will be the default at some day :) Happy "Ctrl+Enter, Enter"ing :)




Hi πŸ™‹πŸ»β€β™‚οΈ I'm Tugberk Ugurlu.
Coder πŸ‘¨πŸ»β€πŸ’», Speaker πŸ—£, Author πŸ“š, Microsoft MVP πŸ•Έ, Blogger πŸ’», Software Engineering at Deliveroo πŸ•πŸœπŸŒ―, F1 fan πŸŽπŸš€, Loves travelling πŸ›«πŸ›¬
Lives in Cambridge, UK 🏑