To try without installing:
docker build -t dotfiles .
docker run --rm -it dotfiles
# cd ~/.config/dotfiles; git l; vim; tmux; etc.
# Or use the --volume flag to access files on your host
docker run --rm -it --volume "$HOME":/mnt/ dotfiles
# cd /mnt/; lsTo install:
git clone https://gitlab.com/d10n/dotfiles.git ~/.config/dotfiles
~/.config/dotfiles/install
# Or manually symlink the files and execute the executable filesTo uninstall:
~/.config/dotfiles/uninstall
# Or manually remove the symlinked filesMake local customizations with:
~/.vimrc.local
~/.vimrc.plugins.local
~/.zshrc.local
~/.bashrc.local
~/.inputrc.local
~/.tmux.conf.localSample local files are in the example directory.
- Take advantage of the tools you have
- Work with tools, not against tools
- Preserve expected default behavior
- Augment tools with optional convenience functions
- Degrade enhancements gracefully
- Protect yourself from PEBKAC
- Color for the prompt is automatically chosen based on the computer's hostname
fast-syntax-highlightingadds colors while you typezsh-history-substring-searchlets you type part of a previous command and press the up and down arrow keys to cycle through command history with that part- The prompt shows the full path so you can stop typing
pwd - The prompt shows git status so you can stop typing
git status - The prompt is bold to act as an eye magnet so you can find it quickly when scrolling up a lot
- The prompt is multi-line to let every command you type start at the same column
mkcdmakes a folder andcds into it.mvcdmoves a file andcds to the destination.cdto a file will automaticallycdto its containing foldercd :/cds to the root of the git repositorycd ..../expands tocd ../../../; every . after the first 2 goes up another directorygit commit -ais prevented if you already have staged changesgit checkout -ishows a searchable list of local branches.git checkout -iashows all branches. Press enter to check out the selected branch. Press ctrl-c or esc to exit the list.- When an output line of
git grepis very long, the line will be truncated - When
whichoutput is a file,ls -linformation will be added - Tab completion is powerful. Type
cd /u/l/b<tab>and it will expand tocd /usr/local/bin/. - Tab completion is case-insensitive if you start with a lowercase letter. For example,
cd /u/uexpands tocd /Users/username - Tab completion is dash and underscore insensitive. For example,
cd foo-bar-bazcan expand tocd foo-bar_baz - For commands that take longer than 5 seconds, the duration, start date, and end date are printed
- iTerm tab color can be set with
set_iterm_tab_rgb. Typecdby itself to remove the tab color
git lfor short loggit dfor diff of unstaged changesgit dsfor diff of staged changesgit sfor short statusgit bfor git branchgit bdfor local branches, sorted by dategit bd -afor all branches, sorted by dategit fto fetch branches and tagsgit grep-blamecombinesgit grepandgit blamegit browseshows a searchable graph of git commits. Press enter to show the diff. Press q to exit the diff and press ctrl-c or esc to exit the graph.
- F2 toggles auto-indenting when pasting, F3 toggles line numbers, F4 toggles line wrapping
- Home and 0 work like the Home key in Eclipse/Sublime/IntelliJ. ^ always goes to the beginning of the line.
- It sets up vim-plug plugins iff you make the .vimrc.plugins file
- Skim through and read the comments for more
To get ctrl-pgup/ctrl-pgdn to switch vim tabs in iTerm: (via https://superuser.com/a/360103)
- Go to iTerm / Preferences... / Profiles / Keys
- Press the + button to add a profile shortcut
- Use shortcut:
^Page Up, action: "Send Escape sequence", value[5;5~ - Use shortcut:
^Page Down, action: "Send Escape sequence", value[6;5~
|splits vertically instead of%-splits hoizontally instead of"
