Add default ftoptions plugin to override settings

The ftoptions plugin will override values in settings.json based
on language requirements (e.g. using tabs in makefiles).
This commit is contained in:
Zachary Yedidia
2016-11-08 09:34:12 -05:00
parent 4c0b00bf2b
commit 7c2baa6086
2 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
function onViewOpen(view)
local ft = view.Buf.Settings["filetype"]
if ft == "makefile" or ft == "go" then
SetOption("tabstospaces", "off")
elseif ft == "python" then
SetOption("tabstospaces", "on")
end
end