Welcome 👋 This repository contains configurations (dotfiles, set up scripts, etc) and documentation for setting up a new environment. While it is opinionated, ever-changing & customised, I welcome any feedback & contributions 🙇♂️.
This setup is only for macOS.
Note
While I prefer self-explanatory code and "codifying intent", in this repository the scripts and instructions are intentionally heavily commented to explain intent. I do not think it is worth the additional layer of abstraction in bash to explain what each flag means.
This section contains set up instructions for general purpose development and usage of a Mac machine.
- Set up SSH keys and connect to GitHub
- Purpose: To access and write to repositories in GitHub using SSH (Secure Shell Protocol). Using the SSH protocol, you can connect and authenticate to remote servers and services.
- Resources:
- Clone this repository to your local directory
- Purpose: Cloning to your local directory will make the code in this repository available for you to execute.
- Copy and paste the following code into your terminal. If you get prompted to download XCode Developer Tools, please accept it.
git clone [email protected]:choonkending/dotfiles.git
- Install Homebrew to your machine
- Purpose: Homebrew allows you to install the stuff you need which Apple didn't. It is a pre-requisite for the installation scripts to work.
- Follow the instructions in Homebrew page to install the latest Homebrew.
- Install applications using brew bundle
Note
Please change the JDK version in the Brewfile if required
- Purpose: Install the default (opinionated) applications and tools that have been defined in the Brewfile.
- Navigate to the directory where you cloned the dotfiles and run the following instructions
# Navigate to directory of dotfiles
cd /path/to/dotfiles/
# Run brew bundle
brew bundle
- Set default git configurations (set username, email etc)
./configure_git.sh
- Set aliases for git in your shell
- Open your shell configuration file .zshrc
vim ~/.zshrc
- Copy and paste the following aliases into the .zshrc file
alias ga="git add"
alias gst="git status"
alias glgg="git log --graph"
alias gd="git diff"
alias gdca="git diff --cached"
alias gc="git commit"
alias gco="git checkout"
alias gb="git branch"
- Execute the changes
source ~/.zshrc
- [Optional] - Set the installed applications as your default
- Purpose: Make it easier for your workflow
Prerequisite: You have completed the instructions in #General
- Set
vi
andvim
to open neovim in your shell
- Open your shell configuration file
.zshrc
vim ~/.zshrc
- Copy and paste the following code into the .zshrc file
alias vi="nvim"
alias vim="nvim"
- Execute the changes
source ~/.zshrc
- Configure neovim using the instructions in LazyVim here