My old dotfiles ran vim in docker, but now I'm going with the traditional route of installing everything locally.
My dotfiles mostly deal with three things: vim, tmux, and bash. See the "Adding new things" section for more detail about how I manage the files for these things.
Use the OS's recommended package manager to install or update everything mentioned below.
-
If on a mac, install homebrew for use as a package manager.
-
Upgrade to the latest version of bash.
-
Install git if it doesn't already exist.
-
Generate a new SSH key for GitHub and then add it to GitHub.
-
Because this repository uses git submodules, clone it recusively:
git clone --recurse-submodules [email protected]:johnnymo87/dotfiles.git
. Thencd dotfiles
. -
Symlink the necessary files to
~
.for x in .bash_profile .bashrc .bashrc.d .config/nvim .gitconfig .gitignore_global .tmux.conf .tmux; do ln -sf $(pwd)/$x ~/$x; done
-
Install tmux.
-
Install vim.
-
Install ripgrep for faster grepping with ag.vim.
-
Finish installing YouCompleteMe.
- Install prerequisites, follow the instructions specific to your operating system
- Compile YouCompleteMe
cd .vim/pack/foo/start/YouCompleteMe git pull --recurse-submodules origin master python3 install.py --all --verbose
-
Install direnv or delete
.bashrc.d/direnv.bashrc
. -
Install pyenv or delete
.bashrc.d/py.bashrc
.- For data science things, consider installing miniconda as well. After installing, run
conda init
. This will modify some general rc files (e.g..bash_profile
). Relocate these changes to.bashrc.d/conda.private.bashrc
. (This configuration is shell- and installation-specific, so we don't check it into version control.)
- For data science things, consider installing miniconda as well. After installing, run
-
Install rbenv or delete
.bashrc.d/rb.bashrc
. -
Install rust or delete
.bashrc.d/rust.bashrc
.curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
For Elixir:
- If you don't want Elixir, just delete
.bashrc.d/asdf.bashrc
. - Otherwise, install asdf.
- Install Elixir with asdf.
asdf plugin add elixir asdf install elixir latest
- Install Erlang with asdf.
asdf plugin add erlang asdf install erlang latest
- Install mix.
mix local.hex
- If you don't want Elixir, just delete
-
For a prettier shell prompt, install one of these Nerd Fonts and Starship.
- E.g. I'm currently using
font-fira-code-nerd-font
.
- E.g. I'm currently using
I use Vim's built-in package management, see :help packages
. I submodule all vim plugins in .vim/pack/foo/start/
. So to add a new vim plugin, do:
git submodule add <git@github ...> .vim/pack/foo/start/my-new-vim-plugin
To initialize existing submodules (for example, if new ones appear after getting a fresh checkout from origin
):
git submodule update --init --recursive
I use tpm
for tmux plugins. So to add a new plugin, simply add a set -g @plugin '...'
reference to the top of the .tmux.conf
file, and press prefix
+ I (capital i, as in Install) to fetch the plugin.
New *.bashrc
files need to be in the .bashrc.d
directory, and need to be executable, so do chmod +x .bashrc.d/*.bashrc
after adding a new one.