vimneovim

How to disable line numbers in neovim terminal?


I come with a question: How to disable line numbers on neovim terminal? I tried this:

autocmd BufRead,Filetype term://* set nonu

but this doesn't work.

I use set number relativenumber in init.vim file.

I tried nonumber, number!, but for terminal anything of this doesn't work and when i normally wrote :set nonu or :set number!, but instead of 3 2 1 17 1 2 3 i got 3 2 1 0 1 2 3


Solution

  • You can remove them by typing in a terminal buffer:

    :setlocal nonumber norelativenumber
    

    Additionally, you can add:

    autocmd TermOpen * setlocal nonumber norelativenumber
    

    In your init.vim config file to keep this setting on each neovim session.