Open a text file to edit at a specific line?

Is it possible to open a text file and start with the cursor at a specific line in the Text app? @juliushaertl ?

I’m working on an app that uses text files. Sometimes the user will need to edit those text files so I would like to open them in the Text app. It looks like I can do it by linking them to the Files app with the openfile query parameter, which opens the file in Text. But these text files can be very large so I would like to also specify the line number to start editing and avoid making them scroll through a big text file searching for the right place to edit.

1 Like

Hello Ryan, how are you?

That’s great to know! Hope you succeed on that project.

My suggestion is to go for the “Plaint Text Editor”, and using Vim as reference.

Example: If you type “:XX”, where the “XX” is the number of the line, you can go directly on the line you choose.

If you take a look inside the “Plain Text Editor” app, you may find a way to do it.

Hope you find a way brother, good luck!

If I can help with something, please reply.

All the best, have a nice weekend.


Thanks @Beltran1337 ! May I ask why you suggest Plain Text Editor over Text? Text is the default text editor and I kind of get the impression it’s replaced Plain Text Editor. Just curious. I would have to instruct users to install Plain Text Editor if I depend on it.

Good afternoon Ryan,

I suggest you the Plaint Text Editor because the app have the line’s number on the left side of the document (Just like the “:set nu” vim’s command).

Also, the Plain Text Editor have a bigger work area then the Text default app.

I understand that the default app “Text” have a smaller workspace because of a research about the human eye and some other stuff but anyways, I just prefer a bigger space to work and see things with clarity.

I hope that I was able to help you with something and give a try for the Plain Text Editor.

Have a nice day mate!


1 Like