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 ?

migrated from stackoverflow.com Sep 11 '17 at 10:26

This question came from our site for professional and enthusiast programmers.

up vote 5 down vote accepted

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

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.

  • 2
    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 at 6:55

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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