5 VSCode Features I Use Daily as a Full Stack Engineer
Tags: productivity, vscode
Published: 2021-06-01 19:50:29

As a software engineer, there are times you'll walk into a codebase that is already established and is some combination of: (a) new to you (b) much larger/more complex than other projects you've worked on and (c) uses a structure and some core libraries that are new to you.  OR you're a mutant genius, in which case no need to read on (but I would like to know more).  

Having the "mind of a programmer" and being able to recognize patterns and connections will help, and so will pair programming and documentation.  But personally, some of my favorite strategies are tools and shortcuts that I've picked up to use VSCode to help me work smarter without always having to do either of those.

![Grease GIF](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r51yoawruos2f82kkirg.gif)<sup>Image credit: [Giphy](https://giphy.com/gifs/grease-movie-john-travolta-zgf1opQOtG05a)</sup>

These five VSCode tools and shortcuts are ones that I use every day (if not every hour):



###5. Search by file content
This is probably cheating, it's not really a hidden feature.  But SEARCH! If that search bar on the left isn't your friend already, you're missing out.  This search bar searches file contents.  Remember the name of a function or variable but not what files it was used in? Looking to see if a function or variable exists elsewhere?  Trying to make sure you removed all your `//TODO` comments and `console.log()` statements before you push?  Yeah, search is my jam.

![Search bar](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bsysyh5li3kvnh5vv2oe.png)

###4. Search by file name
#####Cmd+p search (Windows: Ctrl+p)
Similar to the search on the left, but different in one key way: This search bar searches by file NAME!  I spent way too long not knowing about this second search bar.  

![Search by filename](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l9o0t7kap86afhc79lkz.png)

###3. Search for settings
#####Cmd+shift+p (Windows: Ctrl+shift+p)
This one is just ::chef kiss::.  I can't tell you how frequently I want to do something like toggle word wrap, reload the window, etc.  Instead of remembering the hot keys for all of those settings, you can open up this search bar and quickly find the setting you need.

![settings search](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/im3f71su9pj7fjxeqxam.png)

###2. Go to definition
#####Cmd + click (Windows: ctrl+click)
Use this one on any variable, function, namespace, model... anything that was defined somewhere else.  VSCode will open up wherever it was defined in a new tab for you.  Boom.
![Go to definition](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u0k0m5i78a0g1zmgdtfo.gif)

###1. Go to references
#####Right click, choose "go to references"
Similar to "Go to definition", but I think this one is a level up.  Go to references will show you everywhere in the codebase whatever you're looking at is referenced.  This is great for seeing where a function might be in use before you modify it, for instance. I have learned so much about new codebases by browsing with "Go to references".
![Go to references](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s2el4st9thrp3rszb1nr.gif)


####Additional Resources
Some other tools I use daily:
- [Prettier Code Formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) - Automatically tidies up your formatting.
- [Bracket Pair Colorizer](https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer) - Never miss your closing bracket again. (I'm actually realizing I never loaded this on my work setup 😱, but I use it at home.)
- [Git Lens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens) - I love this one for knowing who's worked on different parts of the code base and when!
- [OhMyZsh](https://ohmyz.sh/) - Makes working in the terminal 10000x less intimidating (and faster!)