Write an "editw" function.