Avoid a division-by-zero
Get rid of writer.currentAttr, specify it on every write() call
edit.bufferState -> editorState
editorState.tip string -> tips []string
Update comments
Update README.md