emacs 粘贴时一直indenting region ... 感觉好烦

hi,各位emacs道友们好。 最近在做的项目文件都很大,我发现当文件内容很多的时候做粘贴操作的时候,emacs就会一直indenting region… 感觉好费时间,我用的机器是在linux环境下,折腾好久实在搞不定,请问如何解决。

这个应该是major/minor-mode的问题,所以,你在编辑什么文件,用了什么major-mode

你好,我写的是vue代码,用的是jajor-mode 是 web-mode.nimor-mode 就有很多了。

应该是在终端远程使用 emacs 吧?

本质上粘贴就退化成一个个字输入了

不是的啊,我用的是 gun/linux

是不是用了auto-indent之类的功能,或者是minor mode里有类似的

evil-mode 吗?

不是的,我用的是 emacs 不加 vim.

贴一下 C-h m (describe-mode) 之后的结果给大家看看?

Enabled minor modes: Async-Bytecomp-Package Auto-Composition Auto-Compression Auto-Encryption Beacon Blink-Cursor Company Company-Box Delete-Selection Diff-Auto-Refine Electric-Indent Electric-Pair Emmet File-Name-Shadow Font-Lock Global-Auto-Revert Global-Company Global-Eldoc Global-Font-Lock Global-Git-Commit Global-Hl-Line Global-Hl-Todo Global-Hungry-Delete Global-Jump-Tree Global-Linum Global-Magit-File Helm Hl-Todo Hungry-Delete Ivy Jump-Tree Line-Number Linum Magit-Auto-Revert Magit-File Menu-Bar Mouse-Wheel Override-Global Pallet Popwin Projectile Shell-Dirtrack Show-Paren Smartparens Smartparens-Global Tooltip Transient-Mark Which-Key

(Information about these minor modes follows the major mode info.)

Web mode defined in ‘web-mode.el’: Major mode for editing web templates.

In addition to any hooks its parent mode ‘web-mode-prog-mode’ might have run, this mode runs the hook ‘web-mode-hook’, as the final or penultimate step during initialization.

key binding


C-c Prefix Command ESC Prefix Command

C-M-j web-mode-comment-indent-new-line M-; web-mode-comment-or-uncomment M-j web-mode-comment-indent-new-line

C-c C-a Prefix Command C-c C-b Prefix Command C-c C-d Prefix Command C-c C-e Prefix Command C-c C-f web-mode-fold-or-unfold C-c C-h web-mode-buffer-highlight C-c TAB web-mode-buffer-indent C-c C-j web-mode-jshint C-c C-l web-mode-file-link C-c RET web-mode-mark-and-expand C-c C-n web-mode-navigate C-c C-r web-mode-reload C-c C-s web-mode-snippet-insert C-c C-t Prefix Command C-c C-w web-mode-whitespaces-show

C-M-q prog-indent-sexp

C-c C-t a web-mode-tag-attributes-sort C-c C-t b web-mode-tag-beginning C-c C-t e web-mode-tag-end C-c C-t m web-mode-tag-match C-c C-t n web-mode-tag-next C-c C-t p web-mode-tag-previous C-c C-t s web-mode-tag-select

C-c C-e + web-mode-element-extract C-c C-e - web-mode-element-contract C-c C-e / web-mode-element-close C-c C-e I web-mode-element-insert-at-point C-c C-e a web-mode-element-content-select C-c C-e b web-mode-element-beginning C-c C-e c web-mode-element-clone C-c C-e d web-mode-element-child C-c C-e e web-mode-element-end C-c C-e f web-mode-element-children-fold-or-unfold C-c C-e i web-mode-element-insert C-c C-e k web-mode-element-kill C-c C-e m web-mode-element-mute-blanks C-c C-e n web-mode-element-next C-c C-e p web-mode-element-previous C-c C-e r web-mode-element-rename C-c C-e s web-mode-element-select C-c C-e t web-mode-element-transpose C-c C-e u web-mode-element-parent C-c C-e v web-mode-element-vanish C-c C-e w web-mode-element-wrap

C-c C-d a web-mode-dom-apostrophes-replace C-c C-d d web-mode-dom-errors-show C-c C-d e web-mode-dom-entities-replace C-c C-d n web-mode-dom-normalize C-c C-d q web-mode-dom-quotes-replace C-c C-d t web-mode-dom-traverse C-c C-d x web-mode-dom-xpath

