From ce9104c4f3d9ea424346d711f0653cd9e5d81303 Mon Sep 17 00:00:00 2001 From: Alex Matheson Date: Wed, 29 Dec 2021 07:12:52 -0600 Subject: feat(npm): toggle `npm install` / `npm uninstall` by pressing F2 twice (#9717) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marc Cornellà --- plugins/npm/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'plugins/npm/README.md') diff --git a/plugins/npm/README.md b/plugins/npm/README.md index e970c3c7a..8eafc6d61 100644 --- a/plugins/npm/README.md +++ b/plugins/npm/README.md @@ -29,3 +29,20 @@ plugins=(... npm) | `npmI` | `npm init` | Run npm init | | `npmi` | `npm info` | Run npm info | | `npmSe` | `npm search` | Run npm search | + +## `npm install` / `npm uninstall` toggle + +The plugin adds a function that toggles between `npm install` and `npm uninstall` in +the current command or the last command, for up to 2 previous commands. **The default +key binding is pressing F2 twice**. + +You can change this key binding by adding the following line to your zshrc file: + +```zsh +bindkey -M emacs '' npm_toggle_install_uninstall +bindkey -M vicmd '' npm_toggle_install_uninstall +bindkey -M viins '' npm_toggle_install_uninstall +``` + +where `` is a key sequence obtained by running `cat` and pressing the keyboard +sequence you want. -- cgit v1.2.3-70-g09d2