All Questions
Tagged with code-formatting indentation
11
questions
49
votes
2
answers
549
views
Make Ctrl+K indent entire lines even when the first and last are only partially highlighted
When we select text for indenting, e.g.
and Ctrl+k, we get this:
I don't think our target audience is accustomed to this behavior, although I could be wrong. The following programs indent entire ...
3
votes
1
answer
85
views
Should the formatting style be mimicked when editing posts? [duplicate]
Sometimes I see code like this on Stackoverflow:
int main()
{
if(true){
return 0;
}
else{
return 1;
}
while(true){return -1;}
}
I will usually suggest this edit:
int main()
{
if(true){
...
0
votes
1
answer
117
views
Code indentation not working for that answer, neither tabs nor spaces
I've posted that answer: https://stackoverflow.com/a/17989511/2605780 and I was fighting a bit with indentation.
No matter what I've set, spaces or tabs, there is no indentation displayed. Both ...
14
votes
3
answers
102k
views
How to easily unindent a block of code?
When editing a post, sometimes the code block has been indented too far and it forces a horizontal scrollbar unnecessarily.
Is there a quick way to correct this type of indentation or do I still have ...
-8
votes
2
answers
1k
views
Should Stack Exchange switch to ACE Editor?
There is an Open Source code editor called ACE.
It is used in Github gist right now.
One feature they have that I love is box shaped text selection.
(Alt+Click drag to use)
This is hyper-useful ...
3
votes
2
answers
92
views
Add 4 spaces in the middle of the code
I know that if I press ctrl + k I automatically can add 4 spaces, but what if the code has already 4 spaces and I need to add 4 spaces more to it?
If I press tab in the SO editor it just gets me ...
4
votes
2
answers
128
views
Code button no longer unindenting like it used to?
As well as slightly different images for the vote counts on question the SO questions pages, the code button in the question editing doesn't seem to be unindenting like it used to do.
Is it just me, ...
1
vote
0
answers
67
views
Code indenting just appears to be broken here [duplicate]
Possible Duplicate:
Code blocks don’t show leading spaces in IE 9 (and 10)
I was trying to edit this person's post. All the spacing is there but it is ignoring all my spaces and indenting. Try ...
1
vote
0
answers
284
views
Start new lines of code block with same indent as previous line [duplicate]
Possible Duplicates:
Automatic code reindent button
AutoIndent of Source Code
I realize that you can already indent code blocks with the 'code sample' button or ctrl+K, but that's something you ...
-5
votes
2
answers
2k
views
I can't post my question because of the "indentation"! How do I fix this?
I entered over 100 lines of code for my question, and then pressed "Submit" on Stack Overflow. The website gave me an error, saying that my code was formatted wrong. It suggested that I use the Ctrl+K ...
1
vote
1
answer
119
views
Provide a warning for incomplete indentation when they miss it by that much
Would you believe that someone indented their code with three spaces, and got an error message letting them know that it won't work?
Find that hard to believe? Ok, would you believe they got a tool-...