Vim
Vim copied to clipboard
How to Clear Vim's Undo History?
Hi, I'm trying to see if a can remap shift+ZZ to just clear vim's history, save the file, and keep the tab open. This all works except for clearing the undo history, i.e. vim.vimState.historyTracker.removeMarks ( just a shot in the dark looking at the plugin code not sure how / if this is exposed to the editor in a way you could execute like what's seen below ). Is there anyway to reset the undo history?
settings.json
...,
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["Z", "Z"],
"commands": [
"vim.vimState.historyTracker.removeMarks",
"workbench.action.files.save"
]
}
],
...,