6 Visual Studio Tips to Increase Your Productivity | Mosh

preview_player
Показать описание

My blog

Facebook

Twitter
Рекомендации по теме
Комментарии
Автор

F2 to rename bookmark. Basically this key works everywhere as Rename command.

DelMadman
Автор

Hello Mosh, thank you very much :)
You can use ctrl+k+n to navigate to next bookmark and ctrl+shift+k+n to navigate to previous bookmark

Use ctrl + m + o to collapse methods and classes

Dotnetawy
Автор

Nice tips! But I think it would be good if you display the shortcut key you are pressing while you're saying it. Thanks.

jabdaomilang
Автор

Man looking at ur first vid feels like something special. Cause now u have changed lives of many people including me keep up the good work and keep changing people's lives.

shldridhackr
Автор

In 2015 Adding bookmark is done by Ctrl+K; Ctrl+K, fast rename is done by switching to bookmarkview with Ctrl+K; Ctrl+W. Last added bookmark always selected (as for me), then F2.
I think TODO comments are more effective. One just types it in the code and that's all.

winstoneshka
Автор

Hello Am Abel Mboa From Kenya.
I really enjoyed your content and you are the reason I even program you made me solve my curiosity in coding after watching your tutorials.

mboaacademy
Автор

Oh it's Mosh!
I did click randomly and did not recognize until I heard the thing about not using the mouse.
I took some of your courses on Udemy. You're in the top instructors there amongst the one I took courses there.

I belong to those people who find it useful to take advantage of shortcuts in software. One of the first things I do is browse the menu and read them.
There are some I cannot seem to find though.
One in particular is the one to look up the commands in the program. It makes a search input pop out ans for instance you could search for "toggle comments", "build solution", you name it. I think I found it some day but I forgot.

There are also some shortcuts to navigate or edit code I love to use.
Ctrl+Shift+L to Delete a line
Ctrl+L to cut VIM style. then you can paste the line
Ctrl+Shift+V to show clipboard history.
Ctrl+D to duplicate a line
Alt+↓ or Alt+↑ to move a line or selected lines up or down.
You name it.

1. Bookmark feature. 00:01
I didn't know that feature but I manage the problem differently.
I take notes. A notebook or on PC most likely Google Docs (because it is online and easy to retrieve from many devices)

2. Code snippets 02:00
I already know most of them. Thank you to complete

3. Format code 06:48
Ctrl+K, F seems to need you to select code.
Ctrl+K, D doesn't → Faster IMHO

I have Power tools installed but it wasn't configured/set by default. I was looking for a way to sort and reorganise usings.
There is a command in the menu but it has no shortcut by default. I tried to assign one and didn't work well.
In Eclipse it was Ctrl+Shift+O and I used it all the time. Now it is even simpler. Thanks.

4. Manage tabs 09:29
Ctrl+tab → Learnt in one of your courses. Pretty cool
Ctrl+(Shift)+F6 Prev/Next tab didn't know

My productivity issue is more like what you say about having millions of tabs opened. And even when I clean them, a few seconds later I'm back to too many tabs. I feel often stressed out because of that.
I think videos (of even a complete course on Udemy) would be interesting should you ask me.

Alt+W, L → My eyes are burning. My heart is pumping. Clean the mess of tabs out of the workspace!
Ctrl+, → Navigate to dialog.
Shift+Alt+Enter → I know but I'd love to find a way that would mimic the Ctrl+Shift+M from Eclipse. Basically what it does is maximize the panel that currently has focus. Code ? Full screen but you can still see the menu (and I like it), Solution explorer? You could maximize that too if it had focus.

One you did not talk about is with power tools you can double-click to detach of attach back an editor tab.

5. Collapse code blocks 13:54
Ctrl+M, M → Toggle outlining expansion

6. ReSharper 14:53 (mistakenly numbered 7 in the video)
The content is outdated. VS has all this now. Taking some of the remarks you did in some courses regarding ReSharper, I see these features are now also included. That said ReSharper still has features I'd love to see in VS such as inline debug watches. I find this very convenient. I also like the inline parameter naming. I believe it will be part of one of the next versions. Who knows: maybe in VS 2021.

