diff --git a/README.md b/README.md index 9bacd89..fead6fb 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,39 @@ Look for any of these in the app's docs: ## Getting git and authenticating to GitHub +### Set your preferred editor first + +The setup steps below use `$EDITOR` to open config files. It's a standard +shell variable that points to whichever editor you like. If it isn't set, +running `$EDITOR somefile` fails because the shell tries to execute an empty +string. + +Check whether it's already set: + +```bash +echo $EDITOR # blank = not set +``` + +Set it for the current session, or make it permanent by adding the export +to `~/.bashrc` (bash) or `~/.zshrc` (zsh): + +```bash +# Pick one -- whatever you actually have installed: +export EDITOR=nano +export EDITOR=vim +export EDITOR=micro +export EDITOR="code --wait" # VS Code (the --wait keeps the terminal paused until you close the file) + +# Make it permanent: +echo 'export EDITOR=nano' >> ~/.bashrc && source ~/.bashrc +# or for zsh: +echo 'export EDITOR=nano' >> ~/.zshrc && source ~/.zshrc +``` + +Once set, `$EDITOR somefile` opens that file in your chosen editor every time. + +### Install git + If git isn't installed on the server yet: ```bash