.emacs で次の smart-tab defun を使用して、単語を補完するか、標準のタブを実行します。
(global-set-key [(tab)] 'smart-tab)
(defun smart-tab ()
"This smart tab is minibuffer compliant: it acts as usual in
the minibuffer. Else, if mark is active, indents region. Else if
point is at the end of a symbol, expands it. Else indents the
current line."
(interactive)
(if (minibufferp)
(unless (minibuffer-complete)
(dabbrev-expand nil))
(if mark-active
(indent-region (region-beginning)
(region-end))
(if (looking-at "\\_>")
(dabbrev-expand nil)
(indent-for-tab-command)))))
ただし、magit-status
git Git 統合に使用している場合、以前は、変更されたファイルを選択し、タブをクリックして、そのファイルの差分を即座に表示し、変更された内容を確認できました。ただし、今タブを試みるたびに、ミニバッファーに次のエラーが表示されます。
indent-relative: Buffer is read-only: #<buffer *magit: my_project*
これにアプローチし、上記のスマートタブを特定のモードにのみ適用することについて何か考えはありますか?
ありがとう!