1 *recover.vim* Show differences for recovered files
3 Author: Christian Brabandt <cb@256bit.org>
4 Version: 0.18 Wed, 14 Aug 2013 22:39:13 +0200
5 Copyright: (c) 2009, 2010, 2011, 2012, 2013 by Christian Brabandt
6 The VIM LICENSE applies to recoverPlugin.vim and recoverPlugin.txt
7 (see |copyright|) except use recoverPlugin instead of "Vim".
8 NO WARRANTY, EXPRESS OR IMPLIED. USE AT-YOUR-OWN-RISK.
11 ==============================================================================
12 1. Contents *recoverPlugin*
14 1. Contents.....................................: |recoverPlugin|
15 2. recover Manual...............................: |recover-manual|
16 3. recover Feedback.............................: |recover-feedback|
17 4. recover History..............................: |recover-history|
19 ==============================================================================
20 2. RecoverPlugin Manual *recover-manual*
24 When using |recovery|, it is hard to tell, what has been changed between the
25 recovered file and the actual on disk version. The aim of this plugin is, to
26 have an easy way to see differences, between the recovered files and the files
29 Therefore this plugin sets up an auto command, that will create a diff buffer
30 between the recovered file and the on-disk version of the same file. You can
31 easily see, what has been changed and save your recovered work back to the
34 By default this plugin is enabled. To disable it, use >
37 To enable this plugin again, use >
40 When you open a file and vim detects, that an |swap-file| already exists for a
41 buffer, the plugin presents the default Swap-Exists dialog from Vim adding one
42 additional option for Diffing (but leaves out the lengthy explanation about
43 handling Swapfiles that Vim by default shows): >
45 Found a swap file by the name "test/normal/.testfile.swp"
46 owned by: chrisbra dated: Wed Nov 28 16:26:42 2012
47 file name: ~chrisbra/code/git/vim/Recover/test/normal/testfile
49 user name: chrisbra host name: R500
50 process ID: 4878 [not existing]
51 While opening file "test/normal/testfile"
52 dated: Tue Nov 6 20:11:55 2012
54 D[i]ff, (O)pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort, (D)elete:
57 (Note, that additionally, it shows in the process ID row the name of the
58 process that has the process id or [not existing] if that process doesn't
59 exist.) Simply use the key, that is highlighted to chose the option. If you
60 press Ctrl-C, the default dialog of Vim will be shown.
62 If you have said 'Diff', the plugin opens a new vertical splitt buffer. On the
63 left side, you'll find the file as it is stored on disk and the right side
64 will contain your recovered version of the file (using the found swap file).
66 You can now use the |merge| commands to copy the contents to the buffer that
67 holds your recovered version. If you are finished, you can close the diff
68 version and close the window, by issuing |:diffoff!| and |:close| in the
69 window, that contains the on-disk version of the file. Be sure to save the
70 recovered version of you file and afterwards you can safely remove the swap
72 *RecoverPluginFinish* *FinishRecovery*
73 In the recovered window, the command >
76 deletes the swapfile closes the diff window and finishes everything up.
78 Alternatively you can also use the command >
85 show a small message, on what keys can be used to move to the next different
86 region and how to merge the changes from one windo into the other.
89 If you want Vim to automatically edit any file that is open in another Vim
90 instance but is unmodified there, you need to set the configuration variable:
91 g:RecoverPlugin_Edit_Unmodified to 1 like this in your |.vimrc| >
93 :let g:RecoverPlugin_Edit_Unmodified = 1
95 Note: This only works on Linux.
98 If your Vim was built with |+balloon_eval|, recover.vim will also set up an
99 balloon expression, that shows you, which buffer contains the recovered
100 version of your file and which buffer contains the unmodified on-disk version
101 of your file, if you move the mouse of the buffer. (See |balloon-eval|).
103 If you have setup your 'statusline', recover.vim will also inject some info
104 (which buffer contains the on-disk version and which buffer contains the
105 modified, recovered version). Additionally the buffer that is read-only, will
106 have a filename (|:f|) of something like 'original file (on disk-version)'. If
107 you want to save that version, use |:saveas|.
109 ==============================================================================
110 3. Plugin Feedback *recover-feedback*
112 Feedback is always welcome. If you like the plugin, please rate it at the
114 http://www.vim.org/scripts/script.php?script_id=3068
116 You can also follow the development of the plugin at github:
117 http://github.com/chrisbra/Recover.vim
119 Please don't hesitate to report any bugs to the maintainer, mentioned in the
120 third line of this document.
122 ==============================================================================
123 4. recover History *recover-history*
125 0.18: Aug 14, 2013 "{{{1
127 - fix issue 19 (https://github.com/chrisbra/Recover.vim/issues/19, by
128 replacing feedkeys("...\n") by feedkeys("...\<cr>", reported by vlmarek,
130 - fix issue 20 (https://github.com/chrisbra/Recover.vim/issues/20,
131 (let vim automatically edit a file, that is unmodified in another vim
132 instance, suggested by rking, thanks!)
133 - merge issue 21 (https://github.com/chrisbra/Recover.vim/pull/21, create more
134 usefule README.md file, contribted by Shubham Rao, thanks!)
135 - merge issue 22 (https://github.com/chrisbra/Recover.vim/pull/22, delete BufReadPost autocommand
136 contributed by Marcin Szamotulski, thanks!)
138 0.17: Feb 16, 2013 "{{{1
140 - fix issue 17 (https://github.com/chrisbra/Recover.vim/issues/17 patch by
142 - Use default key combinations in the dialog of the normal Vim dialog (adding
143 only the Diff option)
144 - Make sure, the process ID is shown
146 0.16: Nov 21, 2012 "{{{1
148 - Recovery did not work, when original file did not exists (issue 11
149 https://github.com/chrisbra/Recover.vim/issues/11
150 reported by Rking, thanks!)
151 - By default, delete swapfile, if no differences found (issue 15
152 https://github.com/chrisbra/Recover.vim/issues/15
153 reported by Rking, thanks!)
154 - reset 'swapfile' option, so that Vim by default creates .swp files
155 (idea and patch by Marcin Szamotulski, thanks!)
156 - capture and display |E325| message (and also try to figure out the name of
157 the pid (issue 12 https://github.com/chrisbra/Recover.vim/issues/12)
159 0.15: Aug 20, 2012 "{{{1
161 - fix issue 5 (https://github.com/chrisbra/Recover.vim/issues/5 patch by
163 - CheckSwapFileExists() hangs, when a swap file was not found, make sure,
164 s:Swapname() returns a valid file name
165 - fix issue 6 (https://github.com/chrisbra/Recover.vim/issues/6 patch by
167 - Avoid recursive :redir call (https://github.com/chrisbra/Recover.vim/pull/8
168 patch by Ingo Karkat, thanks!)
169 - Do not set 'bexpr' for unrelated buffers (
170 https://github.com/chrisbra/Recover.vim/pull/9 patch by Ingo Karkat,
172 - Avoid aborting the diff (https://github.com/chrisbra/Recover.vim/pull/10
173 patch by Ingo Karkat, thanks!)
174 - Allow to directly delete the swapfile (
175 https://github.com/chrisbra/Recover.vim/issues/7 suggested by jgandt,
178 0.14: Mar 31, 2012 "{{{1
180 - still some problems with issue #4
182 0.13: Mar 29, 2012 "{{{1
184 - fix issue 3 (https://github.com/chrisbra/Recover.vim/issues/3 reported by
186 - Ask the user to delete the swapfile (issue
187 https://github.com/chrisbra/Recover.vim/issues/4 reported by lyokha,
190 0.12: Mar 25, 2012 "{{{1
192 - minor documentation update
193 - delete swap files, if no difference found (issue
194 https://github.com/chrisbra/Recover.vim/issues/1 reported by y, thanks!)
195 - fix some small issues, that prevented the development versions from working
196 (https://github.com/chrisbra/Recover.vim/issues/2 reported by Rahul Kumar,
199 0.11: Oct 19, 2010 "{{{1
201 - use confirm() instead of inputdialog() (suggested by D.Fishburn, thanks!)
203 0.9: Jun 02, 2010 "{{{1
205 - use feedkeys(...,'t') instead of feedkeys() (this works more reliable,
206 although it pollutes the history), so delete those spurious history entries
207 - |RecoverPluginHelp| shows a small help message, about diff commands
208 (suggested by David Fishburn, thanks!)
209 - |RecoverPluginFinish| is a shortcut for |FinishRecovery|
211 0.8: Jun 01, 2010 "{{{1
213 - make :FinishRecovery more robust
215 0.7: Jun 01, 2010 "{{{1
217 - |FinishRecovery| closes the diff-window and cleans everything up (suggestion
219 - DeleteSwapFile is not needed anymore
221 0.6: May 31, 2010 "{{{1
224 - Ask to really open a diff buffer for a file (suggestion: David Fishburn,
226 - DeleteSwapFile to delete the swap file, that was used to create the diff
228 - change feedkeys(...,'t') to feedkeys('..') so that not every command appears
231 0.5: May 04, 2010 "{{{1
233 - 0r command in recover plugin adds extra \n
234 Patch by Sergey Khorev (Thanks!)
235 - generate help file with 'et' set, so the README at github looks prettier
237 0.4: Apr 26, 2010 "{{{1
239 - handle Windows and Unix path differently
243 0.3: Apr 20, 2010 "{{{1
245 - first public verion
246 - put plugin on a public repository
247 (http://github.com/chrisbra/Recover.vim)
249 0.2: Apr 18, 2010 "{{{1
251 - Internal version, some cleanup, bugfixes for windows
253 0.1: Apr 17, 2010 "{{{1
255 - Internal version, First working version, using simple commands
257 ==============================================================================
259 vim:tw=78:ts=8:ft=help:et:fdm=marker:fdl=0:norl