cursor added as well as ability to move left and right

vim-style commands such as l to move right and h to move left as well
as their more verbose words allow a cursor to move along the document. A
print command also prints the current line and the selection underneath
the cursor.

Signed-off-by: Ricky Ayoub <vgmoose@gmail.com>
allow typing to the file and restructure confirmations

This patch allows the user to write to the file using typing commands.
Some of the logic was moved around for preventing quitting as well to
allow it to be more friendly with the chat interface. (Not a separate
raw_input loop).

Signed-off-by: Ricky Ayoub <vgmoose@gmail.com>