Pregunta

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 with is 999 and 9999 and 99999 but it still too short on undos.

How can I increase this ?

¿Fue útil?

Solución

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

I've failed to see what "clipboard settings" has to do with "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 hardcore person who prefer to hit Ctrl + Z quite 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.

Otros consejos

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top