Offline text editing on Android, with sync ?

Trying to be productive in the commute train, I'm looking for an offline text editing solution for nexus 4 (rooted with stock), as the connectivity is not good. But I need the app to sync easily to be able to edit the file on desktop when home.

Some apps are great offline editors, others are great sync, but it seems none do both.

So far my best solution, which is a bit of a hack :

1) create a text file in google drive

2) while there's still connectivity, open the file in quickoffice

3) you can go offline/ plane mode

4) you can edit the file in quickoffice all you want while offline, but can't save, so need to stay with the file open in edition mode

5) when there is connectivity again, you can save the file back to google drive

6) when on a desktop, you can login to google drive and seamlessly continue to edit the text in the browser.

if you have a better solution let me know!