Files

17 lines
375 B
Lua
Raw Permalink Normal View History

2026-06-16 16:26:28 +01:00
local M = {}
function M.open(name)
local titles = {
zsh = 'ZSH Cheat Sheet',
bash = 'Bash Cheat Sheet',
regex = 'RegExp Cheat Sheet',
}
local path = vim.fn.stdpath 'config' .. '/cheatsheets/' .. name .. '.md'
print('Opening cheat sheet: ' .. path)
require('../helpers').open_file_modal(path, titles[name] or name)
end
return M