aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-07-27 17:36:41 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-07-27 17:36:41 -0300
commit50e815675a860e75fea265c59b998b3b6ea6c69f (patch)
treea7330f4caa4115decc042eb2d24f348fe3f48d70
parent37249cc9a41443c1ee6aa64d8b658a3ee16fb0f3 (diff)
downloadvim-50e815675a860e75fea265c59b998b3b6ea6c69f.tar.gz
vim-50e815675a860e75fea265c59b998b3b6ea6c69f.tar.bz2
Fix: markdown handling
-rw-r--r--vimrc.dot.link57
1 files changed, 29 insertions, 28 deletions
diff --git a/vimrc.dot.link b/vimrc.dot.link
index 07a3b73..78d7376 100644
--- a/vimrc.dot.link
+++ b/vimrc.dot.link
@@ -58,8 +58,29 @@ augroup END
set wildmode=longest,list,full
set wildmenu
-" PHP
-let php_sql_query=1
+" Syntax highlight
+syntax on
+
+" Indenting
+filetype plugin indent on
+
+" Folding
+" Disabled due to slowness
+"set foldmethod=syntax
+"set foldlevelstart=99
+"let g:sh_fold_enabled=1
+"let javaScript_fold=1
+"let perl_fold=1
+"let php_folding=1
+"let r_syntax_folding=1
+"let ruby_fold=1
+"let sh_fold_enabled=1
+"let vimsyn_folding='af'
+"let xml_syntax_folding=1
+
+" Setup https://github.com/masukomi/vim-markdown-folding
+" Alternative method: https://codereview.stackexchange.com/questions/202620/vim-plugin-for-folding-markdown-lists
+autocmd FileType markdown set foldexpr=NestedMarkdownFolds()
" Filetypes
augroup vimrc_syntax
@@ -75,13 +96,14 @@ augroup vimrc_syntax
au BufNewFile,BufRead kvmxfile set ft=sh
augroup END
-augroup mkd
+" Markdown
+augroup markdown
autocmd!
- autocmd BufRead *.mkd set ai formatoptions=tcroqn2 comments=n:>
+ autocmd BufRead *.md set autoindent smartindent tabstop=2 softtabstop=2 shiftwidth=2 expandtab formatoptions=tcroqn2 comments=n:>
augroup END
+" Drupal *.module and *.install files.
if has("autocmd")
- " Drupal *.module and *.install files.
augroup module
autocmd!
autocmd BufRead,BufNewFile *.profile set filetype=php
@@ -91,29 +113,8 @@ if has("autocmd")
augroup END
endif
-" Syntax highlight
-syntax on
-
-" Indenting
-filetype plugin indent on
-
-" Folding
-" Disabled due to slowness
-"set foldmethod=syntax
-"set foldlevelstart=99
-"let g:sh_fold_enabled=1
-"let javaScript_fold=1
-"let perl_fold=1
-"let php_folding=1
-"let r_syntax_folding=1
-"let ruby_fold=1
-"let sh_fold_enabled=1
-"let vimsyn_folding='af'
-"let xml_syntax_folding=1
-
-" Setup https://github.com/masukomi/vim-markdown-folding
-" Alternative method: https://codereview.stackexchange.com/questions/202620/vim-plugin-for-folding-markdown-lists
-autocmd FileType markdown set foldexpr=NestedMarkdownFolds()
+" PHP
+let php_sql_query=1
" No modelines
" https://lwn.net/Articles/20249/