Live data from Hacker News

Vim Git Gutter

github.com

101–110 of 119 posts

Re: Vim Git Gutter

#101
post #90

I'm really impressed with this -- I would love to see this see functionality for other VCSes (subversion, etc) so that I could use it with my non-git projects. The vimscript looks pretty clean -- maybe I have a new weekend project ahead of me. edit: just a quick hack for a "vim svn gutter": https://github.com/prg318/vim-gitgutter The code is really clean and it would be fairly trivial to adopt this for use with any o…

svndiff (http://www.vim.org/scripts/script.php?script_id=1881) works with SVN, Git and others.

Both sign-diff (http://www.vim.org/scripts/script.php?script_id=2712) and changesPlugin (http://www.vim.org/scripts/script.php?script_id=3052) are VCS-agnostic: they show differences between the saved state and the current state.

Re: Vim Git Gutter

#102
post #44

Eclipse pretty much does this out of the box. I guess so do IntelliJ and Visual Studio. You can also display the name of the last person to change a line in the same position (ie. svn/git blame), which is very useful to quickly find out who to talk to regarding a section of a file. The commit message is displayed on mouseover.

Yes, IntelliJ handles this pretty nicely. For modified lines, you can mouse over to see what you changed. For all changes, you can click a context menu to revert any given change. (Of course, that does require touching a mouse... though I believe you can set up a key mapping for it.)

Netbeans has the same functionality, so I guess it's something that has become "standard" in most IDEs

Re: Vim Git Gutter

#103
post #8

Obligatory Emacs version: https://github.com/syohex/emacs-git-gutter

Use https://github.com/syohex/emacs-git-gutter-fringe if you want the symbols in the fringe.

But sadly the Emacs mode calls git synchronously which can lead to a significant slow down when switching buffers. I hope that gets fixed.

Re: Vim Git Gutter

#104

Earlier quoted context omitted.

Yes, IntelliJ handles this pretty nicely. For modified lines, you can mouse over to see what you changed. For all changes, you can click a context menu to revert any given change. (Of course, that does require touching a mouse... though I believe you can set up a key mapping for it.)

Shift+F10 opens the right click menu in most contexts.

And before anyone asks, you can easily access the menu contents with the keyboard.

Re: Vim Git Gutter

#106

I've also got a similar plugin https://bitbucket.org/sirpengi/iwilldiffer that works with hg as well as git. Mine uses python though, nice to see an implementation that's all in viml. Neither of our plugins are async though (so vim ui will block while the diff is running), which is the biggest hurdle I want to cross.

This is fantastic. Thank you.

Re: Vim Git Gutter

#107

Ugh, someone submitted the original Sublime version to hackers news 2 months go http://news.ycombinator.com/item?id=5027308 and it got no love. It just makes sense that someone would port it and become the #1 story.

Maybe because there are more vim users than sublime users on hn? FWIW i did see that story on front-page of hn and it's what prompted me to immediately write my vim-port. I finished it like a few days after that.

Re: Vim Git Gutter

#109

This is really nice, but I wish the background color of the gutter would automatically match the rest of my background. The gray band [1] is pretty unappealing IMO. Also noteworthy is that that the gutter only updates when the file is saved. [1] Screenshot: http://imgur.com/TIGKVRS

What colorscheme? Is it just not changing the default colors for the SignColumn group?

Re: Vim Git Gutter

#110
Any way to bind "toggle the gutter" so I can press my "set nonumber" button and have it toggle the gutter as well? [edit] Apparently I didn't read down far enough! This functionality exists already through the plugin. This works for me: nnoremap :set nonumber! ToggleGitGutter
Post reply on HN