0

When typing nvim in CLI, nvim opens with a screen that contains all my configurations (the picture bellow).

I have to press <s-g> and then hit Enter in order to open the file i wanted.

The same happens when i'm sourcing vim.init (:source $MYVIMRC).

enter image description here

I have 2 questions:

  1. What's this screen?
  2. How can I disable it?
2
  • 1
    Welcome to Vi and Vim! It looks like this is happening because you have a bare au (to display all autocmd's) rather than an au! (to clear all autocmd's for an augroup). If you can show or share your init.vim we can probably point to where the bug is...
    – filbranden
    May 15 '21 at 18:28
  • 1
    thank you! found it, it was an auto (without anything else) outside of an augroup. May 15 '21 at 18:57
1

What you're seeing in that output is a list of all defined auto-commands.

You get Vim/NeoVim to list all defined auto-commands with the Ex command autocmd with no arguments. This command can be abbreviated to simply au or auto. So in order to have Vim/NeoVim display all defined auto-commands at startup, you probably have an auto in your vimrc or init.vim (which you confirmed in your comments.)

Note that it's quite common to use autocmd! (with a bang) inside an augroup as its first command, in order to clear the augroup of any commands previously defined inside it, before adding new command definitions there. This is useful in case you reload the Vim script (such as your vimrc or init.vim), to prevent the auto-commands from getting duplicated as they get defined again every time the file is sourced.

The pattern goes like:

augroup NameOfGroup
  autocmd!
  ... autocmd definitions ...
augroup END

So I imagine you were missing the ! in the autocmd! in the beginning of one of the augroups... You can fix it by adding the missing ! there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.