diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2024-07-28 14:11:28 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2024-07-28 14:11:28 -0300 |
commit | fd271de3618194c264248e82c1441fd520e498fb (patch) | |
tree | 9bb81e6c5a0a4e86fc98ca4013efb5c0f3fa2a0a /vim.dot.link/filetype.vim | |
parent | a9eebc7ba967755ef4cc4f6cf9bef8589a68aa5a (diff) | |
download | vim-fd271de3618194c264248e82c1441fd520e498fb.tar.gz vim-fd271de3618194c264248e82c1441fd520e498fb.tar.bz2 |
Fix: markdown updates
Diffstat (limited to 'vim.dot.link/filetype.vim')
-rw-r--r-- | vim.dot.link/filetype.vim | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/vim.dot.link/filetype.vim b/vim.dot.link/filetype.vim index 9204987..26e7eea 100644 --- a/vim.dot.link/filetype.vim +++ b/vim.dot.link/filetype.vim @@ -6,13 +6,6 @@ endif " Markdown augroup markdown - " File extensions - autocmd! - autocmd BufRead,BufNewFile *.md setfiletype markdown - autocmd BufRead,BufNewFile *.mkd setfiletype markdown - autocmd BufRead,BufNewFile *.md setfiletype markdown - autocmd BufRead,BufNewFile *.mdwn setfiletype ikiwiki - " Markdown configuration " " Include folding setup: @@ -20,8 +13,12 @@ augroup markdown " " Alternative folding method: " https://codereview.stackexchange.com/questions/202620/vim-plugin-for-folding-markdown-lists - autocmd FileType markdown set foldexpr=NestedMarkdownFolds() - autocmd FileType markdown set autoindent smartindent tabstop=2 softtabstop=2 shiftwidth=2 expandtab formatoptions=tcroqn2 comments=n:> + " + " Seem like this things should be set during BufRead or BufNewFile; they're + " not working when set during the FileType event. + autocmd! + autocmd BufRead,BufNewFile *.md set filetype=markdown foldexpr=NestedMarkdownFolds() autoindent smartindent tabstop=2 softtabstop=2 shiftwidth=2 expandtab formatoptions=tcroqn2 comments=n:> + autocmd BufRead,BufNewFile *.mdwn set filetype=ikiwiki foldexpr=NestedMarkdownFolds() augroup END " Python @@ -65,6 +62,9 @@ augroup mail augroup END " Other filetypes +" +" According to ":help BufRead", this augroup is also evaluated also on +" ":filetype detect". augroup filetypedetect autocmd! autocmd BufRead,BufNewFile kvmxfile setfiletype sh |