I am in love with my VS Code Setup!
Tags: vscode, productivity, microsoft, development
Published: 2022-02-11 17:03:40

If you are a developer and don't fall in love with your dev environment, then most probably you are missing something & you will not be as productive as you can.

>Attention: I am a Full Stack Developer mostly working with Laravel, Vue.js & Tailwind CSS. I have setup VS Code as per my requirement.

I remember, In mid 2008 during college days, I used to write codes in Notepad. It was hard to write code without any suggestions and formatting any piece of code was not an easy job (Most of my time was spent on matching bracket pairs). At that time I thought, Notepad is the best editor to do this job.

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1644598061502/8YYNFEqke.png)

Then I found Notepad++ with Multi Tab support and Bracket Pair identifier.

One day my friend told me about Sublime Text Editor and then I realised what the **** I was doing till date. The most favourite part of Sublime Editor was Multi Cursor support and its theme. First time I saw the Dark Theme and then never get back to the told Light Theme in my career. I also learn about quickly searching files, extensions and key bindings. Everything is awesome! (I still use to work with Sublime Text Editor whenever I need two separate editors)

I was quite happy with Sublime and it was really helping me to do my job quickly and then one day (Early 2018) I checked [Jeffrey Way](https://twitter.com/jeffrey_way) explaining a course "[Visual Studio Code for PHP Developers](https://laracasts.com/series/visual-studio-code-for-php-developers)" on Laracasts. Do subscribe if you haven't!

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1644598072788/CmcKc1VhR.png)

VS Code for PHP Developers on LaracastsI checked the whole series that night and then moved to VS Code immediately (like always I did). Today I feel that VS Code has completed my dev environment and I can do my job quickly & efficiently. In other words, my productivity has increased multi-fold.

>This time I convinced my friend to use VS Code who suggested me to use Sublime and Today, we both are using VS Code with almost similar setting.

VS Code has almost everything in it a developer may need. With the integration of Terminal & Git, it usually completes the developer requirement.

In May 2020, I found a guy on Twitter talking about his VS Code setup and I quickly subscribed to his email. He sent 7 newsletter and it blown up my mind. He is none other than [Caleb Porzio](https://twitter.com/calebporzio). Caleb has written a complete course with book, videos to make your VS Code experience awesome.

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1644598081825/VY_Dg1R-I.png)

All the credits for my VS Code setup goes to either [Jeffrey Way](https://twitter.com/jeffrey_way) or [Caleb Porzio](https://twitter.com/calebporzio).

The first thing Caleb said in his newsletter was "Less is more". I understand it as:
>Remove everything that can distract your mind.

And I did the same. Believe me, it is one of the thing you will do to setup your Code Editor. Here is the preview of VS Code setup!

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1644598386805/q66nn1wGP.png)

I am serious and not joking! I have removed everything that can distract my mind. And now I have much bigger space to write code.

The second best thing I did is placed the sidebar to the right side (In case I need it). You usually write from left to right, so it feels like typical notebook writing where you don't have any margin or space in the left.

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1644598195316/eHjcvCkZn.png)

Here are details of my VS Code setup:

### Theme:
- [Slime Theme](https://marketplace.visualstudio.com/items?itemName=smlombardi.slime)
- [Operator Mono](https://www.typography.com/fonts/operator/styles/operatormono) Font Size 20

### Key Bindings:
I was much used to Sublime Text key binding, so many of key bindings are imported from Sublime. Here are my top 10 Key Bindings that I use daily countless time:

- Cmd + K, Cmd + B: Toggle Sidebar Visibility
- Cmd + Shift + A: Align Code
- Ctrl + Shift+ Space: Collapse Explored Folder
- Cmd + Alt + P: Open Project Manager
- Cmd + Shift + D: Duplicate line
- Cmd + J: Toggle Terminal
- Ctrl + Shift + E: Open File Explorer
- Shift + ` : Show Setting (Preferences)
- Cmd + C, Cmd + S: Codespace
- Cmd + 2: Split Editor
- Ctrl + Space: Show Suggestions (Bonus)

There are many others key bindings which I use regularly. What I have experienced is that you don't need to remember these key bindings. The more you work with your Dev Environment, more quickly it becomes your habit and suddenly you will notice that your fingers will do the job automatically while you do not care about it.

### Extensions:
Here are my top 10 extensions that I found most useful.

- [Project Manager](https://marketplace.visualstudio.com/items?itemName=alefragnani.project-manager)
- [Better PHPUnit](https://marketplace.visualstudio.com/items?itemName=calebporzio.better-phpunit)
- [CodeSnap](https://marketplace.visualstudio.com/items?itemName=adpyke.codesnap)
- [Change Case](https://marketplace.visualstudio.com/items?itemName=wmaurer.change-case)
- [Auto Rename Tag](https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag)
- [Laravel Artisan](https://marketplace.visualstudio.com/items?itemName=ryannaddy.laravel-artisan)
- [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
- [Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur)
- [PHP Intelephense](https://marketplace.visualstudio.com/items?itemName=bmewburn.vscode-intelephense-client)
- [Tailwind CSS IntelliSense](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)

### Snippets:
Snippets are another great feature of VS Code. Snippets are piece of code you use frequently that you can write or generate using shortcuts. You can generate snippet for any programming language you are working with. VS Code saves these snippets in particular language json file which you can directly edit. You can also create global snippet file that can be used in any language.

Here is an example of Vue Snippet. When I use to type "vuecomp", it suggest to use this snippet and immediately import following code for me:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7tk08zkfrfj9tmqeroax.png) 

### Git:
The shortcut key to get Git Panel in my VS Code is Cmd + Shift+ G. VS Code Git integration offers variety of operations which you usually do with Terminal. You can add file, commit with message, push easily with this panel. You don't need to leave your VS Code for such actions.

Moreover, you can see all available branches, switch to any branch and also view stash from your VS Code.

One of my favourite Git Action is Undo Commit. If you have committed anything by mistake, you can easily undo it with single click.

### Terminal:
VS Code offers inbuilt Terminal. In my setup, I can type Cmd + J and toggle its visibility. It also supports multiple tabs and can perform all the actions which you usually perform in your terminal.

### Debugging:
I am not regular user of PHP Xdebug but tried it with VS Code and it works well with it. Setting up PHP Xdebug can be a separate article, I will definitely plan it in future.

With these setup, whenever I open my VS Code, I immediately fall in love with it. I keep improving my VS Code working experience by searching for new features, extensions.

I hope you like this VS Code setup. Do share yours, let's learn by sharing!