From 1460f41211bfb4251bf36ad6cb37146881ec27dd Mon Sep 17 00:00:00 2001 From: Dmytro Meleshko Date: Mon, 14 Jun 2021 11:03:52 +0300 Subject: [PATCH] [nvim] adjust formatoptions (again) --- nvim/plugin/editing.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nvim/plugin/editing.vim b/nvim/plugin/editing.vim index e59bd3c..25a683e 100644 --- a/nvim/plugin/editing.vim +++ b/nvim/plugin/editing.vim @@ -220,11 +220,16 @@ set commentstring=//%s " Formatting {{{ " -o: don't insert a comment after hitting 'o' or 'O' in the Normal mode + " +r: however, insert a comment after pressing Enter in the Insert mode " -t: don't auto-wrap regular code while typing " -c: don't auto-wrap comments while typing augroup vimrc-editing-formatting autocmd! - autocmd FileType * set formatoptions-=o | set formatoptions-=t | set formatoptions-=c + autocmd FileType * + \ setlocal formatoptions-=o + \|setlocal formatoptions+=r + \|setlocal formatoptions-=t + \|setlocal formatoptions-=c augroup END " }}}