Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 200

Indenting is used to organize code by indicating blocks, closures, conditionals, and other constructs. It makes code easier to read, and in some languages is used to handle control flow.

11 votes
Accepted

Better indentation and navigation in assembly source code

If you want to set indentation for asm-mode, note that you cannot use tab-width but tab-stop-list that specifies spaces that 1 tab, 2 tabs, 3 tabs... can display: (setq tab-stop-list '(4 8 12 16 20 24 … sample setup: (require 'asm-mode) (add-hook 'asm-mode-hook (lambda () (setq indent-tabs-mode nil) ; use spaces to indent (electric-indent-mode -1) ; indentation
Tu Do's user avatar
  • 6,882
2 votes

Fixing forced indentation in shell-script-mode for tcsh

By default, emacs 24.4 turns on electric-indent-mode which makes it indent automatically. Disable it and you won't have that problem anymore: (add-hook 'after-change-major-mode-hook (lambda() (electr …
Tu Do's user avatar
  • 6,882
8 votes

How to pretty-format code (auto-insert newlines, indent, etc)?

(point-max) "python -m json.tool" (buffer-name) t))) Emacs does not have formatting tool for programming languages (except for Lisp), only indentation
Tu Do's user avatar
  • 6,882