Search Results
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 |
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.
1
vote
Accepted
Disable `indent-relative`
If you want to use tab-to-tab-stop, just do so! tab-to-tab-stop and indent-relative are different functions, designed to do different things. Different modes will bind one or the other (or something e …
6
votes
Accepted
Python cycling through indentation
If you follow through the code of indent-for-tab-command, you'll see the indentation is actually done by a indent-line-function. In Python mode, this is python-indent-line-function. …
1
vote
Accepted
Manual indentation in LaTeX mode
this:
(add-hook 'LaTeX-mode-hook
(lambda ()
(setq indent-tabs-mode t
indent-line-function 'tab-to-tab-stop
tab-width 4)))
If you're still getting automatic indentation …
4
votes
Accepted
Indentation of description lists
It's not documented in the manual, but its documentation string reads:
Maximum indentation for the second line of a description list. … When the indentation would be larger than this, it will become
5 characters instead. …
15
votes
Accepted
Org-mode : disable indentation when promoting and demoting trees + subtrees
Set the variable org-adapt-indentation to nil. … You can change the value via M-x customize-variable org-adapt-indentation. …
0
votes
Mapping RET to use the same indentation level as the previous line
Indentation is done using the value of ‘indent-line-function’.
In programming language modes, this is the same as TAB. …
2
votes
Accepted
New line and indent without electric mode
In a terminal the value of [(return)] doesn't apply. You need to use (kbd "RET") instead. (or probably other variations would do, but not [(return)]).
1
vote
Accepted
How to define global key binding for `C-c >` and `C-c <` using `defhydra`
Then you just need to define the hydra in the mode-map for that mode:
(defhydra python-indent (my-mode-map "C-c")
"Adjust python indentation."
(">" python-indent-shift-right "right")
("<" python-indent-shift-left …
2
votes
Accepted
Unexpected indentation in python chunks
In order for polymode to know what mode you're in, and what the appropriate indentation for that mode is, it needs to know the mode of the current span, and, most crucially here, what the extent of that … They are unwanted by you, but necessary to bring the indentation out to match the beginning of [SessionName]. …