From 2f483e68303c33d6aa3723d887b09998c3f20ee4 Mon Sep 17 00:00:00 2001 From: nil Date: Tue, 14 Jan 2025 20:14:37 +0100 Subject: init --- lua/niliara/folding.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lua/niliara/folding.lua (limited to 'lua/niliara/folding.lua') diff --git a/lua/niliara/folding.lua b/lua/niliara/folding.lua new file mode 100644 index 0000000..552ae29 --- /dev/null +++ b/lua/niliara/folding.lua @@ -0,0 +1,10 @@ +vim.api.nvim_create_autocmd({"BufWinLeave"}, { + pattern = {"*.*"}, + desc = "save view (folds), when closing file", + command = "mkview", +}) +vim.api.nvim_create_autocmd({"BufWinEnter"}, { + pattern = {"*.*"}, + desc = "load view (folds), when opening file", + command = "silent! loadview" +}) -- cgit v1.2.3