[vim/vim] Does not append new line (Issue #14181)

23 views
Skip to first unread message

San

unread,
Mar 11, 2024, 12:37:10 PM3/11/24
to vim/vim, Subscribed

Steps to reproduce

  1. Open any file in vim.

  2. Write inside it till the text reaches the end of the window
    image.png (view on web)

  3. After that for the next letter, the cursor will go to the next line without indicating that it is the continuation of the same line.
    In the above image, now if we enter any one letter the cursor will move and the behaviour is shown below
    image.png (view on web)

Expected behaviour

A empty line indicating that it is the same should be displayed by default as follows( the following behaviour is not by default):
<it should show that it the continuation without writing anything, here i had to type * to indicate it.>
image.png (view on web)

Version of Vim

8.2

Environment

WSL2, Ubuntu 22.04.4
zsh 5.8.1 (along with ohmyzsh! framework_
(i have also tried this on bash 5.1.16)

Logs and stack traces

No response


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14181@github.com>

Christian Brabandt

unread,
Mar 11, 2024, 12:52:46 PM3/11/24
to vim/vim, Subscribed

You are just talking about the moment when the cursor reaches the next line but the lines does not really wrap yet? I am not sure, I think this is a very minor thing, because as soon as you type another key, you will see that the line is wrapped. Displaying line wrapping line, even so the line does not yet need to be wrapped, seems controversial.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14181/1988942207@github.com>

San

unread,
Mar 12, 2024, 3:52:17 AM3/12/24
to vim/vim, Subscribed

I think this is a very minor thing,

Yes I agree
It is a minor bug


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14181/1990973651@github.com>

San

unread,
Mar 17, 2024, 9:34:12 AM3/17/24
to vim/vim, Subscribed

@chrisbra
Also i found another bug( or maybe its on purpose)
When you only have /t( tab or indentation) without any text on a new line. And you navigate back to previous line and press delete button, the next line does not get deleted but the /t( tab or indentation) does.
Which in some cases is kind of annoying so most IDE's delete the next line when delete is pressed if the next line contains only /t's.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14181/2002473119@github.com>

Christian Brabandt

unread,
Mar 17, 2024, 4:38:16 PM3/17/24
to vim/vim, Subscribed

Sorry, I don't get it. Can you please give reproducible steps?
I tried with vim --clean -c 'call setline(1,["", "\t"])' -c 'call cursor(1,1)'

Pressing <Del> on the first line does not delete anything on the second line.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14181/2002609671@github.com>

Gary Johnson

unread,
Mar 18, 2024, 1:28:37 PM3/18/24
to reply+ACY5DGCNJH26CK3Z66...@reply.github.com, vim...@googlegroups.com
On 2024-03-17, San wrote:
> @chrisbra
> Also i found another bug( or maybe its on purpose)
> When you only have /t( tab or indentation) without any text on a new line. And
> you navigate back to previous line and press delete button, the next line does
> not get deleted but the /t( tab or indentation) does.

When you create a new line for which Vim automatically provides
indentation, and you don't add any text on that line, and you then
move to a different line, Vim removes the indentation. This is by
design, to avoid adding superfluous white space to a buffer.

The delete button should delete one character. Why would you expect
it to delete a line, and a different line at that?

> Which in some cases is kind of annoying so most IDE's delete the next line when
> delete is pressed if the next line contains only /t's.

That seems weird.

A text file is simply a sequence of characters. Different editors
have different ways of representing that to the user. In Unix, by
convention, a text file is a sequence of lines, where each line is
a sequence of characters terminated by a newline. Vim represents
each line as a line-object (my term) without a newline. The
end-of-line sequence terminating each line is implicit and does not
appear in the Vim buffer, which is simply a sequence of
line-objects.

I'm not sure that was very clear. My point is that Vim's
representation of a text file in a buffer may differ from what
you're used to. It isn't a bug; it's by design. You may have to
think differently about what it means to edit a Vim buffer for some
of Vim's behavior to make sense to you.

Regards,
Gary

vim-dev ML

unread,
Mar 18, 2024, 1:30:58 PM3/18/24
to vim/vim, vim-dev ML, Your activity


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/14181/2004529137@github.com>

San

unread,
Mar 19, 2024, 12:44:35 PM3/19/24
to vim/vim, vim-dev ML, Comment

It isn't a bug; it's by design

Oh,
ok
I thought maybe it's a bug. Thanks for clarification.


Reply to this email directly, view it on GitHub.

You are receiving this because you commented.Message ID: <vim/vim/issues/14181/2007660653@github.com>

Reply all
Reply to author
Forward
0 new messages