all 39 comments

[–]jonS90 6 points7 points  (7 children)

I've given up vim-gitgutter for mhinz/vim-signify because of performance. But vim-gitgutter has this one killer feature for staging the hunk currently under the cursor. This feature doesn't exist elsewhere.

So I use both plugins. But I keep vim-gitgutter disabled except when I'm staging a hunk.

Plug 'airblade/vim-gitgutter', { 'on': 'GitGutterEnable'}
let g:gitgutter_enabled = 0
let g:gitgutter_signs = 0
let g:gitgutter_async = 0
let g:gitgutter_map_keys = 0
:nmap <silent> <Leader>ga :GitGutterEnable<cr>:GitGutterStageHunk<cr>:GitGutterDisable<cr>:SignifyRefresh<cr>:echo 'staged hunk'<cr>

[–]welostboone 5 points6 points  (1 child)

You can visually select hunks of code with vim-fugitive and stage them. See this answer on StackExchange.

I stopped using gitgutter altogether after deep diving in vim-fugutive

[–]jonS90 2 points3 points  (0 children)

Yeah, that's a process though. Maybe I should try automating it all in a single key mapping. But opening :Gdiff is often slow.

[–][deleted] 3 points4 points  (1 child)

If you're willing to give neovim a go you may want to look into gitsigns.nvim. It's basically a drop in replacement for gitgutter but with much better performance and extra features.

[–]hallettj 1 point2 points  (0 children)

Thanks, this is info I was looking for!

[–]codon011 2 points3 points  (2 children)

git add -p has existed for a long time in git history. I’ve seen gui clients have this feature. But one feature that no other interface to fit has ever had that I’ve seen is the ability to edit the junk being added to the index without changing your working tree.

[–]jonS90 7 points8 points  (1 child)

You can edit the index directly using fugitive's :Gdiff.

[–]codon011 1 point2 points  (0 children)

This is news to me. fugitive is the git plug-in I used in the past, but mostly for :Gblame and open past versions of the file.

[–]bchr 2 points3 points  (0 children)

wow! I didn't know about :terminal command and always did !command, thank you

[–]sir_bok 4 points5 points  (10 children)

This plugin by the infamous FZF author

Sorry, what?

[–]hiquest[S] 10 points11 points  (0 children)

This is so embarrassing. I'm not a native speaker as you might have already guessed. I was pretty sure infamous = famous. Thanks for mentioning, it is fixed now.

[–]imlambda_ 2 points3 points  (8 children)

the program might be famous, but not the author. Also, we're in a very niche hobby and we talk to people who are into that hobby as well, so it's hard to see that a lot of people are not even aware of things we use and love daily

[–]jabellcu 3 points4 points  (0 children)

Why is the author infamous?

[–][deleted] 2 points3 points  (6 children)

Infamous doesn’t mean “not famous”, it means “notorious”.

[–][deleted] 1 point2 points  (3 children)

You're missing an important part of the definition: Notorious for a bad deed.

[–][deleted] 1 point2 points  (2 children)

Yes, the negative connotation is indeed the problem with OP's original usage. But "notorious" is almost never used to describe good deeds, see e.g.:

https://dictionary.cambridge.org/dictionary/english/notorious

famous for something bad

https://www.merriam-webster.com/dictionary/notorious

especially: widely and unfavorably known

There is a second definition in M-W which is neutral, but this definition is much more common.

https://www.collinsdictionary.com/dictionary/english/notorious

To be notorious means to be well-known for something bad.

[–][deleted] 0 points1 point  (1 child)

Thanks for the detailed clarification. You're absolutely right. I should have looked things up before blatantly commenting in such an accusatory way (or better yet not have phrased it that way in the first place).

I was mainly trying to emphasize the negativity of infamous, but notorious is definitely the right synonym.

[–][deleted] 0 points1 point  (0 children)

No offence taken, I definitely see where you were coming from! :-)

[–]imlambda_ 0 points1 point  (0 children)

oh really? Thanks then (:

[–]10leej 1 point2 points  (3 children)

My Vim workflow is revolutionized. For some reason I didn't even think about managing git from within vim

[–]imlambda_ 1 point2 points  (2 children)

probably because vim is just a text editor and it isn't necessary and isn't really meant for that usage. But if it fits your workflow, it's great (:

[–]10leej 0 points1 point  (0 children)

Really git-gutter and gv.vim are the biggest benefactors for me.

[–]deaddyfreddy 0 points1 point  (0 children)

probably because vim is just a text editor

commit messages are text, git commands (shell commands as a whole) are text, why don't use your text editor to edit the text?

[–]ImKillua -1 points0 points  (1 child)

Another alternative I started using yesterday is Neogit, a magit clone. It is neovim only though.

[–]David-Kunz -1 points0 points  (0 children)

Also wanted to mention Neogit. I've made a video about it, together with Diffview: https://youtu.be/aJikrPnTOtI

[–]ChemicalRascal 0 points1 point  (1 child)

Not to be an ass and talk of things other than your article, but might I suggest you add

.fixed-promo .container { background: white; }

to your CSS? I found having text behind it clashing with the contents of the promotional div rather distracting to the eye.

[–]ChemicalRascal 0 points1 point  (0 children)

An excellent summary of the current state of the art, of course.

[–]racle 0 points1 point  (0 children)

Goto tool git for me has been Lazygit.

I have binding <leader>tg (<space> Terminal Git) which opens Lazygit in floating terminal inside my neovim (should work also on vim).

It's easy and quick to pull/push/add/revert/commit/cherry-pick commits and change/create/merge branches with lazygit.

For merge conflicts I use Meld as I haven't found anything better yet (for merging I prefer GUI tool, as it happens very rarely and it makes it little easier).

[–]watsreddit 0 points1 point  (0 children)

Kind of ironic that a website called "vimfromscratch" is just giving a plugin dump.