C-c C-b b web-mode-block-beginning C-c C-b c web-mode-block-close C-c C-b e web-mode-block-end C-c C-b k web-mode-block-kill C-c C-b n web-mode-block-next C-c C-b p web-mode-block-previous C-c C-b s web-mode-block-select

C-c C-a b web-mode-attribute-beginning C-c C-a e web-mode-attribute-end C-c C-a i web-mode-attribute-insert C-c C-a k web-mode-attribute-kill C-c C-a n web-mode-attribute-next C-c C-a p web-mode-attribute-previous C-c C-a s web-mode-attribute-select C-c C-a t web-mode-attribute-transpose

Async-Bytecomp-Package minor mode (no indicator): Byte compile asynchronously packages installed with package.el. Async compilation of packages can be controlled by ‘async-bytecomp-allowed-packages’.

(fn &optional ARG) Auto-Composition minor mode (no indicator): Toggle Auto Composition mode. With a prefix argument ARG, enable Auto Composition mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

When Auto Composition mode is enabled, text characters are automatically composed by functions registered in ‘composition-function-table’.

You can use ‘global-auto-composition-mode’ to turn on Auto Composition mode in all buffers (this is the default). Auto-Compression minor mode (no indicator): Toggle Auto Compression mode. With a prefix argument ARG, enable Auto Compression mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

Auto Compression mode is a global minor mode. When enabled, compressed files are automatically uncompressed for reading, and compressed when writing. Auto-Encryption minor mode (no indicator): Toggle automatic file encryption/decryption (Auto Encryption mode). With a prefix argument ARG, enable Auto Encryption mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

(fn &optional ARG) Beacon minor mode (indicator (*)): Toggle Beacon mode on or off. With a prefix argument ARG, enable Beacon mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil, and toggle it if ARG is ‘toggle’.

Uses keymap ‘beacon-mode-map’, which is not currently defined.

(fn &optional ARG) Blink-Cursor minor mode (no indicator): Toggle cursor blinking (Blink Cursor mode). With a prefix argument ARG, enable Blink Cursor mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

If the value of ‘blink-cursor-blinks’ is positive (10 by default), the cursor stops blinking after that number of blinks, if Emacs gets no input during that time.

See also ‘blink-cursor-interval’ and ‘blink-cursor-delay’.

This command is effective only on graphical frames. On text-only terminals, cursor blinking is controlled by the terminal.

(fn &optional ARG) Company minor mode (indicator company): “complete anything”; is an in-buffer completion framework. Completion starts automatically, depending on the values ‘company-idle-delay’ and ‘company-minimum-prefix-length’.

Completion can be controlled with the commands: ‘company-complete-common’, ‘company-complete-selection’, ‘company-complete’, ‘company-select-next’, ‘company-select-previous’. If these commands are called before ‘company-idle-delay’, completion will also start.

Completions can be searched with ‘company-search-candidates’ or ‘company-filter-candidates’. These can be used while completion is inactive, as well.

The completion data is retrieved using ‘company-backends’ and displayed using ‘company-frontends’. If you want to start a specific backend, call it interactively or use ‘company-begin-backend’.

By default, the completions list is sorted alphabetically, unless the backend chooses otherwise, or ‘company-transformers’ changes it later.

regular keymap (‘company-mode-map’):

key binding


keymap during active completions (‘company-active-map’):

key binding


C-g company-abort C-h company-show-doc-buffer TAB company-select-next C-n company-select-next C-p company-select-previous C-s company-search-candidates C-w company-show-location ESC Prefix Command S-TAB company-select-previous company-select-previous company-select-next-or-abort ignore ignore company-show-doc-buffer company-complete-mouse company-select-mouse Prefix Command company-select-next company-select-previous-or-abort ignore ignore

company-box-doc-manually company-previous-page company-next-page

C-M-s company-filter-candidates ESC ESC Prefix Command M-0 … M-9 company-complete-number

M-ESC ESC company-abort

(fn &optional ARG) Company-Box minor mode (indicator company-box): Company-box minor mode.

