Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij undo history size, not much?

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

How can I increase this?

like image 702
mjs Avatar asked Jul 29 '14 11:07

mjs


People also ask

What is the limit for undo?

Excel and all other Office programs have a default undo/redo maximum of 100 actions. However, you can change this by adding an entry in the Microsoft Windows registry.

Can you see edit history on IntelliJ?

Right-click anywhere in the editor and choose Local History | Show History from the context menu. In the dialog that opens, the left-hand pane shows a list of all saved revisions of the current file with timestamps.

How do I undo all changes in IntelliJ?

You can always undo the changes you've made locally before you commit them: In the Commit tool window Alt+0 , select one or more files that you want to revert, and select Rollback from the context menu, or press Ctrl+Alt+Z .

How do I clear local history in IntelliJ?

On the main menu, choose File | Invalidate Caches/Restart. The Invalidate Caches message appears informing you that the caches will be invalidated and rebuilt on the next start. Use buttons in the dialog to invalidate caches, restart IntelliJ IDEA or both.


2 Answers

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.

like image 189
LazyOne Avatar answered Sep 25 '22 17:09

LazyOne


Actually, based on JetBrains Docs, for changing undo limit you should act just like below steps:

  1. click Help on the top menu:

click help on top menu

  1. Click on Find Action:

click file action

  1. Type Registry and open first result:

type registry and open it

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

find the main keys

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

like image 25
AmerllicA Avatar answered Sep 21 '22 17:09

AmerllicA