try and make everything confined to 80chars

This commit is contained in:
2025-05-18 22:32:28 -04:00
parent d0155fcc7c
commit f9311db805
6 changed files with 38 additions and 20 deletions

View File

@ -24,14 +24,22 @@ map("n", "<leader>x", function() -- execute order 111
if vim.fn.getftype(fn) == "file" then
local perm = vim.fn.getfperm(fn)
if string.match(perm, "x", 3) then
vim.notify("Removed executable flags", vim.log.levels.INFO, { title = misc.appid })
vim.fn.setfperm(fn, string.sub(fn, 1, 2).."-"..string.sub(fn, 4, 5).."-"..string.sub(fn, 7, 8).."-")
vim.notify("Removed executable flags", vim.log.levels.INFO, {
title = misc.appid
})
vim.fn.setfperm(fn, string.sub(fn, 1, 2).."-"..string.sub(fn, 4, 5).."-"
..string.sub(fn, 7, 8).."-")
else
vim.notify("Add executable flags", vim.log.levels.INFO, { title = misc.appid })
vim.fn.setfperm(fn, string.sub(fn, 1, 2).."x"..string.sub(fn, 4, 5).."x"..string.sub(fn, 7, 8).."x")
vim.notify("Add executable flags", vim.log.levels.INFO, {
title = misc.appid
})
vim.fn.setfperm(fn, string.sub(fn, 1, 2).."x"..string.sub(fn, 4, 5).."x"
..string.sub(fn, 7, 8).."x")
end
else
vim.notify("File doesn't exist", vim.log.levels.INFO, { title = misc.appid })
vim.notify("File doesn't exist", vim.log.levels.INFO, {
title = misc.appid
})
end
end, { desc = "toggle executable flag of the file" })
@ -50,7 +58,8 @@ vim.keymap.set("n", "z=", function()
end
local cword = vim.fn.expand("<cword>")
local prompt = "Change "..vim.inspect(cword).." to:"
vim.ui.select(vim.fn.spellsuggest(cword, vim.o.lines), { prompt = prompt }, spell_on_choice)
vim.ui.select(vim.fn.spellsuggest(cword, vim.o.lines), { prompt = prompt },
spell_on_choice)
end, { desc = "Shows spelling suggestions" })
-- quickfix