Intellij undo history size, not much?

后端 未结 3 806
情话喂你
情话喂你 2020-12-24 02:34

I like to be able to undo basically several hours of work in a file. I am unsure how to configure this.

In IntelliJ settings, the clipboard settings I have tried wi

相关标签:
3条回答
  • Actually, based on JetBrains Docs, for changing undo limit you should act just like below steps:

    1. click Help on the top menu:

    1. Click on Find Action:

    1. Type Registry and open first result:

    1. On the opened window file undo.documentUndoLimit and undo.globalUndoLimit and change it to number what you want.

    HINT: After change you should close your JetBrains IDE and open it again.

    0 讨论(0)
  • 2020-12-24 03:15

    In Intellij settings the clipboard settings I have tried with are 999 and 9999 and 99999 but it still too short on undos.

    I've failed to see what "clipboard settings" have to do with the "undo limit" (or with "undo" at all). Care to explain?


    Local History is definitely the way to go here as it works across sessions, files, and whole folders -- you can undo very complex operations in one click (e.g. replace/refactor in multiple files).


    In any case: if Local History is to complex or you are a hardcore person who prefers to hit Ctrl + Z quite a few times in a row instead of few clicks with Local History, you can increase undo limit (which is 100 steps by default). For that:

    • Open Registry (Help | Find Action... and type registry)
    • Find undo.documentUndoLimit entry and set your limit to a higher number (e.g. 1000).

    P.S. IDE restart may be required.

    0 讨论(0)
  • 2020-12-24 03:15

    The "Maximum number of contents to keep in clipboard" setting has nothing to do with undos.

    In fact, there is no configurable "undo history size" setting in IntelliJ. See this support issue:

    For rolling back complex code changes gone awry, a far better option is to use the local history.

    Local History is available under the menu "VCS" -> "Local History" -> "Show History". The feature is explained as:

    IntelliJ IDEA tracks any changes you make to your source files or any other file, as well as the changes that affect a directory’s content and structure. This feature will protect you from any accidental losses or modifications, even if made by other applications outside IntelliJ IDEA. Setting version labels is also available. Any time you can inspect the history of either a particular file or directory and rollback to any of its previous versions.

    0 讨论(0)
提交回复
热议问题