move file_exists

This commit is contained in:
2025-07-24 22:34:59 +02:00
parent 895677e300
commit 1c551020ff
+10 -10
View File
@@ -92,16 +92,6 @@ vim.api.nvim_create_autocmd("BufEnter", {
end,
})
local function file_exists(name) --{{{1
local f = io.open(name,"r")
if f~=nil then
f:close()
return true
else
return false
end
end
-- LAZY.NVIM BOOTSTRAP {{{1
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
@@ -596,6 +586,16 @@ require'lazy'.setup{ --{{{1
xmap g; <Plug>(snippy-cut-text)
]]
local function file_exists(name)
local f = io.open(name,"r")
if f~=nil then
f:close()
return true
else
return false
end
end
vim.api.nvim_create_user_command(
'S',
function ()