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.
git-diff-details pkg
This project is fork of- 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:toggle
again.
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 d
to see inline diff.tab
to review changes I made, after review hittab
to move to next diff.g r
torevert
,g c
tocopy-removed-text
git-diff-details
package
Differences from original - 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
above
of 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.
undo
command torevert
) - Show all diff kind(
added
,removed
,modified
) whereasgit-diff-details
showsremoved
andmodified
only - As a result this pkg can revert
added
diff too. - Detect closest diff at cursor when
revert
orcopy-removed-text
so that user can revert/copy where cursor is not strictly placed at diff - Activate on
toggle
to avoid Atom startup overhead.