Open file at specific line and column



I would like open a file and position the cursor on a specific row and column like this:

atom file.txt:20:10

and it would go to line 20 and column 10.

Would such feature be possible to implement as a package?


+1. This would be nice to have. I wonder if it calls for hacking of the core files (, atom.js) to get opts or if they pass through.


Indeed, very useful when clicking an exception or some other part of a stack trace lands me at the correct line.

I went through the API and it seems command line options are not passed through. On the other hand, moving a cursor to a specific position is of course supported.


We don’t support columns right now, but you can open a file to a specific line like this atom my-file:34


Oh, I didn’t notice that and I think I know why. It works when I open the file for the first time but after that it is ignored:

If I type

atom file.txt:10
atom file.txt:20

the cursor stays at line 10. Is this intentional? It makes the use case I mentioned earlier more tedious.


@ncr That sounds like a bug. I’ll add it to our issue tracker.


Any news on this? Should be an easy fix. This is really important for users that write LaTeX files. Sadly, Sublime Text remains my go-to editor until this is fixed.

Thanks for making a great editor!


Here’s the bug that was opened:

You can click the Subscribe button to be notified when there are updates.


Is there a way to do this from the API (e.g.

Update : pathsToOpen: [definition.fileName+":30"], will just work. Nevermind.


And this feature was added a while ago … so I’m closing this as fixed. :grinning:

closed #11