Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johnnymo87/dotfiles
My bash, tmux, and vim dotfiles
https://github.com/johnnymo87/dotfiles
Last synced: 1 day ago
JSON representation
My bash, tmux, and vim dotfiles
- Host: GitHub
- URL: https://github.com/johnnymo87/dotfiles
- Owner: johnnymo87
- License: mit
- Created: 2021-08-10T13:34:38.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-26T17:13:37.000Z (12 months ago)
- Last Synced: 2024-10-18T20:17:08.857Z (20 days ago)
- Language: Vim Script
- Homepage:
- Size: 135 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dotfiles
[My old dotfiles ran vim in docker](https://github.com/johnnymo87/dev-box), 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](adding-new-things) 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](https://brew.sh/) for use as a package manager.
1. Upgrade to the latest version of bash.
1. Install git if it doesn't already exist.
1. [Generate a new SSH key for GitHub](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) and then [add it to GitHub](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account).
1. Because this repository uses git submodules, clone it recusively: `git clone --recurse-submodules [email protected]:johnnymo87/dotfiles.git`. Then `cd dotfiles`.
1. 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
```1. Install tmux.
1. Install vim.
1. Install ripgrep for faster grepping with [ag.vim](https://github.com/rking/ag.vim).
1. Finish installing [YouCompleteMe](https://github.com/ycm-core/YouCompleteMe).
* Install prerequisites, follow [the instructions specific to your operating system](https://github.com/ycm-core/YouCompleteMe)
* Compile YouCompleteMe
```
cd .vim/pack/foo/start/YouCompleteMe
git pull --recurse-submodules origin master
python3 install.py --all --verbose
```1. Install [direnv](https://github.com/direnv/direnv) or delete `.bashrc.d/direnv.bashrc`.
1. Install [pyenv](https://github.com/pyenv/pyenv) or delete `.bashrc.d/py.bashrc`.
* For data science things, consider installing [miniconda](https://docs.conda.io/en/latest/miniconda.html) 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.)1. Install [rbenv](https://github.com/rbenv/rbenv) or delete `.bashrc.d/rb.bashrc`.
1. Install rust or delete `.bashrc.d/rust.bashrc`.
```
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
1. For Elixir:
* If you don't want Elixir, just delete `.bashrc.d/asdf.bashrc`.
* Otherwise, [install asdf](https://asdf-vm.com/guide/getting-started.html).
* 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
```1. For a prettier shell prompt, install one of these [Nerd Fonts](https://www.nerdfonts.com/font-downloads) and [Starship](https://starship.rs/).
* 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 .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`](https://github.com/tmux-plugins/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 **I**nstall) 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.