(fn &optional ARG) Delete-Selection minor mode (no indicator): Toggle Delete Selection mode. Interactively, with a prefix argument, enable Delete Selection mode if the prefix argument is positive, and disable it otherwise. If called from Lisp, toggle the mode if ARG is ‘toggle’, disable the mode if ARG is a non-positive integer, and enable the mode otherwise (including if ARG is omitted or nil or a positive integer).

When Delete Selection mode is enabled, typed text replaces the selection if the selection is active. Otherwise, typed text is just inserted at point regardless of any selection.

See ‘delete-selection-helper’ and ‘delete-selection-pre-hook’ for information on adapting behavior of commands in Delete Selection mode.

(fn &optional ARG) Diff-Auto-Refine minor mode (no indicator): Toggle automatic diff hunk highlighting (Diff Auto Refine mode). With a prefix argument ARG, enable Diff Auto Refine mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

Diff Auto Refine mode is a buffer-local minor mode used with ‘diff-mode’. When enabled, Emacs automatically highlights changes in detail as the user visits hunks. When transitioning from disabled to enabled, it tries to refine the current hunk, as well.

(fn &optional ARG) Electric-Indent minor mode (no indicator): Toggle on-the-fly reindentation (Electric Indent mode). With a prefix argument ARG, enable Electric Indent mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

When enabled, this reindents whenever the hook ‘electric-indent-functions’ returns non-nil, or if you insert a character from ‘electric-indent-chars’.

This is a global minor mode. To toggle the mode in a single buffer, use ‘electric-indent-local-mode’. Electric-Pair minor mode (no indicator): Toggle automatic parens pairing (Electric Pair mode). With a prefix argument ARG, enable Electric Pair mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

Electric Pair mode is a global minor mode. When enabled, typing an open parenthesis automatically inserts the corresponding closing parenthesis, and vice versa. (Likewise for brackets, etc.). If the region is active, the parentheses (brackets, etc.) are inserted around the region instead.

To toggle the mode in a single buffer, use ‘electric-pair-local-mode’.

(fn &optional ARG) Emmet minor mode (indicator Emmet): Minor mode for writing HTML and CSS markup. With emmet for HTML and CSS you can write a line like

ul#name>li.item*2

and have it expanded to

This minor mode defines keys for quick access:

key binding


C-c Prefix Command C-j emmet-expand-line emmet-prev-edit-point emmet-next-edit-point emmet-expand-line

C-c C-c Prefix Command

C-c C-c w emmet-wrap-with-markup

Home page URL ‘http://www.emacswiki.org/emacs/Emmet’.

See also ‘emmet-expand-line’. File-Name-Shadow minor mode (no indicator): Toggle file-name shadowing in minibuffers (File-Name Shadow mode). With a prefix argument ARG, enable File-Name Shadow mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

File-Name Shadow mode is a global minor mode. When enabled, any part of a filename being read in the minibuffer that would be ignored (because the result is passed through ‘substitute-in-file-name’) is given the properties in ‘file-name-shadow-properties’, which can be used to make that portion dim, invisible, or otherwise less visually noticeable. Font-Lock minor mode (no indicator): Toggle syntax highlighting in this buffer (Font Lock mode). With a prefix argument ARG, enable Font Lock mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

When Font Lock mode is enabled, text is fontified as you type it:

  • Comments are displayed in ‘font-lock-comment-face’;
  • Strings are displayed in ‘font-lock-string-face’;
  • Certain other expressions are displayed in other faces according to the value of the variable ‘font-lock-keywords’.

To customize the faces (colors, fonts, etc.) used by Font Lock for fontifying different parts of buffer text, use M-x customize-face.

You can enable Font Lock mode in any major mode automatically by turning on in the major mode’s hook. For example, put in your ~/.emacs:

(add-hook 'c-mode-hook 'turn-on-font-lock)

Alternatively, you can use Global Font Lock mode to automagically turn on Font Lock mode in buffers whose major mode supports it and whose major mode is one of ‘font-lock-global-modes’. For example, put in your ~/.emacs:

(global-font-lock-mode t)

Where major modes support different levels of fontification, you can use the variable ‘font-lock-maximum-decoration’ to specify which level you generally prefer. When you turn Font Lock mode on/off the buffer is fontified/defontified, though fontification occurs only if the buffer is less than ‘font-lock-maximum-size’.

To add your own highlighting for some major mode, and modify the highlighting selected automatically via the variable ‘font-lock-maximum-decoration’, you can use ‘font-lock-add-keywords’.

