Fork me on GitHub
#spacemacs
<
2019-04-02
>
practicalli-johnny12:04:34

@ag I also use diff-hl but I seem to remember this is only because I prefer the style of markings in the margin that diff-hl makes. I will try git-gutter again, as I notice that it will show changes to the unsaved parts of the file too. This is the relevant parts of my .spacemacs layer configuration

(git :variables
          git-magit-status-fullscreen t
          git-enable-github-support t
          git-gutter-use-fringe t)

     (version-control :variables
                      version-control-diff-tool 'diff-hl
                      version-control-global-margin t) 

martinklepsch15:04:13

Hm, I really like the way diff-hl highlights things but staging hunks is also something that I'd use a lot — from what I gather that only works with git-gutter?

ag16:04:51

You can stage hunks and even individual lines in Magit

martinklepsch17:04:24

guess it's time for me to invest some time into this magit thing everyone is always talking about then 😄

practicalli-johnny17:04:54

I stage changes using magit status, SPC m s, use TAB to open changes on a file, use v to select lines within a hunk and s to stage. You cant select correctly over a hunk boundary, you would need to do two separate selects I occasionally do the same for staged changes if I have staged too much. u to un-stage.

martinklepsch07:04:48

Thanks! I was missing the TAB bit and the visual selection thing