My default indent width settings (4 spaces) are not used for markdown files. Whenever I open a markdown file it is indented using 2 spaces.
Here are my default indent width settings. In my .vim/vimrc
I have
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
almost at the end. I have no markdown plugins installed.
I have a .vim/ftdetect/markdown.vim
au BufNewFile,BufReadPost *.md set filetype=markdown
and a .vim/ftplugin/markdown.vim
let g:markdown_fenced_languages = ['python', 'bash=sh', 'shell=sh', 'c', 'html', 'css', 'javascript', 'js=javascript', 'json=javascript' ]
let g:markdown_syntax_conceal = 0
let g:markdown_minlines = 100
setlocal spell
Also adding
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
to .vim/ftplugin/markdown.vim
does not change the situation.
Note, the filetype is properly recognized. Manually setting it after the file is opened worked.
- Why are my settings not applied?
- How to debug this?
:verbose set tabstop? softtabstop? shiftwidth? expandtab?
.vim/ftplugin/html.vim
. This file only holds the 4 commands..vim/after/ftplugin
andsetlocal