To fontify a buffer, without turning on Font Lock mode and regardless of buffer size, you can use M-x font-lock-fontify-buffer.

To fontify a block (the function or paragraph containing point, or a number of lines around point), perhaps because modification on the current line caused syntactic change on other lines, you can use M-o M-o.

You can set your own default settings for some mode, by setting a buffer local value for ‘font-lock-defaults’, via its mode hook.

The above is the default behavior of ‘font-lock-mode’; you may specify your own function which is called when ‘font-lock-mode’ is toggled via ‘font-lock-function’. Global-Auto-Revert minor mode (no indicator): Toggle Global Auto-Revert Mode. With a prefix argument ARG, enable Global Auto-Revert Mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

Global Auto-Revert Mode is a global minor mode that reverts any buffer associated with a file when the file changes on disk. Use ‘auto-revert-mode’ to revert a particular buffer.

If ‘global-auto-revert-non-file-buffers’ is non-nil, this mode may also revert some non-file buffers, as described in the documentation of that variable. It ignores buffers with modes matching ‘global-auto-revert-ignore-modes’, and buffers with a non-nil value of ‘global-auto-revert-ignore-buffer’.

When a buffer is reverted, a message is generated. This can be suppressed by setting ‘auto-revert-verbose’ to nil.

This function calls the hook ‘global-auto-revert-mode-hook’. It displays the text that ‘global-auto-revert-mode-text’ specifies in the mode line.

(fn &optional ARG) Global-Company minor mode (no indicator): Toggle Company mode in all buffers. With prefix ARG, enable Global Company mode if ARG is positive; otherwise, disable it. If called from Lisp, enable the mode if ARG is omitted or nil.

Company mode is enabled in all buffers where ‘company-mode-on’ would do it. See ‘company-mode’ for more information on Company mode.

(fn &optional ARG) Global-Eldoc minor mode (no indicator): Toggle Eldoc mode in all buffers. With prefix ARG, enable Global Eldoc mode if ARG is positive; otherwise, disable it. If called from Lisp, enable the mode if ARG is omitted or nil.

Eldoc mode is enabled in all buffers where ‘turn-on-eldoc-mode’ would do it. See ‘eldoc-mode’ for more information on Eldoc mode.

(fn &optional ARG) Global-Font-Lock minor mode (no indicator): Toggle Font-Lock mode in all buffers. With prefix ARG, enable Global Font-Lock mode if ARG is positive; otherwise, disable it. If called from Lisp, enable the mode if ARG is omitted or nil.

Font-Lock mode is enabled in all buffers where ‘turn-on-font-lock-if-desired’ would do it. See ‘font-lock-mode’ for more information on Font-Lock mode. Global-Git-Commit minor mode (no indicator): Edit Git commit messages. This global mode arranges for ‘git-commit-setup’ to be called when a Git commit message file is opened. That usually happens when Git uses the Emacsclient as $GIT_EDITOR to have the user provide such a commit message.

(fn &optional ARG) Global-Hl-Line minor mode (no indicator): Toggle line highlighting in all buffers (Global Hl-Line mode). With a prefix argument ARG, enable Global Hl-Line mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

If ‘global-hl-line-sticky-flag’ is non-nil, Global Hl-Line mode highlights the line about the current buffer’s point in all live windows.

Global-Hl-Line mode uses the functions ‘global-hl-line-highlight’ and ‘global-hl-line-maybe-unhighlight’ on ‘post-command-hook’.

(fn &optional ARG) Global-Hl-Todo minor mode (no indicator): Toggle Hl-Todo mode in all buffers. With prefix ARG, enable Global Hl-Todo mode if ARG is positive; otherwise, disable it. If called from Lisp, enable the mode if ARG is omitted or nil.

Hl-Todo mode is enabled in all buffers where ‘hl-todo–turn-on-mode-if-desired’ would do it. See ‘hl-todo-mode’ for more information on Hl-Todo mode.

(fn &optional ARG) Global-Hungry-Delete minor mode (no indicator): Toggle Hungry-Delete mode in all buffers. With prefix ARG, enable Global Hungry-Delete mode if ARG is positive; otherwise, disable it. If called from Lisp, enable the mode if ARG is omitted or nil.

