implement write and <,> in vi