Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/statico/dotfiles
:floppy_disk: Ian's dotfiles, utils, and Zsh/Vim/tmux configs
https://github.com/statico/dotfiles
bash dotfiles dotfiles-manager emacs-configuration gitconfig javascript postgresql tmux vim vim-configuration vim-plugins vimrc visual-studio-code vscode zsh zshrc
Last synced: 4 days ago
JSON representation
:floppy_disk: Ian's dotfiles, utils, and Zsh/Vim/tmux configs
- Host: GitHub
- URL: https://github.com/statico/dotfiles
- Owner: statico
- Created: 2009-12-02T11:56:55.000Z (about 15 years ago)
- Default Branch: main
- Last Pushed: 2024-12-28T17:57:02.000Z (24 days ago)
- Last Synced: 2025-01-10T15:09:04.290Z (11 days ago)
- Topics: bash, dotfiles, dotfiles-manager, emacs-configuration, gitconfig, javascript, postgresql, tmux, vim, vim-configuration, vim-plugins, vimrc, visual-studio-code, vscode, zsh, zshrc
- Language: Perl
- Homepage: https://langworth.com/
- Size: 22.8 MB
- Stars: 698
- Watchers: 22
- Forks: 90
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# 💾 Ian's Dotfiles and Vim config
[![build status](https://img.shields.io/github/actions/workflow/status/statico/dotfiles/build.yml?branch=main&style=flat-square)](https://ghcr.io/statico/dotfiles)
These are my dotfiles. There are many like them, but these are mine. This started around 2001 or so when I used many different operating systems and environments. Now I mostly use macOS and Linux but still keep the environment in sync.
![CleanShot 2021-10-01 at 20 15 23@2x](https://user-images.githubusercontent.com/137158/135730113-495868f0-e4ad-4e8a-a10e-7f07be402e9d.png)
Favorite font at the moment: [Iosevka Term](https://typeof.net/Iosevka/)
### Demo
```
$ docker run --rm -it ghcr.io/statico/dotfiles
demouser@987552d4c629:/
〉
```A random prompt color is picked at first install. Edit `.zshlocal` for details.
### Installation
1. `curl -sL https://statico.link/zsh | zsh`
1. `chsh` or otherwise set your shell to use [Zsh](http://www.zsh.org/)
1. Restart your shellOptionally create a `.postinstall` with some machine-specific commands, like `git config --global user.email "[email protected]"`". You can also create a `.vimlocal` and `.gvimlocal` for machine-specific Vim customizations.
### Customizing
- Fork this repo
- Update `install.zsh` to point at your own
- Go nuts### Highlights (or, Why I Use This)
My first boss told me that I should have a digital _toolkit_ -- a set of tools that I keep with me that I can use anywhere. In college I used many different kinds of Unix variants, and so it made sense to build a kit that could bootstrap my environment anywhere. Today, I use macOS, Windows, and various distributions of Linux, and this kit has proven invaluable in getting set up quickly on new hardware and VMs.
While this project includes a huge collection of configuration snippets I've collected over the years, a few parts stand out and are things I use daily:
- My [`zshrc`](https://github.com/statico/dotfiles/blob/main/.zshrc), which has a minimal, customized prompt that I like the best, as well as many aliases and shortcuts to standardize environments (like making sure Unicode displays properly and `ls` shows colors) and reduce keystrokes (like with my ~60 or so Git aliases). There are also a few functions that make host-specific customizations easy using a `.zshlocal` script which never gets checked in. There are tons of tricks in there so it's worth a skim.
- My [`vimrc`](https://github.com/statico/dotfiles/blob/main/.vim/vimrc), which many people became interested in after reading my [articles about Vim](https://blog.langworth.com). I also have [an `update.sh` script](https://github.com/statico/dotfiles/blob/main/.vim/update.sh) which installs all of the Vim plugins and themes I like to use, and it gets run as part of the Zsh update process (aliased to `ZU`). Is my Vim update thing better than Vundle or another plugin manager? Maybe. It's very simple and fast and works everywhere, so I stick with it.
### Why Zsh instead of Bash?
Only a few reasons, honestly:
- Easier completion - I can type `/u/l/b/x`Tab and that completes to `/usr/local/bin/x`
- I'm able to hack Ctrl-W to delete to the previous word _or_ slash, so `/usr/local/bin`Ctrl-W becomes `/usr/local/`
- I've got a thing that shows me five red dots when a completion is in progress, such as when completing files from remote SSH servers.
- Globbing - The `**` recursive operator and qualifiers like `(.)` and `(/)` for globbing are essential, like `rm **/.DS_Store`
- Legacy - I started using Zsh in 2002 or so when it was edgy.
### Common Tricks
Here's what I use the most often on the command line:
- `j foo` to `cd` to the most commonly used directory that fuzzy-matches foo (via [autojump](https://github.com/wting/autojump))
- `l` and `ll` for long directory listings, `ltr` for showing the most recent files
- Other single-character aliases: `g` for `git`, `d` for `docker`, `dc` for `docker-compose`, `k` for `tree`, `y` for `yarn`
- Meta-L which appends `2>&1|less` to the command and hits Enter, running the command and viewing its output in a pager
- `ZU` to update Vim plugins or just `ZR` to restart Zsh after a .zshrc change
- Searching with `rg` ([ripgrep](https://github.com/BurntSushi/ripgrep)), then Ctrl-AvEnter (changing `rg` to `vrg`) to edit all of the files that matched in Vim
- `cd`ing to a directory and then using Meta-P to pop to the previous directory (since `auto_pushd` is enabled and silent)
- `psl` to search for processes (since I never remember the `pgrep` syntax and it's never been consistent across platforms)
- `open` and `trash` commands that work across macOS and Linux
- If I'm typing a command but realize that I need to do something else first, Meta-Q queues the current command and clears the command line, then pastes it back in after I enter and run another command first.
- Git commands: `st` for status, `gd` for a git diff, `gl` for a quick log, `sci ` to commit everything with a message, or `gap` to cherry pick and then `gc ` to commit.
- Ctrl-G Ctrl-G quick switches to a git branch thanks to [fzf-git.sh](https://github.com/junegunn/fzf-git.sh)
- Fuzzy history search using Ctrl-R and [FZF](https://github.com/junegunn/fzf)
- Each host gets a different `colorprompt` command in its `~/.zshlocal`. I use `ansimodes` or `256-colors.sh` to pick a color. (Both are already in the `~/bin/` directory, which is added to the `$PATH`.)### See also
- [Oh My Zsh](https://github.com/robbyrussell/oh-my-zsh) which is a very popular way of customizing Zsh (but not all dotfiles or Vim)
- http://github.com/jbalogh/dotfiles which this was modeled after