# Numbers of lines are missing in vi editor



## ccc (Oct 24, 2013)

Hi

I'd like to reinstall the vi editor on FreeBSD 8.4, because numbers of lines are missing.


----------



## chatwizrd (Oct 24, 2013)

There is editors/vim

If you mean the base vi that comes with the source code you would have to install that from /usr/src/usr.bin/vi.


----------



## ccc (Oct 24, 2013)

Thx Thanks, I've reinstalled vim from ports, but numbers of lines are still missing. Howto How to enable them?


----------



## ccc (Oct 24, 2013)

This problem is solved now! If you need numbers every time you start vi/vim:
`# vi ~/.exrc` and append the following line: 
	
	



```
set number
```


----------



## trh411 (Oct 24, 2013)

Put the following statement: 
	
	



```
set number
```
 in your ~/.vimrc file.


----------



## Beastie (Oct 24, 2013)

That's one of those essential options I like to have set system-wide in /etc/vi.exrc:

```
set leftright
set number
set ruler
set showmode
```


----------



## ccc (Oct 24, 2013)

Yep, but I really don't like to have these numbers on the left site. I like to have them down, like on Linux. Is it possible to have it the Linux way?


----------



## Beastie (Oct 24, 2013)

The *ruler* option mentioned above shows the current line and column on the bottom of the screen.


----------



## ccc (Oct 24, 2013)

Thanks, using just:
	
	



```
set ruler
set showmode
```
 in /etc/vi.exrc is exact what I want!


----------

