jessegrosjean / foldingtext-for-atom

Outline editor with productivity features (No longer in development)
Other
40 stars 10 forks source link

Using the CLI $ atom fileName:lineNumber switch to open FT at a given line #17

Closed RobTrew closed 9 years ago

RobTrew commented 9 years ago

I notice that from the OS X command line we can open a source file at a particular line (i.e. with that line automatically selected in Atom) by using the atom command and appending :lineNumber to the file name, for example:

$ atom filterByDue.coffee:27

To open the filterByDue.coffee file with the cursor selecting line 27

I wonder whether it would be possible to capture the :lineNumber from the command line and use it in FoldingText for Atom to open the file with the cursor on a particular line in the view buffer ?

( If that did look possible, my next question might be whether we could extend that kind of command line option to :uniqueLineID ?)

( The context is that I setting up a menu of reports which filter across all the FTML files in a folder, and it would be good to be able to click on a line in a filtered report, and jump to the relevant file and line for further editing or further reading )