Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim show line numbers when using Explore

Tags:

vim

In VIM, I use :Explore or :Te to explore and open a new file. It gets a little tedious to scroll up and down using only J, K, Ctrl-D and Ctrl-U.

Is there a way to automatically show line numbers when using :Explore or :Te? This way I can go directly to the line I want with 32G if, for example, the line number is 32.

I have set number stored in my .vimrc, but this does not seem to apply to the file exporer.

like image 615
Leo Galleguillos Avatar asked Oct 26 '25 06:10

Leo Galleguillos


1 Answers

Put this in your .vimrc:

let g:netrw_bufsettings = 'noma nomod nu nowrap ro nobl'

The settings beside 'nu' are the default settings, I'm not sure if you can enable just nu without overriding the rest.

See also :help netrw.

like image 156
Chris Smeele Avatar answered Oct 28 '25 21:10

Chris Smeele



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!