3

I have set ruler in my .vimrc.

If I run vim and then :verbose set ruler? to check the status of this setting, on Ubuntu Linux it says :

noruler
        Last set from ~/.vimrc

At the bash prompt, grep says :

$ grep ruler .vimrc 
set ruler

And on Debian Linux, :verbose set ruler? says :

noruler
        Last set from /usr/share/vim/vim74/debian.vim

At the bash prompt, grep says :

$ grep ruler /usr/share/vim/vim74/debian.vim
set ruler       " show the cursor position all the time

Why does set ruler get reset to noruler ?

SebMa
  • 2,968
  • 2
  • 12
  • 15

2 Answers2

7

Check if set paste? and set compatible? are set.

If they are set, disable them. ruler is reset if they are set.
More details at :help ruler

dlmeetei
  • 186
  • 3
2

I found after finding the above answer, that my paste was set, but my compatible wasn't set. Although after I moved set ruler to a place below the set paste I was able to get my ruler back, and have paste enabled for justified pasting of code.

  • 3
    you should not globally enable paste. It's a workaround that should only be enabled before actually pasting, because it changes too many things – Christian Brabandt Aug 10 '18 at 06:55