Книга: Learning GNU Emacs, 3rd Edition
7.1.5 Tabs and Spaces
7.1.5 Tabs and Spaces
Another characteristic of Emacs's default behavior is the fact that it may insert a combination of tabs and spaces when you press Tab. Try to erase a few "tabs" and you'll see that often it isn't one character, but the equivalent number of spaces or a combination of tabs and spaces. Of course, this largely depends on the tab stops compared to setting of the tab-width
variable. If you set tab stops that are multiples of six while you have a tab-width
of 4 or 8, Emacs is going to have to use a combination of tabs and spaces to achieve the desired tab stops.
If you want Emacs to insert spaces for indentation rather than tab characters, add this line to your .emacs file:
(setq-default indent-tabs-mode nil)
With this setting, Emacs inserts only spaces when you press Tab. Pressing C-q Tab instead inserts a literal tab character. It's safe to say you won't enter tab characters accidentally with this setting.
- 7.1.6 Changing Tabs to Spaces (and Vice Versa)
- 7.1.1 How Emacs 21 Handles Tabs by Default
- 7.1 Using Tabs
- Разработка приложений баз данных InterBase на Borland Delphi
- Open Source Insight and Discussion
- Introduction to Microprocessors and Microcontrollers
- Chapter 6. Traversing of tables and chains
- Chapter 8. Saving and restoring large rule-sets
- Chapter 11. Iptables targets and jumps
- Chapter 5 Installing and Configuring VirtualCenter 2.0
- Chapter 16. Commercial products based on Linux, iptables and netfilter
- Appendix A. Detailed explanations of special commands