From 2a420ecb04f7308dcc7e071cb5d4fe29cd14a4bd Mon Sep 17 00:00:00 2001 From: chawley Date: Sun, 3 Mar 2024 12:19:13 -0500 Subject: [PATCH] Vim formatoptions Messing with format options to make it easier for me to write markdown bullet points in my notes. --- .vimrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.vimrc b/.vimrc index d01b7de..7327be4 100644 --- a/.vimrc +++ b/.vimrc @@ -158,9 +158,14 @@ let g:vim_markdown_follow_anchor = 1 " j - remove a comment leader when joining lines. " l - long lines are not broken in insert mode " n - Recognize numbered lists +" o - Continue comments when pressing `o` or `O` +" q - allow formatting with `gq` " r - Continue comments when pressing Enter " t - autowrap lines using text width value -autocmd FileType markdown set formatoptions=jlnrt +"autocmd FileType markdown setlocal formatoptions=aclnrot +" The below was found here: https://github.com/preservim/vim-markdown/issues/232#issuecomment-246173676 +autocmd FileType markdown set formatoptions-=q +autocmd FileType markdown set formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*\[-*+]\\s\\+ " = Open folds by default au BufWinEnter * normal zR