From ac08417b7453c31c445c0d16ce20b7404c87591b Mon Sep 17 00:00:00 2001 From: David Chen Date: Sat, 18 May 2019 14:19:50 -0700 Subject: [PATCH 1/2] Create README.md --- README.md | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..7ed03cc --- /dev/null +++ b/README.md @@ -0,0 +1,81 @@ +# .config +# auto suggestions + +## Installation + +### Manual (Git Clone) + +1. Clone this repository somewhere on your machine. This guide will assume `~/.zsh/zsh-autosuggestions`. + + ```sh + git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions + ``` + +2. Add the following to your `.zshrc`: + + ```sh + source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh + ``` + +3. Start a new terminal session. + +### Antigen + +1. Add the following to your `.zshrc`: + + ```sh + antigen bundle zsh-users/zsh-autosuggestions + ``` + +2. Start a new terminal session. + +### Oh My Zsh + +1. Clone this repository into `$ZSH_CUSTOM/plugins` (by default `~/.oh-my-zsh/custom/plugins`) + + ```sh + git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions + ``` + +2. Add the plugin to the list of plugins for Oh My Zsh to load (inside `~/.zshrc`): + + ```sh + plugins=(zsh-autosuggestions) + ``` + +3. Start a new terminal session. + +### Arch Linux + +1. Install [`zsh-autosuggestions`](https://www.archlinux.org/packages/community/any/zsh-autosuggestions/) from the `community` repository. + + ```sh + pacman -S zsh-autosuggestions + ``` + + or, to use a package based on the `master` branch, install [`zsh-autosuggestions-git`](https://aur.archlinux.org/packages/zsh-autosuggestions-git/) from the [AUR](https://wiki.archlinux.org/index.php/Arch_User_Repository). + +2. Add the following to your `.zshrc`: + + ```sh + source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh + ``` + +3. Start a new terminal session. + +### macOS via Homebrew +1. Install the `zsh-autosuggestions` package using [Homebrew](https://brew.sh/). + + ```sh + brew install zsh-autosuggestions + ``` + +2. Add the following to your `.zshrc`: + + ```sh + source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh + ``` + +3. Start a new terminal session. + + From 7cd5e6c7960784e2e6512e0b928398654c94eb99 Mon Sep 17 00:00:00 2001 From: David Chen Date: Sat, 18 May 2019 14:23:35 -0700 Subject: [PATCH 2/2] Update README.md --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 7ed03cc..709abe3 100644 --- a/README.md +++ b/README.md @@ -79,3 +79,18 @@ 3. Start a new terminal session. +## Syntax highlighting + +``` +brew install zsh-syntax-highlighting +``` + +If you do not have or do not like homebrew, follow [the installation instructions](https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md) instead. + +After installation, add the following line + +``` +source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +``` + +to **the end** of your `.zshrc` file. After that, it's best to restart your terminal. Sourcing your `~/.zshrc` does not seem to work well with this plugin.