Top "Indentation" questions

Indenting is used to organize code by indicating blocks, closures, conditionals, and other constructs.

Carriage Return, Line Feed and New Line

What are the differences among Carriage Return, Line Feed and New line? Does it depend on OS? Why do we …

document indentation lf
How to edit HTML in Vim?

I'm new to Vim and I'm trying to get used to it. I just created a .vimrc file and got …

html vim indentation ftplugin
Is there any way to make Visual Studio stop indenting namespaces?

Visual Studio keeps trying to indent the code inside namespaces. For example: namespace Foo { void Bar(); void Bar() { } } Now, if …

c++ visual-studio namespaces indentation
Why parse error? Indentation?

I wrote this code: addNums key num = add [] key num where add res a:as b:bs | a == [] = res | otherwise = …

haskell pattern-matching indentation parse-error
Indenting heredocs with spaces

For personal development and projects I work on, we use four spaces instead of tabs. However, I need to use …

bash indentation spaces heredoc
Conditional with statement in Python

Is there a way to begin a block of code with a with statement, but conditionally? Something like: if needs_…

python conditional indentation conditional-statements with-statement
How to display indentation guides in Emacs?

I'm trying to switch to Emacs as my primary source-code editor. I really miss one thing (common in even much …

emacs indentation
IntelliJ Scala Plugin's case class indentation is absurd

When a case class has many fields and their names are long, it is often a good idea to write …

scala intellij-idea indentation case-class
Does Python have a built-in function for unindenting a multiline string?

Say I have the string s = """ Controller = require 'controller' class foo view: 'baz' class: 'bar' constructor: -> Controller.mix @ """ …

python string indentation
Sublime Text 3 Deleting Code when I hit Tab Key

When I highlight a block of code in Sublime Text 3 and press the Tab key, it doesn't indent the whole …

ide indentation sublimetext sublimetext3