wozers
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
local misc = require("core.misc")
|
||||
local map = misc.map
|
||||
local map = core.misc.map
|
||||
|
||||
-- vim binds
|
||||
vim.g.mapleader = " " -- set leader key
|
||||
@ -25,20 +24,20 @@ map("n", "<leader>x", function() -- execute order 111
|
||||
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
|
||||
title = core.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
|
||||
title = core.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
|
||||
title = core.misc.appid
|
||||
})
|
||||
end
|
||||
end, { desc = "toggle executable flag of the file" })
|
||||
|
Reference in New Issue
Block a user