This gist contains my development environment settings. The idea is that I should be able to reproduce my development environment from scratch.
-
-
Save ResidentMario/0895eed3f82a151c7e4d98a8b85f75af to your computer and use it in GitHub Desktop.
-
Download and install iTerm2.
-
Download and install Oh My Zsh: http://ohmyz.sh/.
-
Install Powerline fonts: https://github.com/powerline/fonts.
-
Download and unzip the theme pack: https://github.com/mbadolato/iTerm2-Color-Schemes/zipball/master.
-
In the iTerm2 settings go to
Preferences > Profile > Colors > Color Presets > Import
, and select the correct theme from the theme pack. It will be in theschemes
folder. -
Remove the machine name from the prompt by running
cd ~/.oh-my-zsh/themes/; sed -i -e 's/@%m//g' agnoster.zsh-theme
.The machine name seems to be derived from the machine name set by the kernel, but modifying this in settings did not get rid of the overlong
Alex-MacBook
prompt. This does.Note that this counts as an edit to a git-tracked repository, causing it to diverge from the cloned master. This may or may not cause problems should you ever want to upgrade
oh-my-zsh
. If it does, just remove the changes and rerun the command after updating. -
Set theme to
"agnoster"
in the Oh My Zsh config. -
Set "font" in iTerm to
Hack
. -
Copy the rest of the config (e.g.
conda
configuration) to~/.zshrc
. -
Append
conda deactivate
to~/.zshrc
to get rid of that(base)
initialization. -
Set window size to
120x36
in the iTerm settings. -
Set my plugins in Oh My Zsh:
plugins=(git pip brew docker kubectl npm pylint python web-search)
. -
Install
htop
:brew install htop
. -
Install the GitHub CLI tool:
brew install github/gh/gh
. -
Turn off the
less
pager forgit
(go back to dumbcat
output):git config --global pager.branch false
. -
The
zsh
shell font will not work in VS Code fully correctly for reasons. To fix this, install the Menlo for Powerline font, and switch to that inFont Settings
. Instructions for Linux here; only difference on macOS is that it's easiest to open the font (double click) and install it using theFont Book
app. -
In the VS Code keyboard shortcuts editor, swap the
^ + #
(which control editor selection) shortcuts withCommand + #
shortcuts (which control something else I don't use or care about). Every other tool I use (Firefox and ZSH) binds opening tabs by number toCommand
, VS Code is the exception in this regard so I edit it to use my preferred bindings. -
Install
f.lux
and enable "Inherit Dark Mode from System" (or similar) on all of my locally installed applications. Note: I havef.lux
set to 9:00 AM rise time. -
Create a "Dark Mode" profile in iTerm2 using default Dark Theme colors.
-
Add the following aliases the
~/.zshrc
:alias settestcommit="git stash && (git branch -D test-commit-branch || true) && git checkout -B test-commit-branch && git stash pop && git commit -a -m 'Apply testing commit.' && git checkout @{-1}" alias applytestcommit="git log -n 1 test-commit-branch --pretty=format:'%H' | xargs git cherry-pick"
This sets the current set of changes as a test commit on a special branch and makes it easy to apply this specific commit to the current branch later on. Very useful for testing purposes, as you don't need to remember what switches you need to flip to toggle a codebase to or from a test state.
-
In VSCode settings find
window.AutoDetectColorScheme
and enable it. This tells VSCode to inherit the color scheme (light mode / dark mode) from the OS. Also need to do this in Slack. -
Install my suite of VSCode extensions: Python (publisher: Microsoft), Pylance (Microsoft), Jupyter Notebook Renderers (Microsoft), Jupyter Keymap (Microsoft), Jupyter (Microsoft), Docker (Microsoft), Back and Forward buttons (grimmer), GitLens (GitKraken), Go (Go Team at Google), Live Preview (Microsoft), markdownlint (David Anson).
-
Follow the instructions here to turn on Pylint (
pip install pylint
first) and set it up to use the Black rule-set. See also the Black docs for some justification for these otherwise magical strings. Note that the blog post author was wrong to insert spaces around the equals (=
) on the liens that have it, this breaks things—remove these.