forked from aniani/vim
Add the 'undoreload' option to be able to undo a file reload.
This commit is contained in:
@@ -7361,6 +7361,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
file on buffer read.
|
||||
The directory where the undo file is stored is specified by 'undodir'.
|
||||
For more information about this feature see |undo-persistence|.
|
||||
The undo file is not read when 'undoreload' causes the buffer from
|
||||
before a reload to be saved for undo.
|
||||
WARNING: this is a very new feature. Use at your own risk!
|
||||
|
||||
*'undolevels'* *'ul'*
|
||||
@@ -7382,6 +7384,22 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
< This helps when you run out of memory for a single change.
|
||||
Also see |clear-undo|.
|
||||
|
||||
*'undoreload'* *'ur'*
|
||||
'undoreload' 'ur' number (default 10000)
|
||||
global
|
||||
{not in Vi}
|
||||
Save the whole buffer for undo when reloading it. This applies to the
|
||||
":e!" command and reloading for when the buffer changed outside of
|
||||
Vim. |FileChangedShell|
|
||||
The save only happens when this options is negative or when the number
|
||||
of lines is smaller than the value of this option.
|
||||
Set this option to zero to disable undo for a reload.
|
||||
|
||||
When saving undo for a reload, any undo file is not read.
|
||||
|
||||
Note that this causes the whole buffer to be stored in memory. Set
|
||||
this option to a lower value if you run out of memory.
|
||||
|
||||
*'updatecount'* *'uc'*
|
||||
'updatecount' 'uc' number (default: 200)
|
||||
global
|
||||
|
||||
@@ -1029,8 +1029,10 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'undodir' options.txt /*'undodir'*
|
||||
'undofile' options.txt /*'undofile'*
|
||||
'undolevels' options.txt /*'undolevels'*
|
||||
'undoreload' options.txt /*'undoreload'*
|
||||
'updatecount' options.txt /*'updatecount'*
|
||||
'updatetime' options.txt /*'updatetime'*
|
||||
'ur' options.txt /*'ur'*
|
||||
'ut' options.txt /*'ut'*
|
||||
'vb' options.txt /*'vb'*
|
||||
'vbs' options.txt /*'vbs'*
|
||||
@@ -6081,6 +6083,7 @@ hl-Directory syntax.txt /*hl-Directory*
|
||||
hl-ErrorMsg syntax.txt /*hl-ErrorMsg*
|
||||
hl-FoldColumn syntax.txt /*hl-FoldColumn*
|
||||
hl-Folded syntax.txt /*hl-Folded*
|
||||
hl-Ignore syntax.txt /*hl-Ignore*
|
||||
hl-IncSearch syntax.txt /*hl-IncSearch*
|
||||
hl-LineNr syntax.txt /*hl-LineNr*
|
||||
hl-MatchParen syntax.txt /*hl-MatchParen*
|
||||
|
||||
@@ -40,9 +40,6 @@ Add documentation for Python 3 support.
|
||||
New patch 2010 Jul 24
|
||||
Docs patch by Dominique Pelle, Mar 25 included?
|
||||
|
||||
'undoreload' option: when fewer lines than these consider a reload as a change
|
||||
action and save the text before the reload, don't clear undo info.
|
||||
|
||||
Patch for :find completion. (Nazri Ramliy)
|
||||
But I prefer to keep term.h and include/term.h He will work on it.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version7.txt* For Vim version 7.3b. Last change: 2010 Jul 20
|
||||
*version7.txt* For Vim version 7.3b. Last change: 2010 Jul 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -7171,6 +7171,9 @@ Added ":earlier 1f" and ":later 1f".
|
||||
Add file save counter to undo information.
|
||||
Added the |undotree()| and |undofile()| functions.
|
||||
|
||||
Also added the 'undoreload' option. This makes it possible to save the
|
||||
current text when reloading the buffer, so that it can be undone.
|
||||
|
||||
|
||||
More encryption *new-more-encryption*
|
||||
---------------
|
||||
|
||||
@@ -722,6 +722,8 @@ call <SID>OptionG("km", &km)
|
||||
call <SID>Header("editing text")
|
||||
call append("$", "undolevels\tmaximum number of changes that can be undone")
|
||||
call append("$", " \tset ul=" . &ul)
|
||||
call append("$", "undoreload\tmaximum number lines to save for undo on a buffer reload")
|
||||
call append("$", " \tset ur=" . &ur)
|
||||
call append("$", "modified\tchanges have been made and not written to a file")
|
||||
call append("$", "\t(local to buffer)")
|
||||
call <SID>BinOptionL("mod")
|
||||
|
||||
Reference in New Issue
Block a user