• Login
Community
  • Login

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

Scheduled Pinned Locked Moved General Discussion
4 Posts 2 Posters 804 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R
    Ralph Cramden
    last edited by Ralph Cramden Nov 27, 2019, 6:09 PM Nov 27, 2019, 6:07 PM

    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?

    1 Reply Last reply Reply Quote 0
    • R
      Ralph Cramden
      last edited by Nov 27, 2019, 6:30 PM

      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++

      1 Reply Last reply Reply Quote 0
      • A
        Alan Kilborn
        last edited by Nov 27, 2019, 6:38 PM

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

        acf0d8aa-b9df-48ee-8950-50f7e49b1145-image.png

        R 1 Reply Last reply Nov 27, 2019, 7:12 PM Reply Quote 2
        • R
          Ralph Cramden @Alan Kilborn
          last edited by Nov 27, 2019, 7:12 PM

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

          1 Reply Last reply Reply Quote 3
          2 out of 4
          • First post
            2/4
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors