Live data from Hacker News

Vim Git Gutter

github.com

51–60 of 119 posts

Re: Vim Git Gutter

#51
post #39

Earlier quoted context omitted.

Or you could, e.g., use the Lua scripting extension, load one of the native threading libraries for Lua (Lua Lanes, for example) and fire away a few background tasks. Whatever actions the background tasks need to perform with the buffers you'd have to serialize, but that shouldn't be all that difficult.

So long as any plugin script is running, vim will block waiting for it. And if you fire off a background process and exit from your main script, any reference to the vim environment within your child process becomes useless, so you can't modify anything in vim from within there anymore. I'm not entirely familiar with the lua scripting extension, but this was my experience attempting the same thing in python. I mean,…

You'd have to implement a message queue, of course. As for the second part, who hasn't? Many applications are using Lua as we speak.

Re: Vim Git Gutter

#52
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.)

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

Re: Vim Git Gutter

#53
post #31
post #6

It'd be perfect if the signs changed in real-time without the need to save first. Awesome work though. Thanks Andy.

That's a lot of "git diff" calls!

In the Sublime version, one of the things I did to avoid that is it doesn't call `git diff` if it has been less then 5 seconds since the last `git diff`.

Re: Vim Git Gutter

#54
post #3

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

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 would appreciate this to be the default.

Thanks for your work!

Re: Vim Git Gutter

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

Also gotta love the ability to open commits in Github in IntelliJ and the other JetBrains IDE's. Great for sending a link to a line of code.

Re: Vim Git Gutter

#57
post #3

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

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.

Very cool... I'm going to keep using this!

Re: Vim Git Gutter

#58

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.

Hey guys, we've got an emacs user over here.

Re: Vim Git Gutter

#59
post #3

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

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.

Alternatively, using `hi! link SignColumn LineNr` will ensure that styling the user has applied to the more commonly used line numbering column will match the sign column used by vim-gitgutter.
Post reply on HN