Top 5 IDE Productivity Hacks That Will Save You Time Programming
Вставка
- Опубліковано 19 чер 2024
- Save time programming
With all the tools available to us in modern IDEs, being a more productive programmer isn't about typing faster. Instead, knowing and taking advantage of powerful IDE features can automate a lot of the mundane and error prone tasks that waste your time, allowing you to get on with the good stuff. In this video we take a look at my top 5 IDE productivity hacks that save you time by letting your IDE do the work for you.
CONTEST CURRENTLY CLOSED! The winners have been contacted!
OFFICIAL CONTEST RULES:
1. All entries must comply with the UA-cam community guidelines ( ua-cam.com/users/tcommunity_gu...) and UA-cam Terms of Service (ua-cam.com/users/static?gl=US&t.... Entries that violate UA-cam guidelines are automatically disqualified.
2. UA-cam is not a sponsor of the contest and viewers are required to release UA-cam from any liability related to the contest.
3. Privacy notice: no personal data will be collected for this contest.
4. In order to enter, you must (a) be one of my subscribers, AND (b) make a top-level comment to the video including #mcoding somewhere in the comment.
5. The contest is free, there is no fee required to enter.
6. Winners will be chosen randomly 1 week after the date the video went live from all users who have entered and not been disqualified.
7. Each winner will be notified via a comment reply from me that details what prize was won (e.g. "Congratulations! You have won XYZ. Please email me."). I will ask the winner to contact me by email, and I will reply through email with a random token which must be posted as another reply to the winning comment from the winning account in order to verify account ownership and prevent fraud.
8. Each winner will have 72 hours to respond AND prove account ownership or their prize is automatically forfeited and another winner will be chosen.
9. A winner can only win 1 prize per contest.
10. The prize pool for this contest is: 2 licenses ("Free 1-Year Personal Subscription") to any of these JetBrains IDEs: AppCode, CLion, DataGrip, DataSpell, GoLand, IntelliJ IDEA Ultimate, PhpStorm, PyCharm, ReSharper, ReSharper C++, Rider, RubyMine, WebStorm, or dotUltimate. A prize consists of 1 license, which will be delivered in the form of a redeemable code that can be redeemed at www.jetbrains.com/store/redeem/ before July 17, 2024.
11. You may not enter the contest if doing so would be a violation of any relevant federal, state, and local laws, rules, and regulations, including U.S. sanctions.
― mCoding with James Murphy (mcoding.io)
SUPPORT ME ⭐
---------------------------------------------------
Sign up on Patreon to get your donor role and early access to videos!
/ mcoding
Feeling generous but don't have a Patreon? Donate via PayPal! (No sign up needed.)
www.paypal.com/donate/?hosted...
Want to donate crypto? Check out the rest of my supported donations on my website!
mcoding.io/donate
Top patrons and donors: Laura M, Jameson, Dragos C, Vahnekie, Neel R, Matt R, Johan A, Casey G, Mark M, Mutual Information, Pi
BE ACTIVE IN MY COMMUNITY 😄
---------------------------------------------------
Discord: / discord
Github: github.com/mCodingLLC/
Reddit: / mcoding
Facebook: / james.mcoding
CHAPTERS
---------------------------------------------------
0:00 Intro
0:23 #5 Show type hierarchy
1:03 #4 Code folding
2:15 #3 Introduce var/const/param/func
5:08 #2 Rename
6:58 #1 Move
8:40 Runner ups - Наука та технологія
ctrl + H: open hierarchy menu
ctrl + alt + V: replace all occurences
ctrl + alt + P: extract and replace all occurences to new var
ctrl + alt + C: extract and replace all occurences to constant
ctrl + alt + M: extract code to function/method
shift + F6: rename everywhere
F6: extract code to new file
Damn tip 3! I've done those maneuvers many times and never knew these shortcuts. One thing to add is, it's important to actually practice these shortcuts. Hearing them isn't enough. You need that muscle memory.
And confidence that you know what it's doing when you do actually need it.
Practice makes perfect!
Blew my mind!
Wow, I almost didn’t click on the video because so many “productivity hacks” are low hanging fruit, low effort videos. This was incredible 👏
MCoding in a league of his own.
Fred Baptiste is also good
When yov've said "how about close IDE and get some sleep" I laughed so hard
#mcoding
It’s kinda forgotten knowledge nowadays 😂
6:57 is the greatest time saver. really.
On VS Code:
Placing cursor on symbol name + F2 renames it
"Refactor" with code block selected opens up the "extract method" action.
"Refactor" with string selected shows the "extract variable" action
"Refactor" with cursor on an outer symbol, opens up the "Move symbol to...." actions
"Cursor" can be either the mouse or the text caret. "Symbol" is any name with syntactic meaning, as in class, global var, method, or function names.
Would've been good for @mCoding to include the VSCode equivalents in the main video since it is such a popular IDE. But I get that he's seemingly sponsored by jetbrains.
Extract variable however does it only for the selected occurrence, not like shown in the video for all following ones as well
@@ich0halt1 right, I think this should be improved.
We can still put a cursor on all of them by using "Select all occurrences of find match" or Ctrl-Shift-L to get the missing part of this functionality.
#mcoding
Alt+Shift+E to run the selected snippet in an iPython interpreter complete with a variable explorer to debug.
oh, that's pretty neat! thanks
Each video just keeps getting better, thanks man
Thanks James, great content with tips and tricks!
Introducing functions changed my life. Thanks #mcoding!
I'm glad you've been posting more often lately #mcoding
Great video. Whatever is your IDE of choice and no matter your experience just open up the keybindings menu and look through every single option. In a week you'll be using IDE without touching the mouse ever again! If you're already doing that it's always good to look through the options once again. Jumping between the files, quickly opening the file you're interested in, code refactoring, running app, running tests, creating new files - you'll get all of that in week and you'll ask yourself why you haven't used it before jumping all over your projects looking like an alien to anyone who looks at you working! Then add you own keybindings, change things here and there and there you are! Also you'll miss them whenever you'll have to type something without them and that can be painful experience.
Just remember people, the standard libraries' documentation varies from good to completely useless, or close to nonexistent. If you are fortunate enough, you might at least be able to read their commit log, which they have neatly left in the source code for multiple decades
5:38 tip: if Shift+F6 is hard to press, instead right click and press R twice, that is what I personally use, it does the same thing (this tip also works for when the shortcuts are hard to press. you rmb and practice using the letters to it) #mcoding
Love this. Keep making videos
Thank you, this is super helpful!
Just used a lot of this features except auto renaming in all of the modules! That is so time saving!
Thanks a lot, #mcoding
Happy to say I knew about most of these (although haven't been using the shortcuts enough!), good to know about code folding though and good inspiration to make these more habitual, thanks! #mcoding
These are great. So much time saved. Shows the power of modern IDES! Thanks #mcoding
Oh man, extracting to a parameter is something I had no idea existed. Love it. #mcoding
Every video is a gift for intermediate and advanced practicioners. Thanks for your nice work. #mcoding
Neat. Some of these are somewhat difficult to accomplish in Vim. Although, I do avoid renaming things by writing an outline for my project before I get started. While this is just my personal opinion, I find that planning often yields better results than just winging it and needing to rename things as I go. One of the features I've been using for years is code folding, and I don't know if PyCharm has a setting for this, but in Vim I can set it to automatically fold everything by default. Then instead of telling it what to fold, I tell it what to unfold. Really helpful for editing older and larger projects. And your quip about sleeping is spot-on. When I first wake up, after pulling keycaps from my forehead, I'm a lot more productive.
great video, thanks james
Finally some motivation to learn how to use all the fancy LSP features in Neovim :D
My favourite hack is the opposite of Tip 3: Inking. When refactoring away complicated code, I might end up in a situation where a function consists of a single statement, or is used only once. So, I might just inline it, and I love how I can choose whether I want to inline all usages or just the specific one
I'm familiar with some of these.. I've used renaming and moving definitions before. But pulling out methods/parameters/constants is new to me and will save me SO MUCH TIME. I will probably get some use out of the shortcut for folding too, if I remember to use it. :). #mcoding
3 was new to me. Very useful. I will use that many times in the future, thanks.
#mcoding
1 move shortcut is very helpful. Thank you for this video!!
#mcoding
Very handy, the move is something I didn't know about that is going to help me at work today! Love the humour too #mcoding
Great video. All great tips, must have saved me hundreds of hours over the years. #mcoding
Two underrated/not widely known (IMO) features/shortcuts:
1. Extend Selection (ctrl+W / opt+up-arrow (macOs)) - this comes in handy when trying to select a section of code. You can place your caret anywhere in the code you want to select and repeat the shortcut as many times as needed to select higher and higher scope until you get everything you wanted. Extra useful when trying to select a section of a code to be extracted to a function.
2. Add Selection for Next Occurrence (alt+J / ctrl+G (macOs)) - quickly creating a bunch of carets exactly where you need them for multi-line editing
Really nice tips! Didn’t know about the hierarchy view. #mcoding
great video #mcoding
one of my most loved pycharm shortcut is ctrl + alt + left_arrow/right_arrow, it moves your cursor to the places your cursor has been, it makes moving between places way faster
Yeah! I combine it with Ctrl+B and then I can use only my keyboard for serf and discover unknown project.
I've already got Professional PyCharm and wouldn't use any other IDE.
Great video again.
I continue to be impressed by the usefulness of these videos #mcoding
Sometimes the amount of features in modern IDEs can be quite overwhelming and some useful stuff gets drowned out by the sheer volume. This is a really nice collection of tips and I hope I will end up integrating at least some of them into my workflow #mcoding
bro... that doctring code folding is amazing
Changed my life!
Watching your video was probably the best time investment ever!! 9ish minutes for hours upon hours of saved time! Thank you #mcoding !
Nice. I use a lot of these but via the command palette (not sure if PyCharm has that)
My personal favorite is finding and opening files. In my code editor the shortcut is Ctrl+P
I know these things exist but man does it help to be reminded of them! #mcoding
ooh I like the relativity project, processing events as either timelike or spacelike. nice reference :)
(btw small nitpick but it's important in relativity, you also have null/lightlike, which is when the interval is 0. It's important because it's what you get with objects travelling at the speed of light)
Great tips! Thanks for sharing #mcoding
I have a physics background and have recently moved to more software-focused projects. So I appreciate the relativity references a lot haha. Time-like and space-like are pretty obscure terms
Btw I put your Logging tips into my code yesterday and it's a revelation!
I can now use some code to send special notifications to Telegram based on a filter and use a new thread so it doesn't block the main code.
Absolutely everything necessary to do this is in your code.
I love #mcoding
Awesome! Glad it's helped you. Also, you win! Contact me via email to claim your license!
Love the shortcuts and pycharm.
#mcoding
Nice. Need a cheatsheet with all the keyboard shortcuts. #mcoding
This is so useful! Thank you. #mcoding
Getting definitions of a class helped me to understand the flow of a large multi level inheritances. #mcoding
Those tips are insane, will implement #mcoding
not sure if I should be happy or sad that there wasn't a new tip 😅
still enjoyed the video 😌
#mcoding
Hi James, do you have any experience with jetbrains MPS (tool/ide for creating domain-specific languages)? I was wondering if it's worth time learning it cause my boss wants me to implement something that resemble dsl :) Anyway, thanks for another great video :)
And I might as well throw that in: #mcoding
Great video. Hopefully more people will start coding in Pycharm.
#mcoding
The doc string folding is amazing. I somehow did not know about it... #mcoding
Great tips. It would be marvelous if you keep the keyboard shortcut visible in the subtitles while showing the trick. Thanks!
#mcoding Great tips! Thanks so much
great shortcuts, thanks #mcoding
'how bout getting some sleep' HAD ME ROLLING
THE CUT WAS PERFECT TOO
😁😁
You forgot about most important one, maybe not saving most time, but helping a ton. Double shift to have "omnisearch" bar - searching through commands, parts of the code etc. Bonus - it gives you hints about keyboard shortcuts for commands
I've learned (or set) keyboard shortcuts for everything in the bar I actually use, so there is no need to use the bar anymore. Good tip for learning, though!
Last tip that moves things to different file could have saved me bunch of hours this week #mcoding
This video is golden
I need some of those so much!! but im not sure if that's a feature in vscode that i'm currently using (probably some extension but im not aware of any right now) #mcoding
#mcoding dude I love your stuff man
amazing as always #mcoding
A good understanding of the type hierarchy and overridden methods is the reason I switched back from VS Code to PyCharm again. Although VS Code's remote development is much better than PyCharm's remote interpreter feature and I guess with time VS Code's AI features will also outweigh PyCharm's lead in code understanding.
Interesting how different the keybindings are between JetBrains and VS Code.
I like F2 to be rename, since it is that way in every file browser.
I will look for the equivalent of splitting to a separate module in VS Code. That's actually really handy!
Oh and #mcoding
#mcoding Awesome stuff as always
Multi-cursor feature saves me a lot of keystrokes, especially useful when you need to change the same few characters in many closely related names
#mcoding
#mcoding this video is very helpful! thank you very much
Thanks, #mcoding!
Would have been helpful if you would have had the shortcuts as text transcript in the video itself
Thanks #mcoding !
I really would like to know the keyboard shortcuts for all of these in VS Code. The only one of those that I've been actively using is renaming, which is very logically mapped to the F2 key.
#mcoding
Thanks, that was great advice #mcoding
Honestly, I have no idea why college courses and the like make us code on paper today. We usually don't want things like Co-pilot autocomplete in an exam, just the basic necessities like refactoring, renaming, and find-replace an IDE provides. #mcoding
#mcoding these were some good tips!
#mcoding "Wow, thanks for sharing these IDE productivity hacks, mcoding! 🚀 They've seriously been a game-changer for me. I've already implemented a few and can already feel the time-saving benefits kicking in. Your explanations were clear and easy to follow, making it super accessible for all levels of programmers. Can't wait to see more content like this from you! Keep up the awesome work! 💻🔥"
Damn this is pretty nice! I wonder what the shortcuts for these are in VSCode... #mcoding
I `Ctrl + B` is useful for larger objects, but for quick check up of simple things I prefer `Ctrl + Shift + i` (Quick Definition) it not jump to definition rather show pop-up
Thank you so much for that 🙏🙏🙏🙏 #mcoding
Would be awesome to see some vids on tools like Pyright or Mypy, can they be integrated into PyCharm or VSCode? #mcoding
This one is kinda scala+intellij specific, but I do love Ctrl+Opt+Shft+= to toggle Show Implicit Hints
and also double tap Shift to access any of the shortcuts by name
#mCoding
#mcoding
Nice! ....would you call 3, 2 and 1 refactoring the code?
Didn't know about extract expression to a variable! #mcoding
I've used IDEs in the past (QtCreator, Eclipse, Android Studio), but for Python I've been using a plain text editor (gedit), although I wrote a few plugins for it to give it a bit of an ide feeling.
But maybe I should actually try a proper ide again. #mcoding
You can peek at a definition line with alt space (macos).
Number 1 will be a game changer for class views in Django
Anyone knows a good neovim plugim for 1 and 3?
Love the docstring! #mcoding
Should've turned on that presentation assistant for shortcut popups on the screen
Good stuff, #mcoding
Great tips! #mcoding
All those cheats are really useful. Thanks #mcoding
has anyone else had issues when refactoring a class variable name in pycharm (self.input_queue maybe) than it sometimes refactors the same name in other classes / gets confused
I think "ctrl + -" is zoom in vscode, unless I don't remember changing it lol. For me it has always been "ctrl+{" to collapse and "ctrl+}" to expand.
Not sure if IdeaVIM counts as an IDE hack for IntelliJ products, but I can't live without it
#mcoding
I'm with you, I require a good Vim plugin for all my IDEs, and it needs to support true modal editing. IdeaVim is one of the better implementations I've used. VSCode's has a nice balance between supporting Vim keys and still allowing IDE shortcuts when they don't conflict.
I'm not sure why every Vim plugin doesn't support a meta chord to put you in "IDE shortcut" mode. Don't make me fall back to the mouse!
Love your videos. #mcoding
Thanks for the video
#mcoding
Please consider using the Presentation Assistant plugin
I have laughed at the jokes in your videos before, but never as hard as the "How about closing my IDE and getting some sleep?--" XD
😁
I would like to see if jetbrains' IDE can do these refactorings with the Nim language. #mcoding
Excellent tips. #mcoding