From 1c551020ff5063d8fe3936da737d8e3dda9a94dd Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Thu, 24 Jul 2025 22:34:59 +0200 Subject: [PATCH] move file_exists --- init.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/init.lua b/init.lua index 9263191..9519d5e 100644 --- a/init.lua +++ b/init.lua @@ -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; (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 ()