Community
    • Login

    Offset treats tabs as multiple tokens when calculating the offset/col?

    Scheduled Pinned Locked Moved General Discussion
    3 Posts 2 Posters 2.2k Views 2 Watching
    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.
    • Derek AltamiranoD Offline
      Derek Altamirano
      last edited by

      I was using my favorite editor to help troubleshoot an issue in a file parser. I could not figure out why when I hit CTRL-G to to so the offset in the log it was taking me to the wrong place. The file is tab delimited, so I then realized when I was moving the cursor using the right arrow that when went past a tab the column counter jumped 3! I expected tabs to be considered a single token in the file.

      I realize there are probably other use cases where this behavior is useful, however when I go to a file offset I expect a tab to count as one “character”… Is there a way to alter this behavior?

      1 Reply Last reply Reply Quote 0
      • Jim DaileyJ Offline
        Jim Dailey
        last edited by

        @Derek-Altamirano

        Perhaps if you set the tab size to 1 for the file type in which you are using Ctrl-G to go to the offset? See Settings->Preferences->Tab Settings

        You can always set it back to its “proper” value once you have fixed the issue(s).

        1 Reply Last reply Reply Quote 0
        • Derek AltamiranoD Offline
          Derek Altamirano
          last edited by

          Useful suggestion, which is what I did. However this is annoying because I have to remember to go back and change the tab setting back when I am done. I think it might be useful for this to be a configurable setting… Either by file type or even better as a more general setting that could be toggled on or off.

          1 Reply Last reply Reply Quote 0

          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