VIM: Makes vim auto-add comment character

It will do this in insert mode when pushing <enter> or when in normal
mode when pushing o or O
This commit is contained in:
Jonathan Hodgson 2020-10-06 13:14:56 +01:00
parent 9b62d793ae
commit 341d45e4f3

View file

@ -38,3 +38,8 @@ set linebreak
" Sets tool for opening non-text files with gx " Sets tool for opening non-text files with gx
" If in netrw, this is run with just x " If in netrw, this is run with just x
let g:netrw_browsex_viewer = "opout" let g:netrw_browsex_viewer = "opout"
" Automatically insert comment leader after hitting enter
set formatoptions+=r
" Automatically insert comment leader after hitting o or O
set formatoptions+=o