Vim Git Gutter
github.com
github.com
But I was able to get a rough prototype running.
Screenshot: https://dl.dropbox.com/u/8554242/dmitri/projects/Conception/...
I started the project a year ago. I wanted to have the power and flexibility to achieve anything, and use OpenGL for graphics so there'd be no restrictions as to what can be put on screen. Plus I've been using C++ for many years before for making indie games.
Back then, I was even more motivated to work on it because I felt C++ itself badly needed a more efficient way or writing it. I really dislike the manual duplication it forces you to create and maintain as you change things (e.g. cpp and header files). But even with a more script-like high level language like Go, I feel there is a lot of potential to innovate past a basic text editor. I'm gonna find out.
Edit: Found it – it’s https://github.com/shurcooL/Conception, a research project IDE that you’re working on.
But sadly the Emacs mode calls git synchronously which can lead to a significant slow down when switching buffers. I hope that gets fixed.
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.
Just pointing out that lately there has been a lot of Vim related posts that are being up-voted. Maybe that's been the case for a while, and I am just noticing it.
Anyway, my comment was meant more as a light humour rather than critical.
Also noteworthy is that that the gutter only updates when the file is saved.
[1] Screenshot: http://imgur.com/TIGKVRS
I'll (I'm the author) probably make this the default because it seems quite a common wish.
Great plugin by the way, super handy.
edit: Also, thanks airblade. I think I'm going to keep using this.
hi SignColumn ctermbg=232 guibg=#080808
au VimEnter * highlight clear SignColumn
Thanks for your work!
Some other things to consider: The sign column and line numbers are separated by the fold column. The default colorscheme has SignColumn and FoldColumn the same (Cyan or DarkBlue on Grey) and different from LineNr (Yellow or Brown).
That and who has lua on their system (I mean, i do for Love but that's irrelevant) or wants to install it just to use a git/hg plugin?
I tried
let g:gitgutter_enabled = 1
but that does seem to work.I'll have a poke through the source.
Although I suppose you can work around this by displaying a fake sign (color match gutter background?), but that has its downsides (depending on colorscheme, the sign can show up. and vim doesn't support whitespace characters for signs, at least not from what I can see).
It seems to just grep through the diff itself, so adding a fake sign would be a pain and, as you mentioned, probably not display correctly anyway.
I'm sure my eyes will adjust :).
http://superuser.com/questions/558876/how-can-i-make-the-sig...
It just makes sense that someone would port it and become the #1 story.
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?
ETA: also note that git-cloning into bundle means that upgrading is just a question of entering the plugin directory and running git pull.
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.
- removal - git submodules - conditional loading of plugins
:BundleUpdate when you've got 20 plugins homes across Github and vim.org is a huge timesaver.
Is this expected? I save quite frequently, it's an unconscious reflex at this point.
map <leader>gd :!cd %:p:h && GIT_PAGER='' git diff HEAD -- %:t<CR><CR> highlight clear signcolumn
let g:gitgutter_enabled = 0
nmap <leader>gu :GitGutterToggle<CR>
I prefer my buffers to start with it disabled by default and toggle as needed.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!
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.
Thanks!
I find it really useful in particular for working with Mercurial patch queues. I have a command in my .vimrc that will run ReversePatchReview on the topmost patch in my patch queue. It pops up a diff tab for each file that has changed. I can easily use "[c" and "]c" to jump between changes within each file.
This setup makes it incredibly easy to review the changes a patch makes, and it's so convenient that I often write quite a bit of my code inside these diff views. I don't think I could live without vim-patchreview when working with Mercurial.
And there is more customisable as well
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.also, who the hell sets their font size that small? (screenshot in the readme). that's a sociopathically small font size. I will never trust you airblade. never.
In other words, why not both?