mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-22 08:47:15 +09:00
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:
9
runtime/plugins/ftoptions/ftoptions.lua
Normal file
9
runtime/plugins/ftoptions/ftoptions.lua
Normal 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
|
||||
Reference in New Issue
Block a user