You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since 181fe9a, I've found it difficult to create a single line file with vis.
If I input ifoo<Esc>:w, I get no newline character. If I try ifoo<Return><Esc>:w, I get two newline characters. To get a single one, I need to ifoo<Return><Backspace><Esc>:w, which seems a bit quirky. Maybe a way to fix this is to have vis insert a newline character when first character is entered in the document? I'm not sure. It seems the distinction between an empty document and a document containing a single empty line is kind of tricky to get right.
The text was updated successfully, but these errors were encountered:
Yes this is a bit of a mess. Another possibility is to use ifoo<C-v><Enter> which also illustrates some of the issues the commit you referenced attempted to improve.
Making sure the file is always newline terminated before writing it would make ifoo<Esc>:w work. But in principle I don't really like it when editors perform these kind of modifications without being explicitly instructed to do so.
Vim has the binary (which might be useful anyway) and eol options to control these things.
Since 181fe9a, I've found it difficult to create a single line file with vis.
If I input
ifoo<Esc>:w
, I get no newline character. If I tryifoo<Return><Esc>:w
, I get two newline characters. To get a single one, I need toifoo<Return><Backspace><Esc>:w
, which seems a bit quirky. Maybe a way to fix this is to have vis insert a newline character when first character is entered in the document? I'm not sure. It seems the distinction between an empty document and a document containing a single empty line is kind of tricky to get right.The text was updated successfully, but these errors were encountered: