# FAC23 Presentation Resource
## Boost Your Productivity :rocket:
By Hannah Gooding
## Contact Me
- Email: hannah.gooding@yahoo.com
- Twitter: @hannahwsgooding
- LinkedIn: /hannahwsgooding
---
## Pimp My Terminal
- ZSH terminal shell (aka Z shell) runs on Unix-like operating system: macOS, Linux, BSD, Windows: WSL2 is preferred
- You can download [Oh My Zsh](https://ohmyz.sh/), an opensource framework for terminal configuration
- Make sure you have the your terminal configured to launch from the VS Code command line, instructions here: https://code.visualstudio.com/docs/setup/mac
- You can customise your terminal by running the `code ~/.zshrc` to open the `.zshrc` file in your system's root folder in VS Code
- This file contains a script that is run whenever you start up a zsh shell, so you can put your customisations in here
- If you're on MacOS Catalina or above (I was using a machine with Big Sur in the presentation demo), you may get the error `zsh: permission denied:` - you will need to configure permissions to open the file with `chmod +x ~/.zshrc`
- You can customise the look of your CLI with themes, I use [agnoster](https://github.com/ohmyzsh/ohmyzsh/wiki/Themes#agnoster) which shows the git branch you're on
- You can use plugins, it ships with the [git plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git) which gives you cool shortcuts for git commands
:bulb: Terminal tip: `CTRL + R` let's you search through your command history, so you don't have to keep pressing the up arrow key until you find the right one!
---
## Useful VS Code extensions
### Bracket Pair Colorizer
- Colorize matching brackets so you can scope functions at a glance
### Relative File path
- Shortcut for getting the relative filepath of another file from your current file
- Windows `Ctrl+Shift+H`
- Mac `Cmd+Shift+H`
### GitLens
- Shows commit history for each line in your files
- It shows Git history information on the extension dashboard, it's [Git supercharged](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens)!
### Source Control Tab (in-built you do not need to download)
- You can stage your files and write commit messages in VS Code rather than using the terminal
- It tells you the character count if you go over the "recommended" amount in a line
- If you are using the Live Share extension, your collaborators co-authoring credentials appear (they have to be signed in with their GitHub account)
## Prettier
- Formats your code!
- You can download it as an extension on VS Code, and it will run your settings that you configure in the application
- To format the current file, right click and select `Format Document`
- To turn on automatic formatting go to Settings and search for `format on save`
- It's a good idea to have a `.prettierrc` config file in the root folder of your projects where you specify how many spaces you want for intentation, single or double quotes, etc.
- The config file overrides your local VS Code Prettier settings so everyone on the team will have the same formatting rules applied to their code - avoiding nasty conflicts!
---
## Resources
### Articles
I published two articles on Dev.to which cover the content from the presentation:
1. [How I customise my Terminal with Oh My Zsh (macOS)](https://dev.to/hannahgooding/how-i-customise-my-terminal-with-oh-my-zsh-macos-427i)
2. [VS Code shortcuts and tricks that I wish I knew sooner](https://dev.to/hannahgooding/vs-code-shortcuts-and-tricks-that-i-wish-i-knew-sooner-3mcj)
### Oh My Zsh
[Oh My Zsh Docs](https://github.com/ohmyzsh/ohmyzsh)
[Git Shortcut Cheat Sheet](https://kapeli.com/cheat_sheets/Oh-My-Zsh_Git.docset/Contents/Resources/Documents/index)
### Prettier
[Prettier Config Generator](https://michelelarson.com/prettier-config/)