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.

Dims
  • 12,244
  • 78
  • 161
  • 252
  • Could you give an example please? Do you want to go to Nth character of Nth line? – Toto Dec 15 '17 at 16:35
  • @Toto no, I want just Nth character in the file. – Dims Dec 15 '17 at 16:47
  • @Biswa yes, about cursor; the same thing which is moving when navigating to line number – Dims Dec 15 '17 at 16:47
  • I personally use home key, end key and Ctrl+Shift+arrow keys to navigate in b/w words. – Biswapriyo Dec 15 '17 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 '17 at 17:25

2 Answers2

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

snowdude
  • 2,870
  • 17
  • 20
2

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.

Toto
  • 17,001
  • 56
  • 30
  • 41