oh I looked at the aspell plugin source and it looks like they are using strings for the option which is confusing (so that they can have an "auto" option). So the option shouldn't be set to a boolean, but rather either the string "on" or "off". Try this -- hopefully it works:
function toggleAspell(bp) if bp.Buf.Settings["aspell.check"] == "on" then bp.Buf:SetOptionNative("aspell.check", "off") elseif bp.Buf.Settings["aspell.check"] == "off" then bp.Buf:SetOptionNative("aspell.check", "on") end end
You can add behavior if the option is "auto" too if you want.
Hey, does anyone know for sure if
net/http is working in lua? I'm not sure if I'm doing something wrong, but this code:
local http = import("net/http") function init() micro.Log(http) micro.Log(http.Get) micro.Log(http.Get("http://127.0.0.1:9000/testfile.txt")) end
gives me a
runtime error: invalid memory address or nil pointer dereference on any of the lines in init...
hsplitcommand and then run
termin one of the splits
perl -pi -e 's/\\, \\^A Select All\\, \\^D Duplicate Line\\, \\^T New Tab/, ^D Find Next, ^T New Tab, Alt-,\/. Switch Tab/' /usr/bin/micro