0

Every time I write a function in notepad++ it won't indent for me even when I'm pretty sure I have auto-indent selected. I then manually do 4 spaces and do two print commands but it's not working. It says 'unexpected indent' in Powershell. Here's what I'm using:

def print_twice():
    print "hi"
    print "hi"

print_twice()
jramirez
  • 8,537
  • 7
  • 33
  • 46
user2925800
  • 105
  • 3
  • 11

4 Answers4

2

You can set your notepad++ to always convert tabs to whitespace, or to show whitespace characters. Please see answers in this question

Community
  • 1
  • 1
Peter Petrik
  • 9,701
  • 5
  • 41
  • 65
0

On your notepad++, go to Settings> Preferences > Tab Settings and Check "replace by space" making sure "tab Size" is set to 4. This has worked for me.

Shreyk
  • 1
  • 1
0

In Notepad++, Go to Settings>>Preferences. In the dialog box that will appear select Tab Settings, check the 'Replace by space' checkbox. You can alter the number of spaces by clicking on the Tab space: 4 link (whereby the existing tab space is 4 spaces). Close the dialog box. That is it.

0

Just in case if you dont see 'tab settings' Under "Preferences", as myself, then you just need to look for.

Notepad++ > Settings > Preferences > language > Tab settings

Vizag
  • 375
  • 2
  • 6
  • 22