You can use a BufWinEnter event instead.
That's a late event, which should happen after all the filetype detection and setup is finished.
au BufWinEnter * set formatoptions-=o
The docs in :help BufRead suggest possibly using this event:
See BufWinEnter for when you need to do something after processing the modelines.
While your case is not directly ...
One of the goals of Neovim is to provide defaults that work for the majority of its users, and to avoid users disabling swap files, they changed their default location. You can go back to the Vim default with set directory=.
BTW you may want to consult :help nvim-defaults which lists all default changes that Neovim introduced
Instructions can be found on the Neovim Wiki
As of the posting of this answer, the site's current instructions are as follows:
Neovim has been added to a Personal Package Archive which allows you to install it using apt-get on Ubuntu 12.04 and later.
To be able to use add-apt-repository you may need to install software-properties-common:
The TERM environment variable is generally set by the terminal emulator you're running in, and it tells programs using curses (like Vim and Neovim) what sequences to send to the screen to do things like moving the cursor and setting colors. When you're using a graphical environment, Vim and Neovim don't need this environment variable to be set, since they're ...
justinmk (current neovim leader?) states
ctrl-6 only works by accident in some terminals. The actual builtin mapping is <C-^>.
There is also https://github.com/equalsraf/neovim-qt/issues/170
So it just doesn't work for neovim (nvim.exe and nvim-qt.exe) even though neovim help is ...
Popup menu in neovim-qt is controlled by GuiPopupmenu command.
You should add it to you ginit.vim:
It is not documented that well, I've found it somewhere in github issues.
You can also try look into neovim-qt shim layer to find out what else is there:
It took a winding road to reach the root cause. Jump to the last/second update below to skip to the conclusion.
Per :h FileType the FileType event doesn't do anything unless 'filetype' is set. The standard way to set that is to have this in your vimrc/init.vim:
This "enables file type detection".
You don't have anything in your init....
I am using Neovim both on Linux, Mac and Windows. For terminal Neovim, it seems that ctrl + 6 works as expected for me. On Windows, Ctrl-6 does not work. FYI, the terminal I am using for different platform:
Linux: mintty (Connected to remote Linux server via ssh)
Mac: Either iterm2, Alacritty, Kitty works.
For Neovim GUI client, you can ...
As far as I'm aware, Vim does not include any features that will help you track down what's causing this issue, so you have two options, neither of which are very appealing.
You can follow statox's advice, and attempt to narrow down what part of your configuration is causing the issue by selectively disabling parts of your vimrc and disabling/removing your ...
:r inserts the contents of a file. It does not overwrite existing contents. Since a new file opened in Vim can't have zero lines* you'll be adding the file's contents to one blank line.
Simplest thing to do is just add an additional command to your autocommand:
autocmd BufNewFile *.cpp 0r C:\Users\User\Desktop\cp\Template.cpp | $d
So we use | to indicate an ...
Got it working and found two solutions.
Reinstall bash and set Neovim as a default editor during the installation (Git has a test feature to make sure your editor is working even during installation)
in $home find .gitconfig and add the path to your editor, but use two escapes \\ when there is space, e.g. C:/Program\\ Files/...
You can put all your personal config under a single directory (use :echo stdpath('config') to see where that directory is on your system). On Linux and Mac, the directory is $HOME/.config/nvim, and on Windows, the directory is C:\Users\USERNAME\AppData\Local\nvim. Under this directory, do whatever you want with Neovim. You might be interested in mine.
Neovim supports a sysinit.vim file whose location usually is $VIM/sysinit.vim (see :help sysinit.vim). From Neovim execute :echo $VIM to get it's value, and from there construct the right path. I don't use Windows, but I'm pretty sure it will work if you put the file on e:\Neovim\share\nvim\sysinit.vim
Ralf had the correct intuition regarding the other parameter gvimargs.
This does not work with nvim-qt. If you to pass argument from "nvim-qt" to the neovim implementation you have to separate them by a double dash.
This is specific to nvim-qt, nvim in the terminal works both with and without double dash.
I ended up putting in my _vrapperrc
According to neovim Wiki FAQ and Issue #1750, client-server / remote feature was removed in Neovim.
Instead, neovim-remote can be used. After installing it (pip3 install neovim-remote), launch nvim like:
$ NVIM_LISTEN_ADDRESS=/tmp/nvimsocket nvim
And open files remotely
$ nvr --remote file.txt