I am relatively new to Vim. Whenever I start Vim using vim LearnRuby.rb, a dollar sign appears at every line. 
Why?
Vim range selection In addition to literal line numbers, you can use a period ( . ) to represent the current line, a dollar sign ( $ ) to represent the last line in the file buffer, and a percent sign ( % ) to represent the entire file.
Type A to add text to the end of a line. To see how this command works, position the cursor anywhere on a text line and type A . The cursor moves to the end of the line, where you can type your additions. Press Esc when you are finished.
On a character in the first line, press Ctrl-V (or Ctrl-Q if Ctrl-V is paste). Press jj to extend the visual block over three lines. Press $ to extend the visual block to the end of each line. Press A then space then type Hello world.
Move cursor to end of file in vim In short press the Esc key and then press Shift + G to move cursor to end of file in vi or vim text editor under Linux and Unix-like systems.
: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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With