Enable Bottom-Right Numbers in VIM

29

4

I've noticed VIM on my Mac doesn't have the line/column numbers in the bottom-right corner of the window whereas VIM on Ubuntu does. Is there a profile setting I can use to get my Mac to show these numbers?

Nate

Posted 2010-12-15T02:23:06.907

Reputation: 1 661

Answers

34

Try the command ":set ruler".

Heptite

Posted 2010-12-15T02:23:06.907

Reputation: 16 267

14

As Heptite described, the command :set ruler results in the line/column information I was looking for. If you want to make this behavior permanent, edit your ~/.vimrc file to include the following line:

set ruler

Nate

Posted 2010-12-15T02:23:06.907

Reputation: 1 661

2at first I didn't have a ~/.vimrc, I only had a ~/.viminfo and I tried to edit that but it silently failed saving my changes. So I had to create a new file at ~/.vimrc and it's working great! – Patrick – 2012-04-27T18:14:12.380

1

You want to configure your statusline in .vimrc, with %l and %c denoting lines and columns, respectively.

Wesley Rice

Posted 2010-12-15T02:23:06.907

Reputation: 1 580