Most editors allow you to pass an argument when opening a file from the command line to go to a specific line number (and column) in the file.
How can I do this with Atom?
Move the cursor to a specific line in the editor using ctrl-g.
You can open the last active terminal with the atom-ide-terminal:toggle command (Default: ctrl-` ). If no terminal instances are available, then a new one will be created. The same toggle command is used to hide the currently active terminal. From there you can begin typing into the terminal.
To enable opening Atom from the command-line, you will need to install shell commands from the either the Atom menu or the Atom Command Palette. In the Command Palette, search for “Window: Install Shell Commands”. To open a specific directory into the Project Explorer, you can add a path argument to the atom command.
To go up and down a single character, you can use Ctrl+P and Ctrl+N . To go left and right a single character, you can use Ctrl+B and Ctrl+F .
Atom commands are similar to Visual Studio and sublime text in this scenario. First press the Ctrl+G in your keyboard then you will redirect to command line in the Atom editor, then type line number to navigate that line Number.
The proper format for doing this is the following:
filename.txt:linenumber
example:
atom /your/path/to/the/file.txt:208
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With