I want to enter tab characters into my python code, at the start of lines, ideally by pressing the tab key

  • Try to search on the web for how to NOT have Notepad++ convert tab to spaces. There are only results for the other way around, people who want tabs converted to spaces. Is there any way, for example, when I enter a new line and press tab twice, I will get two tabs instead of all space characters?

  • I found out that any file not named *.py is immune from this problem. So I can copy myprog.py to myprog.bak, edit it and then copy it back. But that is unwieldy. Also, I apologize in advance for being the only person in the world that likes indenting with tabs. I have never had any problem doing it this way, and no one has ever explained to me why it is a taboo. I can compose a script anywhere on any text editor and it always works perfectly, except for Notepad++

  • You can change globally here, or just for Python files:


  • @Alan-Kilborn SOLVED! I realized that I had to select Python in the drop down box, not leave it at [Default]. Thanks very much!

Log in to reply