Questions tagged [auto-indent]

Auto-indentation is used in programming tools (IDEs and source code beautifiers) to automatically adjust the amount of leading white space on a line.

Auto-indentation is used in programming tools (IDEs and source code beautifiers) to automatically adjust the amount of leading white space on a line. In certain programming languages, such as Python, Haskell, and Occam, indentation is crucial for to demarcating the programming structure, and so auto-indentation plays an important role in facilitating this.

402 questions
35
votes
5 answers

How to avoid namespace content indentation in vim?

How to set vim to not indent namespace content in C++? namespace < identifier > { < statement_list > // Unwanted indentation } Surprisingly, 'cinoptions' doesn't provide a way to edit namespace content indentation.
freitass
  • 6,542
  • 5
  • 40
  • 44
34
votes
13 answers

Automatic indentation for Python in Notepad++

It doesn't act like Python's IDLE. Example: else: name = 'World' print 'Howdy', name print 'yay' but in Notepad++ else: # i press enter and this is what it does lands me here But I want to be able to do it like in IDLE: after the : I…
Joe
  • 341
  • 1
  • 3
  • 4
34
votes
1 answer

How do you fix intellij strange string indentation?

Intellij keeps on formatting my strings like this, its annoying... How do I fix it so the lines all line up? PreparedStatement p = s.prepare( "select distinct resource, uid, role " + "from role " + "where…
Jay
  • 19,649
  • 38
  • 121
  • 184
29
votes
7 answers

What setting in vim counteracts smartindent's refusal to indent # comments in shell scripts?

I recently started using vim 7 (previously vim 6) and the smartindent setting. For the most part, it works well, though I'm so used to typing a tab after an open brace that it is almost counter-productive. However, there is one piece of maniacal…
Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
28
votes
1 answer

Notepad++ plugin for auto format Css

I'm looking for a plugin for Notepad++ that will auto align (auto format) my Css files. Something similar to visual studio ctrl+k, ctrl+d effect only for notepad++. Anybody know something like that?
Gil Epshtain
  • 8,670
  • 7
  • 63
  • 89
21
votes
5 answers

Can VIM autoindent SQL?

"SQL Statement indentation good practice" appears to be the accepted format for writing SQL blocks. Is there a Vim indent/syntax file that would adhere to this standard, or at least be close? Currently my Vim left alights pretty much everything and…
Mike
  • 5,568
  • 11
  • 31
  • 45
21
votes
1 answer

indenting tags within in eclipse

I need Eclipse(Kepler) to indent html tags within ... when I hit Ctrl+Shift+F Currently, this: Insert title here