EpsilonVector
EpsilonVector

Reputation: 4053

Make Emacs indent code in every possible situation

I can't seem to get Emacs to just use Tab for indentation. I set c-tab-always-indent and tab-always-indent to true, but still I have to use C-q Tab to indent a line of code.

What do I need to do to just make Tab indent in every possible situation?

Upvotes: 0

Views: 126

Answers (1)

Daniel Brockman
Daniel Brockman

Reputation: 19290

In Emacs, "indent" means having Emacs automatically determine the indentation for the current line. What C-q TAB does is simply insert a tab character. If that’s what you want, you could bind TAB to self-insert-command:

(global-set-key (kbd "TAB") 'self-insert-command)
(define-key c-mode-base-map (kbd "TAB") 'self-insert-command)

Upvotes: 2

Related Questions