In vi/vim I can throw set list in my .vimrc file to show newline characters as $ which is very useful for my development needs.

Though the same command in neovim shows only - for trailing spaces while newlines are still invisible.

Is there any way to show newline characters in neovim as it's in vi/vim?

1 Answer 1


Ok, so after looking up a documentation and a good portion of time figuring out how to make it work properly I found the solution.

I run help 'list' from inside neovim and found out that by default newline characters are not shown in neovims list mode. To show them (as well as other characters you want) the following command can be used:

set list listchars=tab:>\ ,trail:-,eol:$

Notice the backslash \ above as it's necessary to add it to include spaces in a particular character representation (like tab character that would be shown as > plus spaces).

For additional information you can read docs with help 'listchars' from inside neovim.

  • 1
    Well, yeah, if you use set list you probably should customise listchars. Vim and Neovim have some differences in the initialisation files they load and that is what likely cause the difference. Using a proper definition in vimrc & viminit should make it consistent and avoid things set by the distribution or installer.
    – grochmal
    Mar 26, 2017 at 23:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.