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:
7
.vimrc
7
.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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user