vim-markdown icon indicating copy to clipboard operation
vim-markdown copied to clipboard

The plugin overrides my tab settings from 2 to 4 characters, how do I set this up?

Open psqlmaster opened this issue 2 months ago • 5 comments

Good afternoon coleagues. The plugin overrides my tab settings from 2 to 4 characters, how do I set this up?

don't work if add and file init.lua

vim.api.nvim_create_autocmd({'FileType', 'BufEnter'}, { pattern = 'markdown', callback = function() vim.opt_local.tabstop = 2 vim.opt_local.softtabstop = 2 vim.opt_local.shiftwidth = 2 vim.opt_local.expandtab = true end })

psqlmaster avatar Oct 13 '25 08:10 psqlmaster

I have the same issue in vim. It ignores FileType settings set via autocmd since I installed vim-markdown. Any help would be very appreciated.

ElTrasho3000 avatar Nov 18 '25 09:11 ElTrasho3000

NVM just found out that setting let g:vim_markdown_new_list_item_indent = 2 affects all indentation and not only lists.

ElTrasho3000 avatar Nov 18 '25 09:11 ElTrasho3000

What Markdown parser are you using that respects 2 space indentation on any sort of block?

alerque avatar Nov 18 '25 09:11 alerque

I use markdown with obsidian. Don't know what parser they use internally to display markdown files.

ElTrasho3000 avatar Nov 18 '25 09:11 ElTrasho3000

Using 2-space indentation is my preferred and consistent style across all Markdown files in my projects. The plugin currently overrides my local settings and forces 4-space indentation, which not only breaks visual consistency but also disrupts my workflow.

I consider 2-space indentation cleaner and more idiomatic for Markdown (especially given its prevalence in documentation, READMEs, and web-focused content). Having the plugin impose 4 spaces without respecting user-configured tabstop, shiftwidth, and expandtab feels like an unnecessary dominance over user preferences.

It would be great if the plugin respected existing local settings or at least provided a clear way to disable its indentation behavior.

psqlmaster avatar Nov 18 '25 13:11 psqlmaster