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/; ls
To install:
git clone https://gitlab.com/d10n/dotfiles.git ~/.config/dotfiles
~/.config/dotfiles/install
# Or manually symlink the files and execute the executable files
To uninstall:
~/.config/dotfiles/uninstall
# Or manually remove the symlinked files
Make local customizations with:
~/.vimrc.local
~/.vimrc.plugins.local
~/.zshrc.local
~/.bashrc.local
~/.inputrc.local
~/.tmux.conf.local
Sample 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-highlighting
adds colors while you typezsh-history-substring-search
lets 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
mkcd
makes a folder andcd
s into it.mvcd
moves a file andcd
s to the destination.cd
to a file will automaticallycd
to its containing foldercd :/
cd
s to the root of the git repositorycd ..../
expands tocd ../../../
; every . after the first 2 goes up another directorygit commit -a
is prevented if you already have staged changesgit checkout -i
shows a searchable list of local branches.git checkout -ia
shows 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 grep
is very long, the line will be truncated - When
which
output is a file,ls -l
information 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/u
expands tocd /Users/username
- Tab completion is dash and underscore insensitive. For example,
cd foo-bar-baz
can 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
. Typecd
by itself to remove the tab color
git l
for short loggit d
for diff of unstaged changesgit ds
for diff of staged changesgit s
for short statusgit b
for git branchgit bd
for local branches, sorted by dategit bd -a
for all branches, sorted by dategit f
to fetch branches and tagsgit grep-blame
combinesgit grep
andgit blame
git browse
shows 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"