I am trying to create a package for grammar check that submit each sentence to a web service for correction.
I’ve got it working for the line I am on :
editor = atom.workspace.getActiveTextEditor() cursor = editor.getCursors() range = cursor.getCurrentLineBufferRange() line = cursor.getBufferRow() oldText = editor.getTextInBufferRange(range)
Then, I can call the webservice (Ginger) for grammar correction with
oldText and do
editor.setTextInBufferRange(range, result) to replace the text in the buffer.
Now, what I would like to do is to select the next contiguous range in order to process the whole text.
Do you have any idea how this can be done ?