From 58bf5b89525ed7aa38709437e139173758484f52 Mon Sep 17 00:00:00 2001 From: srdusr Date: Sun, 16 Jul 2023 03:19:05 +0200 Subject: Add undotree keybinding --- lua/user/keys.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lua/user') diff --git a/lua/user/keys.lua b/lua/user/keys.lua index d16af95..2ba14dd 100644 --- a/lua/user/keys.lua +++ b/lua/user/keys.lua @@ -170,7 +170,8 @@ map("i", "", "") map("n", "", "!clear") -- Change file to an executable -map("n", "x", ":lua require('user.mods').Toggle_executable() | :echom ('Toggle executable') | :sl! | echo ('')") +map("n", "x", + ":lua require('user.mods').Toggle_executable() | :echom ('Toggle executable') | :sl! | echo ('')") --map("n", "x", ":!chmod +x %") -- Paste without replace clipboard @@ -267,6 +268,7 @@ map('n', '', 'NavigatorDown') map({ "n", "t" }, "gg", "lua Lazygit_toggle()") -- Fugitive git bindings +map("n", "gs", vim.cmd.Git) map("n", "ga", ":Git add %:p") --map("n", "gs", ":Gstatus") map("n", "gc", ":Gcommit -v -q") @@ -316,7 +318,8 @@ map("n", "fw", [[lua require'plugins.telescope'.find_projects() map("n", "fm", "lua require('telescope').extensions.media_files.media_files({})") -- find media files map("n", "fi", "lua require('telescope').extensions.notify.notify({})") -- find notifications --map("n", "f/", "lua require('plugins.telescope').curbuf()") -- find files with hidden option -map("n", "fF", ":cd %:p:h:pwdlua require('user.mods').findFilesInCwd()", { noremap = true, silent = true, desc = "Find files in cwd" }) +map("n", "fF", ":cd %:p:h:pwdlua require('user.mods').findFilesInCwd()", + { noremap = true, silent = true, desc = "Find files in cwd" }) -- FZF map("n", "fz", "lua require('fzf-lua').files()") @@ -324,6 +327,9 @@ map("n", "fz", "lua require('fzf-lua').files()") -- Nvim-tree map("n", "f", ":NvimTreeToggle", {}) +-- Undotree +map('n', 'u', vim.cmd.UndotreeToggle) + -- Markdown-preview map("n", "md", "MarkdownPreviewToggle") map("n", "mg", "Glow") -- cgit v1.2.3