Fix cursor mode, truncate lines and add mmm-mode