Skip to content

Instantly share code, notes, and snippets.

View datsfilipe's full-sized avatar
🤍
Grinding

Filipe Lima datsfilipe

🤍
Grinding
View GitHub Profile
@datsfilipe
datsfilipe / autosave.lua
Last active August 17, 2022 13:05 — forked from CyberShadow/autosave.lua
It's a fork from a fork. The intent is to don't save the state while playing mp3 audio files.
-- 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)
" 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