For several reasons I prefer to configure my editor to insert spaces when TAB is pressed.
But recently I discovered that tabs should remain as tabs in make files.
How do I insert tab (\t
, not " "
) without reconfiguring editors each time I need to write make files?
I use the following editors: Emacs, Kate, gedit, and the Visual Studio editor.
Emacs normally uses both tabs and spaces to indent lines. If you prefer, all indentation can be made from spaces only. To request this, set indent-tabs-mode to nil . This is a per-buffer variable; altering the variable affects only the current buffer, but there is a default value which you can change as well.
To manually insert a tab in Emacs, use ctrl-Q TAB. control-Q causes the next key to be inserted rather than interpreted as a possible command.
The tab character can be inserted by holding the Alt and pressing 0 and 9 together.
To manually insert a tab in Emacs, use ctrl-Q TAB. control-Q causes the next key to be inserted rather than interpreted as a possible command.
Emacs' Makefile mode takes care of where to insert tabs and spaces as long as you press the right keys at the right places. Either that, or I missed some details in the question.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With