Temporarily edit a vim document without actually changing file

9 views
Skip to first unread message

Julius Hamilton

unread,
Sep 9, 2021, 7:11:19 AM9/9/21
to v...@vim.org
Hey,

I was curious, is there any mode or plug-in in Vim where you could preview the result of a command, for example a global search and replace function, but by default the edit has not actually been written to file, and that requires a specific command to actually save the previewed changed?

Thank you,
Julius

Magnus Woldrich

unread,
Sep 9, 2021, 7:14:32 AM9/9/21
to vim...@googlegroups.com, Vim mailing list
That's the default behavior. Nothing is written to disk unless you tell it to.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAEsMKX1%2B3L1Zy0nTuwz%2BgjK%3DU0eQHMfz0hyTDA60ZYG10u1iuQ%40mail.gmail.com.

jr

unread,
Sep 9, 2021, 7:21:04 AM9/9/21
to vim...@googlegroups.com
hi,

On Thu, 9 Sept 2021 at 12:11, Julius Hamilton
<juliusha...@gmail.com> wrote:
> I was curious, is there any mode or plug-in in Vim where you could preview the result of a command,

if after executing a command the result is not what you expected, will
a simple "undo" not do?

> for example a global search and replace function, but by default the edit has not actually been written to file, and that requires a specific command to actually save the previewed changed?
>
> Thank you,
> Julius

--
regards, jr.

You have the right to free speech, as long as you're not dumb enough
to actually try it.
(The Clash 'Know Your Rights')
Reply all
Reply to author
Forward
0 new messages