Best regards.

uchitesting
Автор

I think it would be great, if you provided a list of all the shortcuts and topics in the description or at the end of the video.

DoubleBob
Автор

Thanks for the precious time saving shortcuts, can't say the same for the length of this video

mehdiSupp
Автор

I'm using VS for more than 10 years and there are some of the tips in this video that are new to me! Thanks, Mosh!

BackerSultan
Автор

Oh my Mosh!!! Snippets... Now I use them every time.

TheBigBossZero
Автор

If you need a bookmark, you are doing it right first //todo: you message, no UI and works in any editor! The second tip was useful, video is worth like, thanks!

rickloyd
Автор

memo:
1. use bookmarks
Ctrl + K, K

2. use code snippets
ctor, prop, cw(Console.WriteLine), try, for, foreach, while...

3. format your code
select code, then Ctrl + K, F
use Productivity Power Tool extention

4. manage tabs with keyboard
ctrl + tab/ctrl + shift + tab, ctrl + F4(close tab)
ctrl +, search for anything
shift + alt + enter(full screen)

5. collapse code blocks
ctrl + M, M

6. use ReSharper

lixin
Автор

Hi Mosh the best one, small tipp to reformat the code in such a nice way is go to the end of the script with a shortcut then delete the } and rewrite it again .

انامسلموكفى
Автор

Mosh, to rename to bookmark using keboard, just simple select the bookmark and press F2. Thanks for your videos, they are great!!!

lemiud
Автор

Tip 3 can be done with the following Tip: Just go to end of file and follow these steps:
1 - Remove }
2 - Write }
It will automatically indent the code properly. You can use this technique even at class level, function level and at any level which is using :)

asadnaeem
Автор

Visual Studio Productive Tips
Duplicate line: CTRL +D
Delete line: CTRL + SHIFT + L
Selecting all instances of word: ALT + SHIFT + .(period) and then pressing .(period) repeatedly
Vertical Selection: Hold down Alt Key and making the selection with either the mouse or keyboard.
To create multiple cursors in arbitrary locations: CTRL + Alt + Click
Cut Entire Line: CTRL + X
Comment: CTRL + [K, C]
Un-Comment: CTRL + [K, U]
Add Line Above: CTRL + Enter
Below: CTRL + SHIFT + Enter
Rename (Anything): CTRL + [R, R]
Go To Definition: F12
Find All References: SHIFT + F12
Refactor to Method: CTRL + [R, M]
Move Code Up: ALT + UpArrow
Down: / ALT + DownArrow
Format Document: CTRL + [K, D]
Surround with Snippet: CTRL + [K, S]
Collapse Class to Definitions: CTRL + [M, M] for collapsing one method and CTRL + [M, O] for all methods
Organize Using Statements: CTRL + [R, G]
Quick Fix (Add Methods, implement interface, etc): CTRL + . (period)
Solution Explorer: CTRL + ALT + L
Search to class or file: CTRL + ;
Unity Project Explorer: SHIFT + ALT + E
Creating Code Snippets:
Creating Constructor: type ctor and then hit the tab
Creating Properties: type prop and then hit the tab
Creating Properties with full set and get snippets: type propfull and then hit the tab
Creating try catch block: type try and then hit the tab
Creating try finally block: type tryf and then hit the tab
Switching between tabs: CTRL + tab
Switch to next Tab: CTRL + F6
Switch to previous tab: CTRL + Shift + F6
Closing tab: CTRL + F4
Closing all tabs: ALT + [W, L] ;
Opening file without using solution explorer: CTRL +, (comma)

imtiyaz
Автор

Sir, this was your first course and I love it.♥

bibekkhatri
Автор

another way I have been using to format files: CTRL + K, D

callsigntengu
Автор

Hi Mosh,
thanks for this kind of good video.
To edit bookmark without using mouse.
You need to select bookmark from bookmark list(CRTL+UU) using arrow keys and press Key F2 to edit.
after change press key Enter.
that it...

thanks

navneetworld