Setup more productive dev environment
Tags: vscode, development, git, productivity
Published: 2019-07-02 10:06:38

As developers, we love those quirky tools and nerdy shortcuts. They not only make you look smarter :nerd_face: but also makes us faster :rocket: and productive ✨. 

Here is a list of tools / hacks to make your development environment more productive.

# 1. Lazygit you beauty :heart:

Today Git is everywhere. 
* If you are still using SVN or PVCS, good luck with that. 
* If you are wondering what are them, don't bother about it.

[lazygit](https://github.com/jesseduffield/lazygit) is insanely awesome. It converts the terminal into a UI. 

![](https://thepracticaldev.s3.amazonaws.com/i/8c2dhhboab0v36pj0hhz.png)

* All you have to do is run `lazygit` or `lg` (I hope you know how to create an alias :wink:). 

* Then check the files and (un)stage those that you want with `spacebar`. 

* Finally, commit them with `c`. 

* Enter your commit message and press `enter`. 

So easy right.

If you are using `GitHub` a lot, then you should also checkout [hub](https://hub.github.com).

With the hub, you can do a lot more interesting stuff:

You can clone a repo using 
```bash
hub clone org/repo
```

You can browse issues using 
```bash
hub browse --issues
``` 
> (No more opening browsers and entering URLs)

If you are like me, performing a lot of code review. Downloading PRs will be a huge hassle. But with hub you can checkout pr 
```bash
hub pr checkout <pr_no>
```

If the PR is updated then pull the changes with 
```bash
hub am -3 https://github.com/org/repo/pull/<pr_no>
```

They also have `hub create` command which creates the project under your username in Github all from the terminal. :tada: 

`LazyGit + Hub` will liberate you from few commands and clicks and copy-pasta.

{% twitter 1139670456145973248 %}

# 2. Code Code Code :computer:

Notepad was my first editor (Now, don't judge me). IDEs evolved a lot from those days. But VSCode is an important paradigm shift in the world of IDEs. 

It is slick, modern, customisable and written on JavaScript (well technically TypeScript but that compiles into JavaScript right). 

But customizations on VSCode is next level. You can tweak every little detail that you want to.

{% twitter 1145684867004456960 %}

I love typography and clean design. I constantly fiddle with fonts and I think there is a link between the font and your productivity (research glasses :eyeglasses: on).

I mainly use 
* SF Mono (Apple's font)
* Fira Code Sans - [here](https://github.com/tonsky/FiraCode)
* Menlo (default font for VSCode for Mac)
* Ubuntu - Mainly because I fiddled a lot with Ubuntu in my early days of programming.

The font is just the beginning, for an awesome experience you should have an awesome theme :fireworks:.

Who wouldn't love a well-crafted theme? 

In fact, I get a lot of questions about the theme that I am using after my talks. Invariably, people love good (and minimalistic) design. 

The recent one that I am enjoying a lot is Synthwave'84. Well, it is crazy.

Check out more about how to install and use Synthwave'84 [here](https://marketplace.visualstudio.com/items?itemName=RobbOwen.synthwave-vscode). I am pretty sure you'll love it because it just glows :bulb:.

![](https://thepracticaldev.s3.amazonaws.com/i/zwagrwmom8ocnqzok4qo.png)

But there are other themes that I love too. They are
* [Nightowl](https://marketplace.visualstudio.com/items?itemName=sdras.night-owl) 
* [Cobalt2](https://marketplace.visualstudio.com/items?itemName=wesbos.theme-cobalt2)
* VSCode light theme (default)

Spice your VSCode with Icons. Check out the plugin [here](https://marketplace.visualstudio.com/items?itemName=vscode-icons-team.vscode-icons)

Nowadays, I am fiddling a lot with WebAssembly Text Format (which kinda looks like LISP), the Bracket Pair Colorizer plugin is mandatory for me. Check this out [here](https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer).

It neatly colourizes the matching brackets and makes it easy.

Finally the shortcuts:

One of my favorite shortcut is `cmd + a` + `cmd + k ` + `cmd + 0`. This collapses all the code segment. So you will have a clearer view of what a file does and then you can drill down to specific functions.

![](https://thepracticaldev.s3.amazonaws.com/i/yrir06ok3ysdnxrmy9oo.png)

Split the editor view vertically using `cmd + ctrl + right | left`.

Navigate the files througn `cmd + option + right | left`

For any other action type `cmd + shift + p` to open the actions menu. You can choose anything from this menu.

There are a lot of keyboard shortcuts. Check out the official guide [here](https://code.visualstudio.com/docs/getstarted/keybindings)

# 3. Bash! Bash!! Bash!!!

Who doesn't love bash :white_square_button:? 

If you're using Mac, then it is highly possible that you might be using a way old version of bash. It is time to update, check out how [here](https://itnext.io/upgrading-bash-on-macos-7138bd1066ba). 

I love `zsh` and its theme (who doesn't). 

Personally, I am using a customised version of the Bullet train. 

![](https://thepracticaldev.s3.amazonaws.com/i/6kd9bopzzwvierj2u7wk.jpeg)

Since I play with a lot of different programming languages and its versions. Often I forget what version I am running. 

I tweaked the `bullet-train` a little bit to include the programming languages that I use often based on the directory contents. I know it is not complete or huge but it helps me enormously. Check out patched version [here](https://gist.github.com/sendilkumarn/919f52a3bcb1a856c2bf00465de92ccd).

# 4. Travel tips

Being an introvert and travelling :bus: a lot alone, My laptop is my dearest friend :pray:. Often the flight :airplane: or train :train: ride is where my presentations are done and demos are crafted.

If you are doing it, then this will interest you.

* First make your Mac sleep whenever it can.

`System Preferences > Energy Saver `

![](https://thepracticaldev.s3.amazonaws.com/i/yi6umkknkz1cxozb59w0.png)

* Next if you are using Docker For Mac | Windows shut them off. 

* Don't ever dream to open Slack :laughing:. Use it with caution. 

* Turn off Wi-fi | Bluetooth, if you don't need them.

* Reduce the display brightness.

These little things will help you to increase the duration of your battery life.

> But hey, don't forget to stay hydrated while on the move.

# 5. In General

Watch your actions, if you feel there is a thing that you are doing often and it is mundane and repetitive. Check for a shorter way to do it. If you found an awesome way share it with the community :sparkles:.

At times, you will see people doing some crazy keyboard shortcuts in the demos or your colleagues will do it while working. Just ask them, most of them will be more than happy to share.

> Be passionate and start hacking!

--- 

If you got a cool theme | font | shortcut, then comment it here. It will help anyone lurking over here.

More on productivity:

{% post sendilkumarn/what-the-font-o71 %}

{% post sendilkumarn/level-up-your-browser-skills-8gh %}

{% post sendilkumarn/git-with-hub-makes-it-easy-some-git-101-51jo %}

---

If you have any questions/suggestions/feel that I missed something feel free to add a comment.

You can follow me at [Twitter](https://twitter.com/sendilkumarn).

If you like this article, please leave a like or a comment. :heart: