tpope / vim-sleuth

sleuth.vim: Heuristically set buffer options
https://www.vim.org/scripts/script.php?script_id=4375
1.92k stars 86 forks source link

Question: always show as 2 spaces in vim without editing actual file #88

Closed fritzrehde closed 1 year ago

fritzrehde commented 1 year ago

Hi, in a perfect (or at least simpler) world, every file I edit in vim would be using tabs and I could just set my tab width to 2 spaces. However, since this isn't the case in reality, I wanted to try out this plugin. I don't want to change the file's tab/space settings at all (e.g. a tabbed file stays that way when saving, a file with 4 spaces per indentation stays that way when saving etc.), but I would like all files to look like they have 2 spaces as indentation. I guess one way this might be possible is if this plugin could somehow tell vim to convert all indentations into tabs (only in terms of looks in the editor, not changing the indentation of the actual files) and then I could set tabstop=2, but I have no clue if this is possible with this plugin. Any ideas?

tpope commented 1 year ago

No, Sleuth can't do this, and I doubt any plugin can.