What is the Dollar sign (“$”) at the end of every line in Vim

前端 未结 2 1929
小蘑菇
小蘑菇 2021-02-12 13:13

I am relatively new to Vim. Whenever I start Vim using vim LearnRuby.rb, a dollar sign appears at every line.

Why?

相关标签:
2条回答
  • 2021-02-12 13:52

    Open ~/.vimrc and check its contents
    If you see a line like this:

    set list
    

    It means, it will display $ in every line to mark the end of line.
    Either remove it or use :set nolist command in the vi editor.

    0 讨论(0)
  • 2021-02-12 14:03
    :set nolist
    

    will turn off special characters for the current buffer, such as tabs being presented as ^I and end of line characters showing up as $.

    However, if it's doing that consistently when you run vim, you need to look into your .vimrc (or other startup file where applicable) and find out what's doing the set list that causes it.

    0 讨论(0)
提交回复
热议问题