diff options
| -rw-r--r-- | evil-common.el | 5 | ||||
| -rw-r--r-- | evil-core.el | 63 | ||||
| -rw-r--r-- | evil-macros.el | 71 | ||||
| -rw-r--r-- | evil-vars.el | 216 |
4 files changed, 207 insertions, 148 deletions
diff --git a/evil-common.el b/evil-common.el index fc90c88..45f921d 100644 --- a/evil-common.el +++ b/evil-common.el @@ -422,7 +422,7 @@ MOTION defaults to the current motion." (defun evil-declare-motion (command) "Declare COMMAND to be a movement function. -This ensures that it behaves correctly in Visual state." +This ensures that it behaves correctly in visual state." (evil-add-command-properties command :keep-visual t :repeat 'motion)) (defun evil-declare-repeat (command) @@ -438,7 +438,8 @@ This ensures that it behaves correctly in Visual state." (evil-add-command-properties command :repeat 'ignore)) (defun evil-declare-change-repeat (command) - "Declare COMMAND to be repeatable by buffer changes." + "Declare COMMAND to be repeatable by buffer changes rather than +keystrokes." (evil-add-command-properties command :repeat 'change)) (defun evil-declare-insert-at-point-repeat (command) diff --git a/evil-core.el b/evil-core.el index c8851d6..dc58688 100644 --- a/evil-core.el +++ b/evil-core.el @@ -1004,20 +1004,19 @@ the above. If LOCAL is non-nil, set localleader instead." (defmacro evil-define-key (state keymap key def &rest bindings) "Create a STATE binding from KEY to DEF for KEYMAP. -STATE is one of normal, insert, visual, replace, operator, -motion, emacs, or a list of one or more of these. Omitting a -state by using nil corresponds to a standard Emacs binding using -`define-key'. The remaining arguments are like those of -`define-key'. For example: +STATE is one of `normal', `insert', `visual', `replace', +`operator', `motion', `emacs', or a list of one or more of +these. Omitting a state by using `nil' corresponds to a standard +Emacs binding using `define-key'. The remaining arguments are +like those of `define-key'. For example: (evil-define-key 'normal foo-map \"a\" 'bar) -This creates a binding from \"a\" to bar in Normal state, which -is active whenever foo-map is active. Using nil for the state, +This creates a binding from \\[a] to `bar' in normal state, which +is active whenever `foo-map' is active. Using `nil' for the state, the following lead to identical bindings: (evil-define-key nil foo-map \"a\" 'bar) - (define-key foo-map \"a\" 'bar) It is possible to specify multiple states and/or bindings at @@ -1027,21 +1026,20 @@ once: \"a\" 'bar \"b\" 'foo) -If foo-map has not been initialized yet, this macro adds an entry -to `after-load-functions', delaying execution as necessary. +If `foo-map' has not been initialized yet, this macro adds an +entry to `after-load-functions', delaying execution as necessary. -KEYMAP may also be a quoted symbol. If the symbol is global, the +KEYMAP may also be a quoted symbol. If the symbol is `global', the global evil keymap corresponding to the state(s) is used, meaning the following lead to identical bindings: (evil-define-key 'normal 'global \"a\" 'bar) - (evil-global-set-key 'normal \"a\" 'bar) -The symbol local may also be used, which corresponds to using +The symbol `local' may also be used, which corresponds to using `evil-local-set-key'. If a quoted symbol is used that is not -global or local, it is assumed to be the name of a minor mode, in -which case `evil-define-minor-mode-key' is used." +`global' or `local', it is assumed to be the name of a minor +mode, in which case `evil-define-minor-mode-key' is used." (declare (indent defun)) (cond ((member keymap '('global 'local)) `(evil-define-key* ,state ,keymap ,key ,def ,@bindings)) @@ -1194,26 +1192,21 @@ Add additional BINDINGS if specified." "Define an Evil state STATE. DOC is a general description and shows up in all docstrings; the first line of the string should be the full name of the state. -Then follows one or more optional keywords: - -:tag STRING Mode line indicator. -:message STRING Echo area message when changing to STATE. -:cursor SPEC Cursor to use in STATE. -:entry-hook LIST Hooks run when changing to STATE. -:exit-hook LIST Hooks run when changing from STATE. -:enable LIST List of other states and modes enabled by STATE. -:suppress-keymap FLAG If FLAG is non-nil, makes `evil-suppress-map' - the parent of the global map of STATE, - effectively disabling bindings to - `self-insert-command'. - -Following the keywords is optional code to be executed each time -the state is enabled or disabled. For example: - - (evil-define-state test - \"Test state.\" - :tag \"<T> \" - (setq test-var t)) + +BODY is executed each time the state is enabled or disabled. + +Optional keyword arguments: +- `:tag' - the mode line indicator, e.g. \"<T>\". +- `:message' - string shown in the echo area when the state is + activated. +- `:cursor' - default cursor specification. +- `:enable' - list of other state keymaps to enable when in this + state. +- `:entry-hook' - list of functions to run when entering this state. +- `:exit-hook' - list of functions to run when exiting this state. +- `:suppress-keymap' - if non-nil, effectively disables bindings to + `self-insert-command' by making `evil-suppress-map' the parent of + the global state keymap. The global keymap of this state will be `evil-test-state-map', the local keymap will be `evil-test-state-local-map', and so on. diff --git a/evil-macros.el b/evil-macros.el index 49bef50..79cd8d8 100644 --- a/evil-macros.el +++ b/evil-macros.el @@ -110,7 +110,17 @@ The return value is a list (BEG END TYPE)." (move-marker evil-motion-marker nil)))))) (defmacro evil-define-motion (motion args &rest body) - "Define an motion command MOTION. + "Define a motion command MOTION. +ARGS is a list of arguments. Motions can have any number of +arguments, but the first (if any) has the predefined meaning of +count. BODY must execute the motion by moving point. + +Optional keyword arguments are: +- `:type' - determines how the motion works after an operator (one of + `inclusive', `line', `block' and `exclusive', or a self-defined + motion type) +- `:jump' - if non-nil, the previous position is stored in the jump + list, so that it can be restored with \\[C-o] \(fn MOTION (COUNT ARGS...) DOC [[KEY VALUE]...] BODY...)" (declare (indent defun) @@ -147,7 +157,7 @@ The return value is a list (BEG END TYPE)." '(and (fboundp 'eldoc-add-command) (eldoc-add-command ',motion)))) (evil-define-command ,motion (,@args) - ,@(when doc `(,doc)) ; avoid nil before `interactive' + ,@(when doc `(,doc)) ; avoid nil before `interactive' ,@keys :keep-visual t (interactive ,@interactive) @@ -356,6 +366,14 @@ the new range." BODY should return a range (BEG END) to the right of point if COUNT is positive, and to the left of it if negative. +Optional keyword arguments: +- `:type' - determines how the range applies after an operator + (`inclusive', `line', `block', and `exclusive', or a self-defined + motion type). +- `:extend-selection' - if non-nil (default), the text object always + enlarges the current selection. Otherwise, it replaces the current + selection. + \(fn OBJECT (COUNT) DOC [[KEY VALUE]...] BODY...)" (declare (indent defun) (doc-string 3) @@ -444,6 +462,23 @@ if COUNT is positive, and to the left of it if negative. (defmacro evil-define-operator (operator args &rest body) "Define an operator command OPERATOR. +The operator acts on the range of characters BEG through +END. BODY must execute the operator by potentially manipulating +the buffer contents, or otherwise causing side effects to happen. + +Optional keyword arguments are: +- `:type' - force the input range to be of a given type (`inclusive', + `line', `block', and `exclusive', or a self-defined motion type). +- `:motion' - use a predetermined motion instead of waiting for one + from the keyboard. This does not affect the behavior in visual + state, where selection boundaries are always used. +- `:repeat' - if non-nil (default), then \\[.] will repeat the + operator. +- `:move-point' - if non-nil (default), the cursor will be moved to + the beginning of the range before the body executes +- `:keep-visual' - if non-nil, the selection is not disabled when the + operator is executed in visual state. By default, visual state is + exited automatically. \(fn OPERATOR (BEG END ARGS...) DOC [[KEY VALUE]...] BODY...)" (declare (indent defun) @@ -614,24 +649,22 @@ RETURN-TYPE is non-nil." (defmacro evil-define-type (type doc &rest body) "Define type TYPE. DOC is a general description and shows up in all docstrings. -It is followed by a list of keywords and functions: - -:expand FUNC Expansion function. This function should accept - two positions in the current buffer, BEG and END, - and return a pair of expanded buffer positions. -:contract FUNC The opposite of :expand, optional. -:one-to-one BOOL Whether expansion is one-to-one. This means that - :expand followed by :contract always returns the - original range. -:normalize FUNC Normalization function, optional. This function should - accept two unexpanded positions and adjust them before - expansion. May be used to deal with buffer boundaries. -:string FUNC Description function. This takes two buffer positions - and returns a human-readable string, for example, - \"2 lines\". + +Optional keyword arguments: +- `:expand' - expansion function. This function should accept two + positions in the current buffer, BEG and END,and return a pair of + expanded buffer positions. +- `:contract' - the opposite of `:expand'. Optional. +- `:one-to-one' - non-nil if expansion is one-to-one. This means that + `:expand' followed by `:contract' always return the original range. +- `:normalize' - normalization function. This function should accept + two unexpanded positions and adjust them before expansion. May be + used to deal with buffer boundaries. +- `:string' - description function. Takes two buffer positions and + returns a human-readable string. For example \"2 lines\" If further keywords and functions are specified, they are assumed to -be transformations on buffer positions, like :expand and :contract. +be transformations on buffer positions, like `:expand' and `:contract'. \(fn TYPE DOC [[KEY FUNC]...])" (declare (indent defun) @@ -646,7 +679,7 @@ be transformations on buffer positions, like :expand and :contract. (while (keywordp (car-safe body)) (setq key (pop body) val (pop body)) - (if (plist-member plist key) ; not a function + (if (plist-member plist key) ; not a function (setq plist (plist-put plist key val)) (setq func val sym (intern (replace-regexp-in-string diff --git a/evil-vars.el b/evil-vars.el index 474849e..5ada065 100644 --- a/evil-vars.el +++ b/evil-vars.el @@ -160,30 +160,30 @@ commands." :prefix 'evil-) (defcustom evil-auto-indent t - "Whether to auto-indent when opening lines." + "Whether to auto-indent when opening lines with \\[o] and \\[O]." :type 'boolean :group 'evil) (make-variable-buffer-local 'evil-auto-indent) (defcustom evil-shift-width 4 - "The offset used by \\<evil-normal-state-map>\\[evil-shift-right] \ -and \\[evil-shift-left]." + "The number of columns by which a line is shifted. +This applies to the shifting operators \\[>] and \\[<]." :type 'integer :group 'evil) (make-variable-buffer-local 'evil-shift-width) (defcustom evil-shift-round t - "Whether \\<evil-normal-state-map>\\[evil-shift-right] \ -and \\[evil-shift-left] round to the nearest multiple \ -of `evil-shift-width'." + "Whether shifting rounds to the nearest multiple. +If non-nil, \\[>] and \\[<] adjust line indentation to the +nearest multiple of `evil-shift-width'." :type 'boolean :group 'evil) (make-variable-buffer-local 'evil-shift-round) (defcustom evil-indent-convert-tabs t - "If non-nil `evil-indent' converts between leading tabs and spaces. - Whether tabs are converted to spaces or vice versa depends on the - value of `indent-tabs-mode'." + "If non-nil, the \\[=] operator converts between leading tabs and spaces. +Whether tabs are converted to spaces or vice versa depends on the +value of `indent-tabs-mode'." :type 'boolean :group 'evil) @@ -199,13 +199,18 @@ cursor, or a list of the above." "Overwrite the current states default cursor.") (defcustom evil-repeat-move-cursor t - "Whether \"\\<evil-normal-state-map>\\[evil-repeat]\" \ -moves the cursor." + "Whether repeating commands with \\[.] may move the cursor. +If nil, the original cursor position is preserved, even if the command +normally would have moved the cursor." :type 'boolean :group 'evil) (defcustom evil-cross-lines nil - "Whether motions may cross newlines." + "Whether horizontal motions may move to other lines. +If non-nil, certain motions that conventionally operate in a single +line may move the cursor to other lines. Otherwise, they are +restricted to the current line. This applies to \\[h], \\[l], \\[f], +\\[F], \\[t], \\[T], \\[~]." :type 'boolean :group 'evil) @@ -215,18 +220,28 @@ moves the cursor." :group 'evil) (defcustom evil-move-cursor-back t - "Whether the cursor is moved backwards when exiting Insert state." + "Whether the cursor is moved backwards when exiting insert state. +If non-nil, the cursor moves \"backwards\" when exiting insert state, +so that it ends up on the character to the left. Otherwise it remains +in place, on the character to the right." :type 'boolean :group 'evil) (defcustom evil-move-beyond-eol nil - "Whether the cursor is allowed to move past the last character of \ -a line." + "Whether the cursor can move past the end of the line. +If non-nil, the cursor is allowed to move one character past the +end of the line, as in Emacs." :type 'boolean :group 'evil) (defcustom evil-respect-visual-line-mode nil "Whether movement commands respect `visual-line-mode'. +If non-nil, `visual-line-mode' is generally respected when it is +on. In this case, motions such as \\[j] and \\[k] navigate by +visual lines (on the screen) rather than \"physical\" +lines (defined by newline characters). If `nil', the setting of +`visual-line-mode' is ignored. + This variable must be set before Evil is loaded." :type 'boolean :group 'evil) @@ -237,13 +252,18 @@ This variable must be set before Evil is loaded." :group 'evil) (defcustom evil-kbd-macro-suppress-motion-error nil - "Whether left/right motions signal errors during keyboard-macro definition. -If this variable is set to non-nil, then the function -`evil-forward-char' and `evil-backward-char' do not signal -`end-of-line' or `beginning-of-line' errors when a keyboard macro -is being defined and/or it is being executed. This may be desired -because such an error would cause the macro definition/execution -being terminated." + "Whether left/right motions signal errors in keyboard macros. +This variable only affects beginning-of-line or end-of-line errors +regarding the motions \\[h] and \\[l] respectively. This may be +desired since such errors cause macro definition or execution to be +terminated. There are four possibilities: + +- `record': errors are suppressed when recording macros, but not when + replaying them. +- `replay': errors are suppressed when replaying macros, but not when + recording them. +- `t': errors are suppressed in both cases. +- `nil': errors are never suppressed." :type '(radio (const :tag "No" :value nil) (const :tag "Record" :value record) (const :tag "Replay" :value replay) @@ -251,22 +271,21 @@ being terminated." :group 'evil) (defcustom evil-track-eol t - "If non-nil line moves after a call to `evil-end-of-line' stay at eol. -This is analogous to `track-eol' but deals with the end-of-line -interpretation of evil." + "Whether \\[$] \"sticks\" the cursor to the end of the line. +If non-nil, vertical motions after \\[$] maintain the cursor at the +end of the line, even if the target line is longer. This is analogous +to `track-eol', but respects Evil's interpretation of end-of-line." :type 'boolean :group 'evil) (defcustom evil-mode-line-format 'before - "The position of the mode line tag. -Either a symbol or a cons-cell. If it is a symbol it should be -one of 'before, 'after or 'nil. 'before means the tag is -placed before the mode-list, 'after means it is placed after the -mode-list, and 'nil means no mode line tag. If it is a cons cell -it should have the form (WHERE . WHICH) where WHERE is either -'before or 'after and WHICH is a symbol in -`mode-line-format'. The tag is then placed right before or after -that symbol." + "The position of the state tag in the mode line. +If set to `before' or `after', the tag is placed at the beginning +or the end of the mode-line, respectively. If `nil', there is no +tag. Otherwise it should be a cons cell (WHERE . WHICH), where +WHERE is either `before' or `after', and WHICH is a symbol in +`mode-line-format'. The tag is then placed before or after that +symbol, respectively." :type '(radio :value 'before (const before) (const after) @@ -281,69 +300,73 @@ that symbol." "The thing-at-point symbol for double click selection. The double-click starts visual state in a special word selection mode. This symbol is used to determine the words to be -selected. Possible values are 'evil-word or -'evil-WORD." +selected. Possible values are `evil-word' or `evil-WORD'." :type 'symbol :group 'evil) (defcustom evil-bigword "^ \t\r\n" - "The characters to be considered as a big word. -This should be a regexp set without the enclosing []." + "The set of characters to be interpreted as WORD boundaries. +This is enclosed with square brackets and used as a regular +expression. By default, whitespace characters are considered +WORD boundaries." :type 'string :group 'evil) (make-variable-buffer-local 'evil-bigword) (defcustom evil-want-fine-undo nil - "Whether actions like \"cw\" are undone in several steps. -There are three possible choices. \"No\" means all changes made -during insert state including a possible delete after a change -operation are collected in a single undo step. If \"Yes\" is -selected, undo steps are determined according to Emacs heuristics -and no attempt is made to further aggregate changes. - -As of 1.2.14, the option \"fine\" is ignored and means the same -thing as \"No\". It used to be the case that fine would only try -to merge the first two changes in an insert operation. For -example, merging the delete and first insert operation after -\"cw\", but this option was removed because it did not work -consistently." + "Whether actions like \\[cw] are undone in several steps. +There are two possible choices. `nil' (\"no\") means that all +changes made during insert state, including a possible delete +after a change operation, are collected in a single undo step. +Non-nil (\"yes\") means that undo steps are determined according +to Emacs heuristics, and no attempt is made to aggregate changes. + +For backward compatibility purposes, the value `fine' is +interpreted as `nil'. This option was removed because it did not +work consistently." :type '(radio (const :tag "No" :value nil) (const :tag "Fine (obsolete)" :value fine) (const :tag "Yes" :value t)) :group 'evil) (defcustom evil-regexp-search t - "Whether to use regular expressions for searching." + "Whether to use regular expressions for searching in \\[/] and \\[?]." :type 'boolean :group 'evil) (defcustom evil-search-wrap t - "Whether search wraps around." + "Whether search with \\[/] and \\[?] wraps around the buffer. +If this is non-nil, search stops at the buffer boundaries." :type 'boolean :group 'evil) (defcustom evil-flash-delay 2 - "Time in seconds to flash search matches." + "Time in seconds to flash search matches after \\[n] and \\[N]." :type 'number :group 'evil) (defcustom evil-auto-balance-windows t - "If non-nil creating/deleting a window causes a rebalance." + "If non-nil window creation and deletion trigger rebalancing." :type 'boolean :group 'evil) (defcustom evil-split-window-below nil - "If non-nil split windows are created below." + "If non-nil split windows \\[:split] are created below." :type 'boolean :group 'evil) (defcustom evil-vsplit-window-right nil - "If non-nil vsplit windows are created to the right." + "If non-nil vertically split windows with \\[:vsplit] are +created to the right." :type 'boolean :group 'evil) (defcustom evil-esc-delay 0.01 - "Time in seconds to wait for another key after ESC." + "The time, in seconds, to wait for another key after escape. +If no further event arrives during this time, the event is +translated to \\[ESC]. Otherwise, it is translated according to +`input-decode-map'. This does not apply in Emacs state, and may +also be inhibited by setting `evil-inhibit-esc'." :type 'number :group 'evil) @@ -358,14 +381,14 @@ Used by `evil-esc-mode'.") "If non-nil, the \\e event will never be translated to 'escape.") (defcustom evil-intercept-esc 'always - "Whether Evil should intercept the ESC key. -In terminal, a plain ESC key and a meta-key-sequence both -generate the same event. In order to distinguish both Evil -modifies `input-decode-map'. This is necessary in terminal but -not in X mode. However, the terminal ESC is equivalent to C-[, so -if you want to use C-[ instead of ESC in X, then Evil must -intercept the ESC event in X, too. This variable determines when -Evil should intercept the event." + "Whether Evil should intercept the \\[ESC] key. +In the terminal, escape and a meta key sequence both generate the +same event. In order to distingush these, Evil uses +`input-decode-map'. It is not necessary to do this in a graphical +Emacs session. However, if you prefer to use \\[C-[] as escape (which +is identical to the terminal escape key code), this interception must +also happen in graphical Emacs sessions. Set this variable to +`always', `t' (only in the terminal) or `nil' (never intercept)." :type '(radio (const :tag "Never" :value nil) (const :tag "In terminal only" :value t) (const :tag "Always" :value always)) @@ -388,23 +411,24 @@ rate allows highlights to update while scrolling." '(not emacs insert replace) "The states in which the closing parenthesis at point should be highlighted. All states listed here highlight the closing parenthesis at -point (which is Vim default behavior), all others highlight the +point (which is Vim's default behavior). All others highlight the parenthesis before point (which is Emacs default behavior). If -this list contains the symbol 'not then its meaning is inverted, -i.e., all states listed here highlight the closing parenthesis +this list contains the symbol `not' then its meaning is inverted, +i.e. all states listed here highlight the closing parenthesis before point." :type '(repeat symbol) :group 'evil) (defcustom evil-kill-on-visual-paste t - "Whether `evil-visual-paste' adds the replaced text to the kill -ring, making it the default for the next paste. The default, t, -replicates the default vim behavior." + "Whether pasting in visual state adds the replaced text to the +kill ring, making it the default for the next paste. The default, +replicates the default Vim behavior." :type 'boolean :group 'evil) (defcustom evil-want-C-i-jump t - "Whether \"C-i\" jumps forward like in Vim." + "Whether \\[C-i] jumps forward in the jump list (like Vim). +Otherwise, \\[C-i] inserts a tab character." :type 'boolean :group 'evil :set #'(lambda (sym value) @@ -420,7 +444,10 @@ replicates the default vim behavior." (define-key evil-motion-state-map (kbd "C-i") 'evil-jump-forward)))))) (defcustom evil-want-C-u-scroll nil - "Whether \"C-u\" scrolls like in Vim." + "Whether \\[C-u] scrolls up (like Vim). +Otherwise, \\[C-u] applies a prefix argument. The binding of +\\[C-u] mirrors Emacs behaviour by default due to the relative +ubiquity of prefix arguments." :type 'boolean :group 'evil :set #'(lambda (sym value) @@ -436,7 +463,7 @@ replicates the default vim behavior." (define-key evil-motion-state-map (kbd "C-u") 'evil-scroll-up)))))) (defcustom evil-want-C-d-scroll t - "Whether \"C-d\" scrolls like in Vim." + "Whether \\[C-d] scrolls down (like Vim)." :type 'boolean :group 'evil :set #'(lambda (sym value) @@ -452,7 +479,10 @@ replicates the default vim behavior." (define-key evil-motion-state-map (kbd "C-d") 'evil-scroll-down)))))) (defcustom evil-want-C-u-delete nil - "Whether \\[C-u] deletes back to indentation in insert state." + "Whether \\[C-u] deletes back to indentation in insert state. +Otherwise, \\[C-u] applies a prefix argument. The binding of +\\[C-u] mirrors Emacs behaviour by default due to the relative +ubiquity of prefix arguments." :type 'boolean :group 'evil :set #'(lambda (sym value) @@ -468,7 +498,7 @@ replicates the default vim behavior." (define-key evil-insert-state-map (kbd "C-u") 'evil-delete-back-to-indentation)))))) (defcustom evil-want-C-w-delete t - "Whether \"C-w\" deletes a word in Insert state." + "Whether \\[C-w] deletes a word in Insert state." :type 'boolean :group 'evil :set #'(lambda (sym value) @@ -485,7 +515,7 @@ replicates the default vim behavior." (define-key evil-insert-state-map (kbd "C-w") 'evil-delete-backward-word)))))) (defcustom evil-want-C-w-in-emacs-state nil - "Whether \"C-w\" prefixes windows commands in Emacs state." + "Whether \\[C-w] prefixes windows commands in Emacs state." :type 'boolean :group 'evil :set #'(lambda (sym value) @@ -501,13 +531,13 @@ replicates the default vim behavior." (define-key evil-emacs-state-map (kbd "C-w") 'evil-window-map)))))) (defcustom evil-want-change-word-to-end t - "Whether \"cw\" behaves like \"ce\"." + "Whether \\[cw] behaves like \\[ce]." :type 'boolean :group 'evil) (defcustom evil-want-Y-yank-to-eol nil - "Whether \"Y\" yanks to the end of the line. -The default behavior is to yank the whole line." + "Whether \\[Y] yanks to the end of the line. +The default behavior is to yank the whole line, like Vim." :group 'evil :type 'boolean :initialize #'evil-custom-initialize-pending-reset @@ -519,8 +549,10 @@ The default behavior is to yank the whole line." 'evil-line-or-visual-line)))) (defcustom evil-disable-insert-state-bindings nil - "Whether insert state bindings should be used. Excludes -bindings for escape, delete and `evil-toggle-key'." + "Whether insert state bindings should be used. +Bindings for escape, delete and `evil-toggle-key' are always +available. If this is non-nil, default Emacs bindings are by and +large accessible in insert state." :group 'evil :type 'boolean :initialize #'evil-custom-initialize-pending-reset @@ -532,7 +564,8 @@ bindings for escape, delete and `evil-toggle-key'." :group 'evil) (defcustom evil-complete-all-buffers t - "Whether completion looks for matches in all buffers." + "Whether completion looks for matches in all buffers. +This applies to \\[C-n] and \\[C-p] in insert state." :type 'boolean :group 'evil) @@ -613,21 +646,20 @@ Must be readable by `read-kbd-macro'. For example: \"C-z\"." (defcustom evil-default-state 'normal "The default Evil state. -This is the state a mode comes up in when it is not listed -in `evil-emacs-state-modes', `evil-insert-state-modes' or -`evil-motion-state-modes'. The value may be one of `normal', -`insert', `visual', `replace', `operator', `motion' and -`emacs'." +This is the state a buffer starts in when it is not otherwise +configured (see `evil-set-initial-state' and +`evil-buffer-regexps'). The value may be one of `normal', +`insert', `visual', `replace', `operator', `motion' and `emacs'." :type 'symbol :group 'evil) (defcustom evil-buffer-regexps '(("^ \\*load\\*" . nil)) - "Regular expression determining the initial state for a buffer. + "Regular expressions determining the initial state for a buffer. Entries have the form (REGEXP . STATE), where REGEXP is a regular expression matching the buffer's name and STATE is one of `normal', -`insert', `visual', `replace', `operator', `motion', `emacs' and nil. -If STATE is nil, Evil is disabled in the buffer." +`insert', `visual', `replace', `operator', `motion', `emacs' and +`nil'. If STATE is `nil', Evil is disabled in the buffer." :type '(alist :key-type string :value-type symbol) :group 'evil) |
