Live data from Hacker News

Vim Git Gutter

github.com

81–90 of 119 posts

Re: Vim Git Gutter

#81
post #3

Earlier quoted context omitted.

You can achieve that manually with `highlight clear SignColumn` in your colour scheme or ~/.vimrc. I'll (I'm the author) probably make this the default because it seems quite a common wish.

I've added it at the bottom of ~/.vimrc, but for some reason it doesn't work until I explicitly type `highlight clear SignColumn` while editing a document. Any ideas why this could be happening? Great plugin by the way, super handy.

You colour scheme is probably overriding it. You might want to edit your colour scheme's script and add it there.

Re: Vim Git Gutter

#82
post #24

Seems to add noticeable latency (1+ seconds) to my save, each time. Vim is unresponsive during this time Is this expected? I save quite frequently, it's an unconscious reflex at this point.

Yes, the plugin runs the diff command when a document is saved/loaded. See the discussion here: http://news.ycombinator.com/item?id=5326654

Re: Vim Git Gutter

#83

Sublime Text Version https://github.com/jisaacks/GitGutter

Not to take away from the post, anyone else feeling a bit of Vim overload in the past few days? I'm pretty much Vim'ed out with all the Vim related postings.

I don't really understand what you mean. People submit vim-related content, which then gets upvoted and brought to everyone's attention on Hacker News.

It might just be that it actually reflects people's interests. Given how established vim and emacs are, I have to say I'm not surprised, they remain extremely versatile and complete developing environments to this day.

Re: Vim Git Gutter

#84

An aside question; what's the deal with "pathogen"? I've been using the "/bin/cp" command for years installing vim plugins and it's worked remarkably well; requiring just about 1 invocation on average... What problem does that thing solve?

I have 5 separate computers that I run vim on. Manually installing and updating is a huge pain. I keep my .vimrc in git to keep them all synchronized.

Why can't you also keep your .vim in git too then? It seems to work well for me. see: https://github.com/kristopolous/vimbuild

Re: Vim Git Gutter

#85
post #7

Earlier quoted context omitted.

I've added it at the bottom of ~/.vimrc, but for some reason it doesn't work until I explicitly type `highlight clear SignColumn` while editing a document. Any ideas why this could be happening? Great plugin by the way, super handy.

I had the same problem at first. Try putting it after wherever you're loading the plugin itself. edit: Also, thanks airblade. I think I'm going to keep using this.

I experimented a bit more and found if I put it before my "syntax on" and color scheme setup lines it doesn't work, but if I put it after them the fix works. Raticide's comment clued me in.

Re: Vim Git Gutter

#86
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.

Using the vim Fugitive you can quickly toggle a git blame sidebar to determine all this similar type of information.

Re: Vim Git Gutter

#87

Is there any way to make it so that the gutter is always present? There's a bit of a noticeable jump to include it when I save a file, it's sort of annoying me. I tried let g:gitgutter_enabled = 1 but that does seem to work. I'll have a poke through the source.

The answer is here:

http://superuser.com/questions/558876/how-can-i-make-the-sig...

Re: Vim Git Gutter

#88
post #72

Earlier quoted context omitted.

I use both. If I need a full diff, fugitive is great. Sometimes I just want to scan to see what lines I changed in a a file. In other words, it is impractical to use this plugin to find out what _files_ you've changed. It is great for finding out what lines in whatever file you've opened have changed.

fugitive split diff shows you what lines you've changed. stop using both.

No. You you do your thing. I'll do this. I don't want to have to run another command to see what lines have changed in my file. I want small, non-intrusive icons in the gutter without doing a damned thing.

Re: Vim Git Gutter

#89
post #8

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

Ok, as a challenge, I'm gonna try make a Conception version, brb.

All right, I think I'll stop here. Parsing the -U0 ranges in raw C++ is gonna be too much wasted effort. I'll finish this another time, likely after switching to Go.

But I was able to get a rough prototype running.

Screenshot: https://dl.dropbox.com/u/8554242/dmitri/projects/Conception/...

Re: Vim Git Gutter

#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 other VCS. Open source yay!

Post reply on HN