My Configuration as a Linux User
Take a look -> Understand what means -> Copy what you want to your folder
- Install
zsh
curl
git
first
Ubuntu/Debian
sudo apt-get install zsh curl git
Arch Linux
sudo pacman -S zsh curl git
- Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
OR
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
- git clone this project & cd
git clone https://github.com/zhzhzhy/.config
cd .config
- Copy files under
zsh
ORzsh-Termux
to$HOME/.config/zsh/
cp -i -R ./zsh $HOME/.config/
- Copy
.zshrc
to$HOME
cp -i $HOME/.config/zsh/.zshrc $HOME/
alias ra='ranger'
alias ta='tmux a'
alias t='tmux'
alias gs='git config credential.helper store'
alias gcl='git clone'
alias gsh='git push'
alias gll='git pull'
alias gad='git add .'
alias gco='git commit -m'
alias gst='git status'
alias gbr='git branch'
alias gch='git checkout'
alias grb='git rebase -i'
alias gmr='git merge'
alias gcp='git cherry-pick'
alias grf='git reflog'
alias gl='git log --graph'
alias glo='git log --graph --oneline'
alias glod='git log --graph --oneline --decorate'
alias gr='git remote'
alias ex='exit'
alias l='ls -al'
alias sudo='sudo -E'
-
Available addtional commands:
:paste_as_root
:toggleVCS
:mkcd
:fzf_select
:compress
:extracthere
-
Copy ranger config files into $HOME/.config/ranger
cp -i -R ./ranger $HOME/.config/
-
Compress and extract archives:
:compress
:extracthere
depends on atoolAtool installation
Arch Linux:
sudo pacman -S atool
Ubuntu:
sudo apt install atool
fzf is a general-purpose command-line fuzzy finder
- fzf Installation
fzf project consists of the following components:
fzf
executablefzf-tmux
script for launching fzf in a tmux pane- Shell extensions
- Key bindings (
CTRL-T
,CTRL-R
, andALT-C
) (bash, zsh, fish) - Fuzzy auto-completion (bash, zsh)
- Key bindings (
- Vim/Neovim plugin
You can download fzf executable alone if you don't need the extra stuff.
You can use Homebrew (on macOS or Linux) to install fzf.
brew install fzf
# To install useful key bindings and fuzzy completion:
$(brew --prefix)/opt/fzf/install
fzf is also available via MacPorts: sudo port install fzf
Alternatively, you can "git clone" this repository to any directory and run install script.
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
Package Manager | Linux Distribution | Command |
---|---|---|
APK | Alpine Linux | sudo apk add fzf |
APT | Debian 9+/Ubuntu 19.10+ | sudo apt-get install fzf |
Conda | conda install -c conda-forge fzf |
|
DNF | Fedora | sudo dnf install fzf |
Nix | NixOS, etc. | nix-env -iA nixpkgs.fzf |
Pacman | Arch Linux | sudo pacman -S fzf |
pkg | FreeBSD | pkg install fzf |
pkg_add | OpenBSD | pkg_add fzf |
XBPS | Void Linux | sudo xbps-install -S fzf |
Zypper | openSUSE | sudo zypper install fzf |
⚠️ Key bindings (CTRL-T / CTRL-R / ALT-C) and fuzzy auto-completion may not be enabled by default.Refer to the package documentation for more information. (e.g.
apt-cache show fzf
)
see https://github.com/zsh-users/zsh-syntax-highlighting
Fish shell-like syntax highlighting for Zsh.
Some examples:
see https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md