Vim formatoptions

Messing with format options to make it easier for me to write markdown
bullet points in my notes.
This commit is contained in:
2024-03-03 12:19:13 -05:00
parent e43aa0908e
commit 2a420ecb04

7
.vimrc
View File

@@ -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