• Stars
    star
    673
  • Rank 67,060 (Top 2 %)
  • Language
    Perl
  • Created almost 15 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

💾  Ian's dotfiles, utils, and Zsh/Vim/tmux configs

💾 Ian's Dotfiles and Vim config

build status

These are my dotfiles. There are many like them, but these are mine. This started around 2001 or so when I used lots of different machines 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

Favorite font at the moment: Iosevka Term

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
  2. chsh or otherwise set your shell to use Zsh
  3. Restart your shell

Optionally 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, 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, which many people became interested in after reading my articles about Vim. I also have an update.sh script 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/xTab 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/binCtrl-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)
  • 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), then Ctrl-AvEnter (changing rg to vrg) to edit all of the files that matched in Vim
  • cding 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 <message> to commit everything with a message, or gap to cherry pick and then gc <message> to commit.
  • Ctrl-G Ctrl-G quick switches to a git branch thanks to fzf-git.sh
  • Fuzzy history search using Ctrl-R and 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

More Repositories

1

jsgrids

📦 🔍 👀   A comparison tool to compare JavaScript data grid and spreadsheet libraries
TypeScript
170
star
2

spittoon

🖼 Sequential-art comic-strip generator written in Ruby which uses RMagick (2005)
Ruby
130
star
3

langterm

🕹️ WebGL-based VT220 emulator, made as a learning example and frontend for a text adventure
JavaScript
77
star
4

rltiles

GitHub clone of RL Tiles (graphical tileset for Roguelike games) + JSON metadata + selector
C
50
star
5

cadubi

🎨 Creative ASCII Drawing Utility By Ian (1997)
Perl
47
star
6

ycombinator1.com

🟧 Lets you add a character to Hacker News links to add social media and OpenGraph previews for sharing on things like Slack or Twitter.
TypeScript
42
star
7

jsrobowar

👾 A port of RoboWar to the web browser using JavaScript and HTML5. (2010)
JavaScript
33
star
8

webgl-demos

🦆 (OUTDATED - 2011) Experiments with GLGE
JavaScript
30
star
9

aspen

🔎 📖 ✨ Custom, private search engine for text documents built with NextJS/React/ES6/ES7
JavaScript
30
star
10

femtostats

📊🌍 Super small, light, privacy-focused, self-hostable web statistics provider
TypeScript
20
star
11

magic8ball

🎱 📱🔮 ✨ I wanted to see if ChatGPT could make an app for watchOS & iOS and it did
Swift
16
star
12

memorybot

🤖 An infobot-inspired Slack bot that remembers things
JavaScript
15
star
13

vim-javascript-sql

Vim plugin for highlighting SQL inside JavaScript template literals
Vim Script
13
star
14

ifhttp

👾 HTTP REST server for Z-Machine interactive fiction
JavaScript
12
star
15

statico.link

🔗 Personal link shortener that uses an NGINX-compatible map file as a config
JavaScript
11
star
16

csvhacker

🛠 A tool to quickly view, filter, map, and reduce CSV/TSV files in the browser. Shareable links for easy collaboration with non-engineers.
JavaScript
8
star
17

perl-test-refcard

Perl Testing Reference Card (2004)
6
star
18

ninjaui

Ninja ui
JavaScript
6
star
19

github-game

🟩 ✨ Win the GitHub game with artistic green squares!
JavaScript
6
star
20

glulxe-httpd

👾 HTTP+JSON Glulx (.ulx) interactive fiction server with session support
JavaScript
6
star
21

dungeonfun

🕹️ Infinite multiplayer dungeon using HTML5 and WebSockets (2011)
CoffeeScript
5
star
22

javascript

this is my javascript library
JavaScript
2
star
23

FindFile.vim

William Lee's FindFile.vim
2
star
24

custom-css-extension

A Chrome extension that tweaks CSS for sites I want
JavaScript
2
star
25

tanks

A proof-of-concept tank game
JavaScript
2
star
26

friend-rescue

An App Engine-hosted Flash-based shooter for Facebook
ActionScript
2
star
27

the-archive-public

🧞‍♂️ Public version of The Archive, the text adventure game on langworth.com, but without secrets.
Inform 7
2
star
28

crafty-dirty-rectangles

Demos of CraftyJS dirty rectangle pull request, before and after
JavaScript
2
star
29

epson-dm-d100-perl

Perl serial display driver for the EPSON DM-D100 VFT display (2006)
Perl
2
star
30

tankles

2
star
31

route.js

JavaScript Inversion of Control container for URIs - location.hash navigation goodness
JavaScript
2
star
32

lakera-gandalf-solutions

2
star
33

snippendrop

JavaScript
1
star
34

imgur2rss

Turns Imgur things into RSS feeds
CoffeeScript
1
star
35

imgur-album-downloader

Download an entire album of images from Imgur
CoffeeScript
1
star
36

django-logging

Clone of http://code.google.com/p/django-logging/ with patches. (See commit history)
Python
1
star
37

kragnoth

😈 Proof-of-concept HTML5 multiplayer roguelike (2012)
CSS
1
star