Vim can be configured to show line numbers by adding set number to your .vimrc.
How can I configure Vim to instead only show or hide line numbers for certain file extensions?
Examples:
.md files.rb, .js, and .vue filesA .vimrc-based solution is probably preferable, but barring that, workarounds are welcome.
Here's what you're looking for:
autocmd filetype markdown setlocal nonumber
for your first example, and
set nonumber
autocmd filetype ruby,javascript,vue setlocal number
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With