You can set display
to lastline
to see "@@@
" at the end of the last line when it doesn't fit the screen. I'd prefer to use a different character for that purpose, such as ...
or ---
.
Is there a way to change the character used?
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.
Sign up to join this communityYou can set display
to lastline
to see "@@@
" at the end of the last line when it doesn't fit the screen. I'd prefer to use a different character for that purpose, such as ...
or ---
.
Is there a way to change the character used?
Since Vim 9.0.0656 (Oct 2022) you can use lastline
in the fillchars
setting; for example to change it to ·
:
:set fillchars=lastline:·
vim handle spaces tab and return lien by:
set list
set listchars=space:-
set listchars+=tab:>-
set listchars+=eol:¶
to pick the last line and add @
or ¶
at the end you can use
echo getpos(".")[1]
to get this line number then use autocmd to test if this line equal the last line number (nu
for count all line number)
function TestIfLastLine()
if echo getpos(".")[1] ==nu
then
set listchars=eol:¶
else
set listchars=eol:\ " I'm use space here
endif
endfunction