Comments (10)
You can do this with fugitive:
vmap <silent> u <esc>:Gdiff<cr>gv:diffget<cr><c-w><c-w>ZZ
Make sure to use lazyredraw.
from vim-gitgutter.
Done in 92abcce :)
from vim-gitgutter.
cc @ELLIOTTCABLE (I think I saw you were after something like this on vim-fugitive.)
from vim-gitgutter.
I agree, that would be helpful. Similarly it would be nice to be able to add a hunk to git's index.
I'll think about how best to do this...
from vim-gitgutter.
Just throwing in my support. This feature would be great! I'm staring at a line I want to do this too right now. Perhaps add visual mode support for it as well? I.E. Visual mode select 3 lines out of 15 to revert but leave the rest?
from vim-gitgutter.
+1 for visual revert!
On Mar 14, 2013 5:49 PM, "coltjones" [email protected] wrote:
Just throwing in my support. This feature would be great! I'm staring at a
line I want to do this too right now. Perhaps add visual mode support for
it as well? I.E. Visual mode select 3 lines out of 15 to revert but leave
the rest?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/55#issuecomment-14931566
.
from vim-gitgutter.
Anything on this issue.. ?
I don't want to add fugitive only for this 1 feature :(
from vim-gitgutter.
@yugal I just haven't been able to find the time to implement this. It's still feasible but I can't guarantee when I might get to it. Sorry.
from vim-gitgutter.
Ok, I understand. I will try to play around ( If I can contribute )
FYI : This feature is greatly in demand.
from vim-gitgutter.
@kearnh This appears to check out the entire file, rather than just revert the line you're on
from vim-gitgutter.
Related Issues (20)
- b:gitgutter_was_enabled error anytime you run `saveas newfile.txt` HOT 1
- Undefined variable: b:source_window when staging from a floating preview menu HOT 2
- g:gitgutter_close_preview_on_escape is broken when exists('*nvim_open_win') HOT 2
- vim-gitgutter clobbers v:shell_error via autocmd ShellCmdPost HOT 7
- File renames aren't handled properly HOT 13
- Error detected while processing CursorHold HOT 14
- g:gitgutter_diff_base () is invalid HOT 4
- Neovim Nightly Issue HOT 2
- Neovim now prefers extmarks to signs HOT 3
- errors when file path includes colons HOT 3
- Performance issues after base_path fix HOT 5
- Branch rename breaking installations? HOT 1
- g:gitgutter_diff_base () is invalid HOT 10
- Performance issues with big files in the repository HOT 3
- cursorline highlighting doesn't work with gitgutter HOT 3
- gutter colors not showing change on correct line HOT 1
- No hunks (file possibly recognized as binary file) HOT 5
- GitGutterLineHighlightsToggle doesn't update immediately on neovim HOT 3
- GG doesn't show file changes when in a worktree HOT 3
- key map expr needs more backslashes? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-gitgutter.