ciaranm / detectindent

Vim script for automatically detecting indent settings
173 stars 48 forks source link

Allow settings to be buffer-local #21

Closed idbrii closed 9 years ago

idbrii commented 9 years ago

This one is a bit more radical. I want python to use spaces and everything else to use tabs.

vimrc:

let g:detectindent_preferred_expandtab = 1

after/ftplugin/python.vim:

let b:detectindent_preferred_expandtab = 0

Only applies to indent settings (not max lines etc).

Add s:GetValue() to properly grab buffer-local options. Assumes if they are active that we should use their value (instead of assuming existence means 1) to allow us to force settings for specific filetypes.