diff --git a/lua/general-options.lua b/lua/general-options.lua index d81c3eb..e9538e2 100644 --- a/lua/general-options.lua +++ b/lua/general-options.lua @@ -49,6 +49,8 @@ for _,o in ipairs(set_true) do vim.o[o] = true end +-- folds +vim.g.ip_skipfold=true -- window management vim.o.tw = 80 diff --git a/lua/mappings.lua b/lua/mappings.lua index 5986542..76880e0 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -30,3 +30,9 @@ vim.api.nvim_set_keymap("n", "y", '"+y', {noremap = true, silent = true} vim.api.nvim_set_keymap("v", "y", '"+y', {noremap = true, silent = true}) vim.api.nvim_set_keymap("n", "pp", '"+p', {noremap = true, silent = true}) vim.api.nvim_set_keymap("v", "pp", '"+p', {noremap = true, silent = true}) + +-- z0…z9 to open folds to a certain level + +for i=0,9 do + vim.api.nvim_set_keymap('n', 'z' .. i , ':set fdl=' .. i .. '', {noremap = true, silent = false}) +end