au InsertEnter * set norelativenumber au InsertLeave * set relativenumber
So that I have relativenumber in normal mode but not insert mode. I want to extend this to command mode. I tried
au CmdLineEnter * set norelativenumber au CmdlineLeave * set relativenumber
But these don't work. Under
h CmdLineEnter, it says
<afile> is set to the |cmdline-char|.
So I think it's setting
norelativenumber on the
: "file", which isn't my actual buffer. How do I get it to set
norelativenumber on the buffer I entered the command line from?
I'm on neovim 0.4.2.