Hungry-Delete mode is enabled in all buffers where ‘turn-on-hungry-delete-mode’ would do it. See ‘hungry-delete-mode’ for more information on Hungry-Delete mode. Global-Jump-Tree minor mode (no indicator): Toggle Jump-Tree mode in all buffers. With prefix ARG, enable Global Jump-Tree mode if ARG is positive; otherwise, disable it. If called from Lisp, enable the mode if ARG is omitted or nil.

Jump-Tree mode is enabled in all buffers where ‘turn-on-jump-tree-mode’ would do it. See ‘jump-tree-mode’ for more information on Jump-Tree mode.

(fn &optional ARG) Global-Linum minor mode (no indicator): Toggle Linum mode in all buffers. With prefix ARG, enable Global Linum mode if ARG is positive; otherwise, disable it. If called from Lisp, enable the mode if ARG is omitted or nil.

Linum mode is enabled in all buffers where ‘linum-on’ would do it. See ‘linum-mode’ for more information on Linum mode.

(fn &optional ARG) Global-Magit-File minor mode (no indicator): Toggle Magit-File mode in all buffers. With prefix ARG, enable Global Magit-File mode if ARG is positive; otherwise, disable it. If called from Lisp, enable the mode if ARG is omitted or nil.

Magit-File mode is enabled in all buffers where ‘magit-file-mode-turn-on’ would do it. See ‘magit-file-mode’ for more information on Magit-File mode.

(fn &optional ARG) Helm minor mode (indicator Helm): Toggle generic helm completion.

All functions in Emacs that use ‘completing-read’ or ‘read-file-name’ and friends will use helm interface when this mode is turned on.

However you can modify this behavior for functions of your choice with ‘helm-completing-read-handlers-alist’.

Also commands using ‘completion-in-region’ will be helmized when ‘helm-mode-handle-completion-in-region’ is non nil, you can modify this behavior with ‘helm-mode-no-completion-in-region-in-modes’.

Called with a positive arg, turn on unconditionally, with a negative arg turn off. You can turn it on with ‘helm-mode’.

Some crap emacs functions may not be supported, e.g ‘ffap-alternate-file’ and maybe others You can add such functions to ‘helm-completing-read-handlers-alist’ with a nil value.

About ‘ido-mode’: When you are using ‘helm-mode’, DO NOT use ‘ido-mode’, instead if you want some commands use ‘ido’, add these commands to ‘helm-completing-read-handlers-alist’ with ‘ido’ as value.

Note: This mode is incompatible with Emacs23.

(fn &optional ARG) Hl-Todo minor mode (no indicator): Highlight TODO and similar keywords in comments and strings.

(fn &optional ARG) Hungry-Delete minor mode (indicator h): Minor mode to enable hungry deletion. This will delete all whitespace after or before point when the deletion command is executed. Ivy minor mode (indicator ivy): Toggle Ivy mode on or off. Turn Ivy mode on if ARG is positive, off otherwise. Turning on Ivy mode sets ‘completing-read-function’ to ‘ivy-completing-read’.

Global bindings: key binding


Prefix Command

ivy-switch-buffer ivy-switch-buffer-other-window

Minibuffer bindings: key binding


C-c Prefix Command C-g minibuffer-keyboard-quit TAB ivy-partial-or-done C-j ivy-alt-done RET ivy-done C-o hydra-ivy/body C-r ivy-reverse-i-search C-s ivy-next-line-or-history C-v ivy-scroll-up-command ESC Prefix Command SPC self-insert-command $ ivy-magic-read-file-env S-SPC ivy-restrict-to-matches C-’ ivy-avy ignore ivy-mouse-done ivy-mouse-dispatching-done ivy-scroll-up-command ivy-scroll-down-command Prefix Command ivy-forward-char

C-c C-a ivy-toggle-ignore C-c C-o ivy-occur C-c C-s ivy-rotate-sort

ivy-backward-delete-char ivy-backward-kill-word ivy-beginning-of-buffer ivy-backward-delete-char ivy-delete-char ivy-help ivy-end-of-buffer ivy-forward-char ivy-kill-line ivy-kill-ring-save ivy-kill-whole-line ivy-kill-word ivy-next-line ivy-previous-line ivy-scroll-down-command ivy-scroll-up-command

