Community
    • Login

    Indent & unindent problem while replace tab with spaces

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    indentation
    4 Posts 2 Posters 3.1k 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.
    • 饒彥章饒
      饒彥章
      last edited by

      When I use default tab for indent/unindent functions, it seems like the shortcuts ‘tab’ and ‘shift + tab’ works perfectly.

      But when I try to use different tab settings (use 4 spaces replace 1 tab), the shortcut ‘tab’ still works well, but the ‘shift + tab’ is not working.

      When I try to input ‘shift + tab’, only the input icon go back 4 spaces, and the 4 space characters still exist.

      Is there any fix about this problem?

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @饒彥章
        last edited by

        @饒彥章

        afaik this only happens if at least one char is in front of the “tab/spaces”.
        So, if you have (the dot represents the space)

        foo....bar
        

        the cursor is in front of bar and you press shift+tab, only the cursor
        jumps back but the spaces do not get deleted.
        But if you have only

        ....bar
        

        then the spaces do get deleted.

        If this is the case on your side as well, then this isn’t a bug or problem
        as it is how SCI_BACKTAB, the underlying message used, works.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 1
        • 饒彥章饒
          饒彥章
          last edited by

          Hi Claudia,

          Thanks for reply, it is just the case on my side!
          So here’s another question, how can I change the setting if I need the “shift+tab” function works when there is at least one char in front of the “tab/spaces”?
          Is it possible for Notepad++?

          Claudia FrankC 1 Reply Last reply Reply Quote 0
          • Claudia FrankC
            Claudia Frank @饒彥章
            last edited by

            @饒彥章

            there is no setting to change the behavior of SCI_BACKTAB you need to change the code.
            Whether there is another solution depends on what exactly you try to achieve.

            Cheers
            Claudia

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors