From 2659b42ce134645dcfe138050f481979e609eecd Mon Sep 17 00:00:00 2001 From: c Date: Mon, 3 Apr 2023 01:42:12 -0500 Subject: [PATCH] git stuff --- nvim/.config/nvim/after/plugin/which-key.lua | 5 ++++- nvim/.config/nvim/lua/clint/keybindings.lua | 6 ++++++ nvim/.config/nvim/test.py | 18 ++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 nvim/.config/nvim/test.py diff --git a/nvim/.config/nvim/after/plugin/which-key.lua b/nvim/.config/nvim/after/plugin/which-key.lua index 7048666..2771e89 100644 --- a/nvim/.config/nvim/after/plugin/which-key.lua +++ b/nvim/.config/nvim/after/plugin/which-key.lua @@ -18,7 +18,10 @@ wk.register({ name = "+git", g = "LazyGit", f = "Git Files", - b = "Git Blame", + b = "Git Blame (show)", + n = "Next hunk", + N = "Prev hunk", + }, r = { name = "+repl", diff --git a/nvim/.config/nvim/lua/clint/keybindings.lua b/nvim/.config/nvim/lua/clint/keybindings.lua index 491f701..c3ab1ca 100644 --- a/nvim/.config/nvim/lua/clint/keybindings.lua +++ b/nvim/.config/nvim/lua/clint/keybindings.lua @@ -67,6 +67,12 @@ keymap("n", "s", [[:%s/\<\>//gI]], keymap('n', 'gg', ':LazyGit', default_ops) keymap('n', 'gf', ':Telescope git_files', default_ops) keymap('n', 'gb', ':Gitsigns toggle_deleted', default_ops) +keymap('n', ']h', ':Gitsigns next_hunk', default_ops) +keymap('n', '[h', ':Gitsigns prev_hunk', default_ops) +keymap('n', 'gr', ':Gitsigns reset_hunk', default_ops) +keymap('n', 'gp', ':Gitsigns preview_hunk', default_ops) +keymap('n', 'gs', ':Gitsigns stage_hunk', default_ops) +keymap('n', 'gu', ':Gitsigns undo_stage_hunk', default_ops) -- File Explorer keymap('n', 'e', ':NeoTreeFocusToggle', default_ops) diff --git a/nvim/.config/nvim/test.py b/nvim/.config/nvim/test.py new file mode 100644 index 0000000..4906e64 --- /dev/null +++ b/nvim/.config/nvim/test.py @@ -0,0 +1,18 @@ + + +def forloop(): + + for i in range(10): + if i % 2 == 0: + print("x") + print(i) + +def add(x, y): + + print(f"{x} + {y} = {x+y}\n") + +def subtract(x, y): + + print(f"{x} - {y} = {x-y}\n") + +# open terminal 100: f1