• Login
Community
  • Login

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

Scheduled Pinned Locked Moved General Discussion
3 Posts 2 Posters 2.0k 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.
  • D
    Derek Altamirano
    last edited by Aug 29, 2017, 3:50 PM

    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
    • J
      Jim Dailey
      last edited by Aug 29, 2017, 4:00 PM

      @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
      • D
        Derek Altamirano
        last edited by Aug 29, 2017, 4:23 PM

        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
        2 out of 3
        • First post
          2/3
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors