Live data from Hacker News

Vim Git Gutter

github.com

21–30 of 119 posts

Re: Vim Git Gutter

#21
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?

Re: Vim Git Gutter

#22
post #18

Awesome work! Cheers airblade. One nitpicky thing though, why do you use "_" and not "-" for removed lines? Can't see why you wouldn't want it vertically centered!

Removed lines happen between existing lines, so using an underscore makes it look like that.

Compare:

    25  - def foo():
    26       baz()
With:

    25  _ def foo():
    26       baz()
(Where there used to be a bar() call before baz().) The first version makes it look like the `def foo():` was somehow removed.

Re: Vim Git Gutter

#23

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?

If you decide you no longer want a particular plugin, or want to upgrade it, it can be hard to tease out the files you /bin/cp'd into place. Adding a single folder under bundle makes removal easier later.

ETA: also note that git-cloning into bundle means that upgrading is just a question of entering the plugin directory and running git pull.

Re: Vim Git Gutter

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

Re: Vim Git Gutter

#25

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?

It lets you put your various vim things inside a single 'bundle' directory instead of having files in plugin/ftplugin and whatnot. Very convenient and easy to setup.

Re: Vim Git Gutter

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

I had the same problem, I did:

au VimEnter * highlight clear SignColumn

Re: Vim Git Gutter

#27

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?

Each plugin resides in it's own directory, rather than being scattered around your .vim dir. Try to remove one of your installed plugins, you'll have to dig around and it'll be messy.

Also it makes it easier to update, since all you need to do is replace the folder with the newer version and you're all set.

Re: Vim Git Gutter

#28

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.

As far as I know Vim is single-threaded; you can't run operations asynchronously.

That's neither here not there. You have plenty of things which are single threaded but allow concurrency (Twisted, NodeJS...). That it does not have an asynchronous API is something different.

Re: Vim Git Gutter

#29

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?

[deleted]

Re: Vim Git Gutter

#30

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, I did: au VimEnter * highlight clear SignColumn

Works like a charm, thanks :)
Post reply on HN