是否有代码编辑器可以恢复到以前的版本?

发布于 2024-09-28 21:44:41 字数 87 浏览 2 评论 0原文

我正在用 javascript 编写一个非常大的文件,并且由于我在新版本中创建的错误,我一直想回到以前的版本。是否有任何代码编辑器可以让您恢复到以前版本的代码?

I am coding in javascript a very big file and I keep wanting to go back to a previous version because of bugs I have created in the new version. Are there any code editors that allow you to revert to a previous version of the code?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

紫南 2024-10-05 21:44:41

我认为你需要的不是一个特定的编辑器。您需要一个版本控制系统,例如 Subversion 或 git。所以您仍然可以继续使用您最喜欢的编辑器。

Subversion (http://subversion.tigris.org/)

Git (http://git-scm.com/)

I think what you need is not a specific editor. You need a version control system like Subversion or git. So you can still keep using your favourite editor.

Subversion (http://subversion.tigris.org/)

Git (http://git-scm.com/)

纵山崖 2024-10-05 21:44:41

这称为版本控制,每个开发人员都应该默认使用。版本控制系统有很多,看看SVNGitMercurial

有些编辑器与版本控制系统集成,但它始终是一个单独的系统。

This is called Version Control and is something every developer should use by default. There are many version control systems, have a look at SVN, Git, Mercurial, et al.

Some editors are integrated with a version control system, but it's always a separate system.

陌上芳菲 2024-10-05 21:44:41

是的,Emacs 和 Vim 都可以做到这一点:

http://www.emacswiki.org/emacs/RevisionControlSystem

http://www.vim.org/scripts/script.php?script_id =89

但是,我同意其他答案,版本控制系统会更合适并且更容易学习(假设您还不知道Emacs或Vim)。

Yes, both Emacs and Vim can do this:

http://www.emacswiki.org/emacs/RevisionControlSystem

http://www.vim.org/scripts/script.php?script_id=89

However, I agree with the other answers, a version control system would be more appropriate and easier to learn (assuming you don't already know Emacs or Vim).

夜吻♂芭芘 2024-10-05 21:44:41

我非常同意 Prine 的回答——您可能正在寻找版本控制,并且许多编辑器本身就支持它。然而,如果您只是在寻找一个可以显示您在过去几分钟内所做的更改的编辑器,vim 和 emacs 都有“撤消树”的概念,可以让您可视化您在其中所做的撤消和重写。会话过程:

Emacs 撤消树的屏幕截图
(来源:briancarper.net

I very much agree with Prine's answer -- you're probably looking for version control, and many editors support it natively. However, if you're just looking for an editor that will show you changes you just made in the last few minutes, vim and emacs both have the concept of "undo trees" that let you visualize the undos and rewrites you've made in the course of a session:

Screenshot of Emacs' undo tree
(source: briancarper.net)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文