Keybind for quickly entering date
This commit is contained in:
parent
4dd66fe924
commit
29b4c57dcc
1 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
local function insert_current_date()
|
||||
local date = vim.fn.system('date "+%a %d %b"'):gsub('\n', '')
|
||||
vim.api.nvim_put({date}, 'c', false, true)
|
||||
end
|
||||
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
|
@ -8,5 +13,7 @@ return {
|
|||
{ "<leader>s", "<cmd>:Telescope live_grep<cr>", desc = "Search file content (requires ripgrep)" },
|
||||
{ "<leader>>", "<cmd>:lua vim.diagnostic.goto_next()<cr>", desc = "Jump to next issue" },
|
||||
{ "<leader><", "<cmd>:lua vim.diagnostic.goto_prev()<cr>", desc = "Jump to prev issue" },
|
||||
{ "<leader>t", insert_current_date, desc = "Enter current date" },
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue