Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

🍴 Fork of Denys Dovhan's Dotfiles

NotificationsYou must be signed in to change notification settings

developerkevin/dotfiles

 
 

Repository files navigation

Spaceship with Hyper and One Dark

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.
  • Usefulaliases.
  • Git config, global.gitignore file and aliases.
  • Dotfiles synchronization (sync.py) with backup.
  • Restoring old dotfiles (restore.py) from backup.
  • A lot ofuseful bins.
  • update script for updating dotfiles, npm, brew, gems, etc.

Missing feature? 🍴 Fork this repo and make it better!

Installation

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 repogit clone https://github.com/denysdovhan/dotfiles.git$HOME/.dotfiles# Go to the dotfiles directorycd$HOME/.dotfiles# Install dotfiles./install

Updating

Use single command to get latest updates:

update

This command will update dotfiles, their dependencies,brew orapt-get packages, globalnpm dependencies,gems,apm plugins.

Under the hood

Note: You may put your custom settings into~/.zshlocal.

Projects tree

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

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. SeeOh-My-Zsh Cheatsheet for more.
  • Easier navigation
    • ..cd ..
    • ...cd ../..
    • ....cd ../../..
    • .....cd ../../../..
    • ~cd ~
    • -cd -
  • Folders shortcuts
    • dlcd ~/Downloads
    • dtcd ~/Desktop
    • pjcd ~/Projects
    • pjrcd ~/Projects/_Repos
    • pjfcd ~/Projects/_Forks
    • plcd ~/Projects/_Playground/
  • Commands Shortcuts
    • e$EDITOR
    • +xchmod +x
    • x+chmod +x
    • llls -alF
    • lals -A
    • lls -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.

Oh-My-Zsh plugins

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 foryarn
  • nvm — 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-agent if it is not running.
  • More are listed in.zshrc (it's hard to keep the list updated).

Bin

Dotfiles also include some functions that will make your life easier. See code inbin/.

  • 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 size
  • n — runs given command using binary innode_modules/.bin of the current project.
  • nyan — printnyan cat.
  • server — start an HTTP server from a directory.

Git

Note: Add your git user data and custom settings to~/.gitlocal.

Configuration

  • UI color isauto.
  • Diff colors are:
    • white bold for meta information;
    • cyan bold for frag;
    • red bold for old lines;
    • green bold for new lines.
  • Default editor isVim instead ofVi.
  • push.default set ascurrent.
  • Automatic replacementgit://github.com/,gh:,github: addresses asgit@github.com: for GitHub.
  • Automatic replacementgit://gist.github.com/,gst:,gist: addresses asgit@gist.github.com: for Gists.
  • User custom settings gets from a~/.gitlocal file.

Git Aliases

  • git agit add — patch mode for specified files.
  • git uagit reset HEAD — unstage files.
  • git bgit branch — list, create, or delete branches.
  • git cgit commit — record changes to the repository.
  • git cogit checkout — checkout a branch or paths to the working tree.
  • git apgit add -p — add file contents to the index.
  • git cagit commit -a — commit with automatically stage files that have been modified and deleted.
  • git cmgit commit -m — commit with commit message.
  • git camgit commit -am — add all files and commit with message.
  • git sgit status -sb — short status with current branch.
  • git master — go tomaster branch and pull from remote.
  • git develop — go todevelop branch 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 undoreset --mixed HEAD^ — reset index changes, but not the working tree.
  • git discardcheckout -- — 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

Resources that I used to make these dotfiles better:

License

MIT ©Denys Dovhan

Packages

No packages published

Languages

  • Shell84.8%
  • Ruby9.1%
  • Vim Script6.1%

[8]ページ先頭

©2009-2025 Movatter.jp