This package provides the following services:
This package consumes the following services:
What's this?
Inline git diffs in editor. Can revert/copy specific diff.

This project is fork of git-diff-details pkg
- This package is fork of great git-diff-details package by @samu.
- This package is a result of experiment to make original git-diff-details how I want.
- I asked to @samu about releasing this fork project as distinct package.
- This project is greatly owning to original @samu's work. Thanks for great successor and his kindness for allowing me to release this pkg.
Commands
inline-git-diff:toggle: Enable/disable inline diffinline-git-diff:revert: Revert diff at cursorinline-git-diff:copy-removed-text: Copy removed diff to clipboard
How to use
- Open editor then execute
inline-git-diff:toggle.(handled per editor basis) - You can
revert(inline-git-diff:revert) orcopy(inline-git-diff:copy-removed-text) - Disable by executing
inline-git-diff:toggleagain.
keymap
For default keymap, see this file.
Here is my keymap
'atom-text-editor.vim-mode-plus.normal-mode':
'g d': 'inline-git-diff:toggle'
'atom-workspace:not(.has-narrow) atom-text-editor.vim-mode-plus.normal-mode.has-inline-git-diff':
'tab': 'git-diff:move-to-next-diff'
'shift-tab': 'git-diff:move-to-previous-diff'
'atom-text-editor.vim-mode-plus.normal-mode.has-inline-git-diff':
'g r': 'inline-git-diff:revert'
'g c': 'inline-git-diff:copy-removed-text'
My workflow is
g dto see inline diff.tabto review changes I made, after review hittabto move to next diff.g rtorevert,g ctocopy-removed-text
Differences from original git-diff-details package
- No config options
- Simpler inner-line diff(word diff) by partitioning diff part just two part(same and not-same range)
- Removed diff lines are rendered at
aboveof removed place not atbelow - Flash copied text on
copy-removed-text- No flash on
revert, I tried and given up because I couldn't achieve smooth fadeout effect as it is incopy-removed-text
- No flash on
- Show all diffs in editor instead of just showing diff at cursor
- Rename command names(e.g.
undocommand torevert) - Show all diff kind(
added,removed,modified) whereasgit-diff-detailsshowsremovedandmodifiedonly - As a result this pkg can revert
addeddiff too. - Detect closest diff at cursor when
revertorcopy-removed-textso that user can revert/copy where cursor is not strictly placed at diff - Activate on
toggleto avoid Atom startup overhead.