There are tons of useful things in here:
- The usefulness of โOh My ZSH!โ is already builtโin.
- ๐โญ๏ธ Spaceships as a prompt.
- ๐ Fish-like autosuggestions.
- Syntax highlighting of commands while they are typed.
- Automatically closing and deleting of quotes and brackets when you type them.
- Browser-like substring search for history.
- zgen for dependency management.
- Useful aliases.
- Git config, global
.gitignorefile and aliases. - Dotfiles synchronization (
sync.py) with backup. - Restoring old dotfiles (
restore.py) from backup. - A lot of useful bins.
updatescript for updating dotfiles, npm, brew, gems, etc.
Missing feature? ๐ด Fork this repo and make it better!
Dotfiles are installed by running one of the following commands in your terminal, just copy one of the following commands and execute in the terminal:
Tell Git who you are using these commands:
git config -f ~/.gitlocal user.email "email@yoursite.com"
git config -f ~/.gitlocal user.name "Name Lastname"Clone dotfiles repo:
# Clone dotfiles repo
git clone https://github.com/denysdovhan/dotfiles.git $HOME/.dotfiles
# Go to the dotfiles directory
cd $HOME/.dotfiles
# Install dotfiles
./installUse single command to get latest updates:
update
This command will update dotfiles, their dependencies, brew or apt-get packages, global npm dependencies, gems, apm plugins.
Note: You may put your custom settings into
~/.zshlocal.
I suggest you to organize project folder as follows:
~/Projects
โโโ Forks # for GitHub fork
โโโ Job # for job projects
โโโ Playground # for short-term experiments
โโโ Repos # for long-term projects
Aliases are gonna make your work fast and enjoyable. See code in $DOTFILES/lib/aliases.zsh. Here is what's included:
- Aliases from Oh-My-Zsh. See Oh-My-Zsh Cheatsheet for more.
- Easier navigation
..โcd .....โcd ../......โcd ../../.......โcd ../../../..~โcd ~-โcd -
- Folders shortcuts
dlโcd ~/Downloadsdtโcd ~/Desktoppjโcd ~/Projectspjrโcd ~/Projects/_Repospjfโcd ~/Projects/_Forksplโcd ~/Projects/_Playground/
- Commands Shortcuts
eโ$EDITOR+xโchmod +xx+โchmod +xllโls -alFlaโls -Alโls -CF
- Open
open <FILE>โ open file from terminal.o <FILE>โ open file from terminal.ooโ open current folder.
- Misc
updateโ get updates (Runs$DOTFILES/scripts/update.zsh).dotfilesโ jump quickly into dotfiles folder.myipโ my local IP address.passwordโ generate random password, copies it into clipboard and outputs it to terminal.pathโ print $PATH in readable view.getpageโ download web page with all assets.getโ download file with original filename.
These OMZ plugins are included:
gitโ git aliases and functions.npmโ provides completion as well as adding many useful aliases.yarnโ the same as fornpm, but foryarnnvmโ auto-sourcingnvm.sudoโ[Esc] [Esc]to re-run previous command with sudo.ssh-agentโ automatically starts ssh-agent to set up and load whichever credentials you want for ssh connections.gpg-agentโ enablesgpg-agentif it is not running.- More are listed in
.zshrc(it's hard to keep the list updated).
Dotfiles also include some functions that will make your life easier. See code in bin/.
emptytrashโ empty the Trash on all mounted volumes and the main HDD.git-cleanupโ removes old Git branches and does other cleanup.git-forkโ add remote upsteam.git-upstreamโ sync branch with upstream.gzโ get gzipped file sizenโ runs given command using binary innode_modules/.binof the current project.nyanโ print nyan cat.serverโ start an HTTP server from a directory.
Note: Add your git user data and custom settings to
~/.gitlocal.
- UI color is
auto. - Diff colors are:
white boldfor meta information;cyan boldfor frag;red boldfor old lines;green boldfor new lines.
- Default editor is Vim instead of Vi.
push.defaultset ascurrent.- Automatic replacement
git://github.com/,gh:,github:addresses asgit@github.com:for GitHub. - Automatic replacement
git://gist.github.com/,gst:,gist:addresses asgit@gist.github.com:for Gists. - User custom settings gets from a
~/.gitlocalfile.
git aโgit addโ patch mode for specified files.git uaโgit reset HEADโ unstage files.git bโgit branchโ list, create, or delete branches.git cโgit commitโ record changes to the repository.git coโgit checkoutโ checkout a branch or paths to the working tree.git apโgit add -pโ add file contents to the index.git caโgit commit -aโ commit with automatically stage files that have been modified and deleted.git cmโgit commit -mโ commit with commit message.git camโgit commit -amโ add all files and commit with message.git sโgit status -sbโ short status with current branch.git masterโ go tomasterbranch and pull from remote.git developโ go todevelopbranch and pull from remote.git gitโ do not complain aboutgit git.git lโ commits log with pretty single line format.git llโ log with list of changed files for each commit.git ignoreโ ignore files: append file to.gitignore.git thisโ initialize, add all files and commit.git amendโ amend last commit.git redoโ amend last commit with its original message.git undoโreset --mixed HEAD^โ reset index changes, but not the working tree.git discardโcheckout --โ discard changes.git contribโ list of contributors and how many commits each person has.git todayโ see how many lines of code you have written today.git statโ how many lines of code in repo.git syncโ pull and push changes from/to remote.git-rootโ go to repo root.git-cleanup [--force]โ removes old Git branches.git-fork <original-author>โ add remote upstream.git-upstream [branch]โ sync branch with upstream (as defaultmaster).
Resources that I used to make these dotfiles better:
MIT ยฉ Denys Dovhan
