[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/capf-autosuggest eb886e9 1/3: Update documentation
From: |
ELPA Syncer |
Subject: |
[elpa] externals/capf-autosuggest eb886e9 1/3: Update documentation |
Date: |
Thu, 28 Oct 2021 06:57:15 -0400 (EDT) |
branch: externals/capf-autosuggest
commit eb886e93a283ade7a85d8c4fe210486b8e64b377
Author: jakanakaevangeli <jakanakaevangeli@chiru.no>
Commit: jakanakaevangeli <jakanakaevangeli@chiru.no>
Update documentation
---
capf-autosuggest.el | 39 ++++++++++++++++++++++++---------------
1 file changed, 24 insertions(+), 15 deletions(-)
diff --git a/capf-autosuggest.el b/capf-autosuggest.el
index feb647c..472678f 100644
--- a/capf-autosuggest.el
+++ b/capf-autosuggest.el
@@ -30,21 +30,29 @@
;; similar to zsh-autosuggestions or fish. It works in eshell and in modes
;; derived from comint-mode, for example M-x shell and M-x run-python.
;;
+;; As you type, the history auto-suggestion is shown as an overlay after point.
+;; Type [C-e] to insert text from this overlay or [M-f] to only insert a word
+;; from this overlay. [C-n] is a shorthand for [C-e] followed by [RET]: it
+;; inserts text from the overlay and sends it to the process.
+;;
;;;; Installation:
;;
-;; Add the following to your Emacs init file:
+;; To install capf-autosuggest, type
+;; M-x package-install RET capf-autosuggest RET.
+;;
+;; Enable it with M-x capf-autosuggest-mode. It is best to add the following
+;; elisp snippet to your Emacs init file to enable `capf-autosuggest-mode'
+;; automatically for every comint and eshell buffer:
;;
-;; (add-to-list 'load-path "/path/to/emacs-capf-autosuggest")
-;; (autoload 'capf-autosuggest-mode "capf-autosuggest")
;; (add-hook 'comint-mode-hook #'capf-autosuggest-mode)
;; (add-hook 'eshell-mode-hook #'capf-autosuggest-mode)
;;
;;;; Configuration:
;;
;; Use `capf-autosuggest-define-partial-accept-cmd' to make a command that can
-;; move point into an auto-suggested layer.
+;; move point into an auto-suggested overlay.
;;
-;; Example: to make C-M-f (forward-sexp) movable into suggested text, put the
+;; Example: to make [C-M-f] (forward-sexp) movable into suggested text, put the
;; following into your Emacs init file:
;;
;; (with-eval-after-load 'capf-autosuggest
@@ -53,10 +61,10 @@
;; (define-key capf-autosuggest-active-mode-map
;; [remap forward-sexp] #'movable-forward-sexp))
;;
-;; By default, C-n (next-line) will accept the currently displayed suggestion
-;; and send input to shell/eshell. See the customization group
-;; capf-autosuggest do disable this behaviour or enable it for other commands,
-;; such as C-c C-n or M-n.
+;; By default, [C-n] (next-line) will accept the currently displayed suggestion
+;; and send input to shell/eshell. To disable this behaviour or enable it for
+;; other commands such as [C-c C-n] or [M-n], see the customization group
+;; `capf-autosuggest'
;;
;;;; Details:
;;
@@ -366,20 +374,21 @@ in order to skip the history element already shown by the
overlay."
(defcustom capf-autosuggest-dwim-next-line t
"Whether `next-line' can accept and send current suggestion.
If t and point is on last line, `next-line' will accept the
-current suggestion and send input."
+current suggestion and send it to the process as input."
:type 'boolean)
(defcustom capf-autosuggest-dwim-next-prompt nil
"Whether next-prompt commands can send current suggestion.
If t and point is after the last prompt, `comint-next-prompt' and
`eshell-next-prompt' will accept the current suggestion and send
-input."
+it to the process as input."
:type 'boolean)
(defcustom capf-autosuggest-dwim-next-input nil
"Whether next-input commands can send current suggestion.
If t and previous command wasn't a history command
-\(next/previous-input or previous/next-matching-input-from-input),
-`comint-next-input' and `eshell-next-input' will accept the
-current suggestion and send input."
+\(next/previous-input or
+previous/next-matching-input-from-input), `comint-next-input' and
+`eshell-next-input' will accept the current suggestion and send
+it to the process as input."
:type 'boolean)
(defcustom capf-autosuggest-dwim-next-matching-input-from-input nil
"Whether next-input commands can send current suggestion.
@@ -387,7 +396,7 @@ If t and previous command wasn't a history matching command
\(previous or next-matching-input-from-input),
`comint-next-matching-input-from-input' and
`eshell-next-matching-input-from-input' will accept the current
-suggestion and send input."
+suggestion and send it to the process as input."
:type 'boolean)
(defun capf-autosuggest--accept-and-remapping (cmd)