C-M-a ivy-read-action C-M-j ivy-immediate-done M-RET ivy-call C-M-n ivy-next-line-and-call C-M-o ivy-dispatching-call C-M-p ivy-previous-line-and-call C-M-y ivy-insert-current-full M-i ivy-insert-current M-j ivy-yank-word M-n ivy-next-history-element M-o ivy-dispatching-done M-p ivy-previous-history-element M-r ivy-toggle-regexp-quote M-v ivy-scroll-down-command

(fn &optional ARG) Jump-Tree minor mode (indicator Jump-Tree): Toggle jump-tree mode. With no argument, this command toggles the mode. A positive prefix argument turns the mode on. A negative prefix argument turns it off. jump-tree-mode replaces Emacs’ standard position feature with a more powerful yet easier to use version, that treats the position history as what it is: a tree. The following keys are available in ‘jump-tree-mode’: key binding


C-x Prefix Command ESC Prefix Command

C-x j jump-tree-visualize

M-, jump-tree-jump-prev M-. jump-tree-jump-next

Within the jump-tree visualizer, the following keys are available: key binding


C-b jump-tree-visualize-switch-branch-left C-f jump-tree-visualize-switch-branch-right C-n jump-tree-visualize-jump-next C-p jump-tree-visualize-jump-prev C-q jump-tree-visualizer-abort ESC Prefix Command , jump-tree-visualizer-scroll-left . jump-tree-visualizer-scroll-right < jump-tree-visualizer-scroll-left

  jump-tree-visualizer-scroll-right

b jump-tree-visualize-switch-branch-left f jump-tree-visualize-switch-branch-right n jump-tree-visualize-jump-next p jump-tree-visualize-jump-prev q jump-tree-visualizer-quit s jump-tree-visualizer-selection-mode t jump-tree-visualizer-toggle-timestamps jump-tree-visualize-jump-prev-to-x jump-tree-visualize-jump-next jump-tree-visualize-switch-branch-left jump-tree-visualizer-mouse-set jump-tree-visualizer-scroll-up jump-tree-visualizer-scroll-down Prefix Command jump-tree-visualize-switch-branch-right jump-tree-visualize-jump-prev

M-{ jump-tree-visualize-jump-prev-to-x

jump-tree-visualize-switch-branch-left jump-tree-visualize-jump-prev-to-x jump-tree-visualize-switch-branch-right jump-tree-visualize-jump-next jump-tree-visualize-jump-prev

(fn &optional ARG) Line-Number minor mode (no indicator): Toggle line number display in the mode line (Line Number mode). With a prefix argument ARG, enable Line Number mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

Line numbers do not appear for very large buffers and buffers with very long lines; see variables ‘line-number-display-limit’ and ‘line-number-display-limit-width’.

(fn &optional ARG) Linum minor mode (no indicator): Toggle display of line numbers in the left margin (Linum mode). With a prefix argument ARG, enable Linum mode if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil.

Linum mode is a buffer-local minor mode.

(fn &optional ARG) Magit-Auto-Revert minor mode (no indicator): Toggle Magit Auto Revert mode. If called interactively, enable Magit Auto Revert mode if ARG is positive, and disable it if ARG is zero or negative. If called from Lisp, also enable the mode if ARG is omitted or nil, and toggle it if ARG is ‘toggle’; disable the mode otherwise.

Magit Auto Revert mode is a global minor mode that reverts buffers associated with a file that is located inside a Git repository when the file changes on disk. Use ‘auto-revert-mode’ to revert a particular buffer. Or use ‘global-auto-revert-mode’ to revert all file-visiting buffers, not just those that visit a file located inside a Git repository.

… (fn &optional ARG)

内容太多了,我还删除了好多东西呢!

至少ele…-indent算一个,别的不清楚

我也是这么想的,那我怎么把这个minor mode 取消掉啊

aggressive-indent-mode和electric-indent-mode都关掉。

全局:(electric-indent-mode -1)

web-mode: (add-hook web-mode-hook (lambda () (electric-indent-local-mode -1)))

1 个赞

谢谢你啊。。。。

今天实验了一下,在web-mode中拷贝文字的时候,依然会自动格式化。不知道是什么原因?如何解决?

我这里把这两个都关了是不会自动indent的

编辑html没什么问题,但是在web-mode写js代码还是会的哦,你在试一下js代码部分。

好像不会。。