This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- autosave.lua script | |
-- Fork from: https://gist.github.com/CyberShadow/2f71a97fb85ed42146f6d9f522bc34ef | |
local options = require 'mp.options' | |
local o = { | |
save_period = 60 | |
} | |
options.read_options(o) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Calls GPT-4 to fill holes in the current file, | |
" omitting collapsed folds to save prompt space | |
local M = {} | |
local function save_visible_lines(dest) | |
local visible_lines = {} | |
local lnum = 1 | |
while lnum <= vim.fn.line('$') do | |
if vim.fn.foldclosed(lnum) == -1 then |