mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-08 08:00:20 +09:00
18 lines
416 B
Lua
18 lines
416 B
Lua
if GetOption("ftoptions") == nil then
|
|
AddOption("ftoptions", true)
|
|
end
|
|
|
|
function onViewOpen(view)
|
|
if not GetOption("ftoptions") then
|
|
return
|
|
end
|
|
|
|
local ft = view.Buf.Settings["filetype"]
|
|
|
|
if ft == "makefile" or ft == "go" then
|
|
SetOption("tabstospaces", "off")
|
|
elseif ft == "python" or ft == "python2" or ft == "python3" then
|
|
SetOption("tabstospaces", "on")
|
|
end
|
|
end
|