local _g = getfenv(0) _g.doc = _g.editor.get_active_doc() _g.window = _g.editor.get_active_window()