I tried try: ct = vim.exists("colors_name") # doesn't work when not defined except vim.error: curr_color = "none" if ct > 0: curr_color = vim.eval('colors_name') and got AttributeError: 'module' object has no attribute 'exists' apparently 'exists' is supported in vim, but not python's portal to it