Quantcast
Channel: Active questions tagged code-formatting - Meta Stack Overflow
Viewing all articles
Browse latest Browse all 180

Feature to remove an extra tab from every line when both indentation and code-block has been used

$
0
0

This has constantly come under my notice that newbies, who copy paste their code (let's assume it is well indented, for when the indentation is wrong, some nice guy comes along and indents it properly in the post or asks the OP to do that) and have just learnt the use of lang-<language> tend to write the code the following way:

    int main() {        std::cout << "OP has got nothing better to do";        return 0;    }

look closely at the extra tab at the start of the line

when in reality, it should have either been (umm... you might need to click on edit button to view the 2 different styles raw)
with code-block:

int main() {    std::cout << "OP has got nothing better to do"    return 0;}

or
with tab:

int main() {    std::cout << "OP has got nothing better to do";    return 0;}

I suggest we keep only one feature or at least when parsing the language when using code-blocks (```), remove one extra tab at the start of every line in the "edit mode" itself. Again, the assumption being that the code is well indented.


Viewing all articles
Browse latest Browse all 180

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>