Closed dseeni closed 4 years ago
Hi,
Open a python file in neovim and run this command: :echo &formatoptions
. Is the letter o
in this?
From :help fo-table
:
o Automatically insert the current comment leader after hitting 'o' or
'O' in Normal mode.
If this is not the case and you want to input a new comment when hitting o
, add this to your init.vim: autocmd FileType python setlocal formatoptions+=o
@yochem thank you! Had no idea bout the fo-table.
Me neither ;)
Jumping through the help pages is pretty fun. I knew about formatoptions and found out about fo-table via :help formatoptions
.
Hey Tim,
Pretty new to code/vim so forgive me if this is my fault. I think that in NeoVim starting a new line with "o" from a commented line in a python file does not produce a new commented line.
I tested with just commentary active, and it does not behave like any other file type (lua, vim, powershell, etc)...