# one-key **Repository Path**: emacs-hub/one-key ## Basic Information - **Project Name**: one-key - **Description**: 此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: https://github.com/manateelazycat/one-key.git - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-06-01 - **Last Updated**: 2022-06-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # One-Key We have installed too many Emacs plugins, if you bind a global key for each command, we have no global key can be used in a short time. The goal of one-key.el is to call a set of commands with a global key, to save the resources of the global key. # Install Add the full path of one-key.el to your Emacs ```load-path```, then add the following to `init.el`: ```Elisp (add-to-list 'load-path "~/.emacs.d/site-lisp/one-key/") (require 'one-key) ``` # Define one-key menu Define one-key function ```one-key-menu-magit```: ```Elisp (one-key-create-menu "MAGIT" '( (("s" . "Magit status") . magit-status+) (("c" . "Magit checkout") . magit-checkout) (("C" . "Magit commit") . magit-commit) (("u" . "Magit push to remote") . magit-push-current-to-pushremote) (("p" . "Magit delete remote branch") . magit-delete-remote-branch) (("i" . "Magit pull") . magit-pull-from-upstream) (("r" . "Magit rebase") . magit-rebase) (("e" . "Magit merge") . magit-merge) (("l" . "Magit log") . magit-log-all) (("L" . "Magit blame") . magit-blame+) (("b" . "Magit branch") . magit-branch) (("B" . "Magit buffer") . magit-process-buffer) (("D" . "Magit discarded") . magit-discard) (("," . "Magit init") . magit-init) (("." . "Magit add remote") . magit-remote-add) ) t) ``` Then binding function ```one-key-menu-magit``` with one global key to call it.