Skip to content

Latest commit

 

History

History
86 lines (66 loc) · 4.03 KB

README.md

File metadata and controls

86 lines (66 loc) · 4.03 KB

dotfiles

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.

Installation

Use the OS's recommended package manager to install or update everything mentioned below.

  1. If on a mac, install homebrew for use as a package manager.

  2. Upgrade to the latest version of bash.

  3. Install git if it doesn't already exist.

  4. Generate a new SSH key for GitHub and then add it to GitHub.

  5. Because this repository uses git submodules, clone it recusively: git clone --recurse-submodules [email protected]:johnnymo87/dotfiles.git. Then cd dotfiles.

  6. 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
    
  7. Install tmux.

  8. Install vim.

  9. Install ripgrep for faster grepping with ag.vim.

  10. Finish installing YouCompleteMe.

  11. Install direnv or delete .bashrc.d/direnv.bashrc.

  12. 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.)
  13. Install rbenv or delete .bashrc.d/rb.bashrc.

  14. Install rust or delete .bashrc.d/rust.bashrc.

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    
  15. 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
      
  16. For a prettier shell prompt, install one of these Nerd Fonts and Starship.

    • E.g. I'm currently using font-fira-code-nerd-font.

Adding new things

For vim

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

For tmux

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.

For bash

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.