From 77c36838ea8a8c13daecfb37c998595087747850 Mon Sep 17 00:00:00 2001 From: Practicalli Engineering Date: Thu, 23 Jan 2025 01:46:42 +0000 Subject: [PATCH] basics: navigate git hunks with gitsigns key mappings --- CHANGELOG.md | 1 + docs/neovim-basics/navigation.md | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8011a586..6bc07660 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ - source-control: new magit screenshots & gitlinker plugin use - reference: started folding page - clojure: refactor namespace with Clojure LSp via command line +- basics: navigate git hunks with gitsigns key mappings ### Changed - ci: spell lychee & repository trufflehog linters warn only (false positives) diff --git a/docs/neovim-basics/navigation.md b/docs/neovim-basics/navigation.md index c336a328..6827d5b0 100644 --- a/docs/neovim-basics/navigation.md +++ b/docs/neovim-basics/navigation.md @@ -157,6 +157,20 @@ Navigate within the current file or globally using file marks. > AstroNvim user config enables `incsearch` incremental search and `hlsearch` to highlight every search match +## Git + +AstroNvim includes [Gitsigns](https://github.com/lewis6991/gitsigns.nvim) which highlights changes to the working directory in the buffer margin. + +Git hunks can be navigated + +- ++bracket-left++ ++"g"++ jumps to previous hunk +- ++bracket-right++ ++"g"++ jumps to next hunk +- ++bracket-left++ ++"G"++ jumps to first hunk +- ++bracket-right++ ++"G"++ jumps to last hunk + +> [Source Control](/neovim/source-control/index.md) section describes additional features of Gitsigns and other Git tools. + + ## Projects ++colon++ ++"c"++ ++"d"++ followed by a path changes the root directory for Neovim.