[vim/vim] Documented :DiffOrig command returns `E492: Not an editor command: DiffOrig` (Issue #20048)

10 views
Skip to first unread message

josé rafael vieira

unread,
Apr 23, 2026, 2:59:27 PMApr 23
to vim/vim, Subscribed
jrvieira created an issue (vim/vim#20048)

Steps to reproduce

:DiffOrig

Expected behaviour

see the differences between the current buffer and the file it was loaded from

Version of Vim

9.2

Environment

System: Linux 6.12.82_1
Terminal: foot
$TERM: foot
SHELL: fish

Logs and stack traces


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20048@github.com>

Christian Brabandt

unread,
Apr 23, 2026, 3:05:18 PMApr 23
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#20048)

The help clearly states that you need to define this command


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20048/4307077014@github.com>

josé rafael vieira

unread,
Apr 23, 2026, 3:18:23 PMApr 23
to vim/vim, Subscribed

Closed #20048 as completed.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/20048/issue_event/24810045185@github.com>

josé rafael vieira

unread,
Apr 23, 2026, 3:18:25 PMApr 23
to vim/vim, Subscribed
jrvieira left a comment (vim/vim#20048)

It was not clear to me. Thanks.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20048/4307169305@github.com>

Kylan Byrd

unread,
Jul 10, 2026, 2:06:47 PM (21 hours ago) Jul 10
to vim/vim, Subscribed
AvianAnalyst left a comment (vim/vim#20048)

Its not clearly stated. Its actually not stated at all.

the text "Since 'diff' is a window-local option, it's possible to view the same buffer
in diff mode in one window and "normal" in another window. It is also
possible to view the changes you have made to a buffer since the file was
loaded. Since Vim doesn't allow having two buffers for the same file, you
need another buffer. This command is useful:

command DiffOrig vert new | set buftype=nofile | read ++edit # | 0d_

   \ | diffthis | wincmd p | diffthis

Use ":DiffOrig" to see the differences
between the current buffer and the file it was loaded from.
A buffer that is unloaded cannot be used for the diff. But it does work for
hidden buffers. You can use ":hide" to close a window without unloading the
buffer. If you don't want a buffer to remain used for the diff do ":set
nodiff" before hiding it."

The help should be updated to actually say the command needs to be created, or removed from docs, or added by default. Additionally :DiffOrig is referenced in many places with people askinghow to do this, but they dont say you need to define it. and there are multiple people who have created an issue on this front.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20048/4938169416@github.com>

Reply all
Reply to author
Forward
0 new messages