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 1.3k 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.
    • Ralph CramdenR Offline
      Ralph Cramden
      last edited by Ralph Cramden

      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
      • Ralph CramdenR Offline
        Ralph Cramden
        last edited by

        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
        • Alan KilbornA Offline
          Alan Kilborn
          last edited by

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

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

          Ralph CramdenR 1 Reply Last reply Reply Quote 2
          • Ralph CramdenR Offline
            Ralph Cramden @Alan Kilborn
            last edited by

            @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

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors