15

I would like to navigate to position in text file.

Not line number, but character position. Absolute character position from the beginning of file.

How to do this in Notepad++?

Any other plain text editor is ok. I am editing JSON file.

5
  • Could you give an example please? Do you want to go to Nth character of Nth line?
    – Toto
    Dec 15, 2017 at 16:35
  • @Toto no, I want just Nth character in the file.
    – Dims
    Dec 15, 2017 at 16:47
  • @Biswa yes, about cursor; the same thing which is moving when navigating to line number
    – Dims
    Dec 15, 2017 at 16:47
  • I personally use home key, end key and Ctrl+Shift+arrow keys to navigate in b/w words.
    – Biswapriyo
    Dec 15, 2017 at 16:50
  • 1
    From the menu, Search -> Go To... (or Ctrl+G). Then click the "Offset" radio button, type in your character offset position and hit Go. Doesn't work great for hitting the middle of CR/LF but otherwise seems good.
    – wardies
    Dec 15, 2017 at 17:25

2 Answers 2

22

There's an 'Offset' option you can use to directly go to the character you want.

Select the Search -> Go to... menu option (or press Ctrl+G) and change the radio button from Line to Offset then enter the character position you want to go to in the You want to go to field:

Goto offset

3

Not very elegant, but it works:

  • Ctrl+H
  • Find what: (?<=^.{55}).
  • CHECK . matches newline

This will highlight the 56th character from the begining of the file.

1
  • FYI: I tried this approach to try and find column 128072 and notepad chugged pretty hard... still works but ugh.
    – Kris Oye
    Oct 2, 2023 at 22:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .