18 lines
813 B
Lua
18 lines
813 B
Lua
-- Keymaps are automatically loaded on the VeryLazy event
|
|
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
|
-- Add any additional keymaps here
|
|
|
|
vim.api.nvim_create_user_command("W", "w", {})
|
|
vim.api.nvim_create_user_command("Wq", "wq", {})
|
|
|
|
local function scratchpad()
|
|
local buf = vim.api.nvim_create_buf(false, true)
|
|
vim.api.nvim_buf_set_lines(buf, 0, -1, true, { "Scratch", "", "" })
|
|
local win = vim.api.nvim_open_win(buf, true, { split = "left" })
|
|
vim.api.nvim_win_set_cursor(win, { 3, 0 })
|
|
-- " optional: change highlight, otherwise Pmenu is used
|
|
-- vim.api.nvim_set_option_value("winhl", "Normal:MyHighlight", { win = win })
|
|
end
|
|
|
|
vim.api.nvim_set_keymap("n", "<leader>fs", "", { callback = scratchpad, desc = "Open scratchpad" })
|