Try to line up tab header with columns.
[profile.git] / .vim / doc / recoverPlugin.txt
1 *recover.vim*   Show differences for recovered files
2
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.
9
10
11 ==============================================================================
12 1. Contents                                                    *recoverPlugin*
13
14         1.  Contents.....................................: |recoverPlugin|
15         2.  recover Manual...............................: |recover-manual|
16         3.  recover Feedback.............................: |recover-feedback|
17         4.  recover History..............................: |recover-history|
18
19 ==============================================================================
20 2. RecoverPlugin Manual                                       *recover-manual*
21
22 Functionality
23
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
27 stored on disk.
28
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
32 file on disk.
33
34 By default this plugin is enabled. To disable it, use >
35     :RecoverPluginDisable
36 <
37 To enable this plugin again, use >
38     :RecoverPluginEnable
39 <
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): >
44
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
48             modified: YES
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
53     Please choose:
54     D[i]ff, (O)pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort, (D)elete:
55
56
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.
61
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).
65
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
71 file.
72                                         *RecoverPluginFinish* *FinishRecovery*
73 In the recovered window, the command >
74     :FinishRecovery
75 <
76 deletes the swapfile closes the diff window and finishes everything up.
77
78 Alternatively you can also use the command >
79     :RecoveryPluginFinish
80 <
81                                                         *RecoverPluginHelp*
82 The command >
83     :RecoverPluginHelp
84 <
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.
87
88                                                        *RecovePlugin-config*
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| >
92
93     :let g:RecoverPlugin_Edit_Unmodified = 1
94 <
95 Note: This only works on Linux.
96
97                                                         *RecoverPlugin-misc*
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|).
102
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|.
108
109 ==============================================================================
110 3. Plugin Feedback                                        *recover-feedback*
111
112 Feedback is always welcome. If you like the plugin, please rate it at the
113 vim-page:
114 http://www.vim.org/scripts/script.php?script_id=3068
115
116 You can also follow the development of the plugin at github:
117 http://github.com/chrisbra/Recover.vim
118
119 Please don't hesitate to report any bugs to the maintainer, mentioned in the
120 third line of this document.
121
122 ==============================================================================
123 4. recover History                                          *recover-history*
124
125 0.18: Aug 14, 2013 "{{{1
126
127 - fix issue 19 (https://github.com/chrisbra/Recover.vim/issues/19, by
128   replacing feedkeys("...\n") by feedkeys("...\<cr>", reported by vlmarek,
129   thanks!)
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!)
137
138 0.17: Feb 16, 2013 "{{{1
139
140 - fix issue 17 (https://github.com/chrisbra/Recover.vim/issues/17 patch by
141   lyokha, thanks!)
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
145
146 0.16: Nov 21, 2012 "{{{1
147
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)
158
159 0.15: Aug 20, 2012 "{{{1
160
161 - fix issue 5 (https://github.com/chrisbra/Recover.vim/issues/5 patch by
162   lyokha, thanks!)
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
166   lyokha, thanks!)
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,
171   thanks!)
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,
176   thanks!)
177
178 0.14: Mar 31, 2012 "{{{1
179
180 - still some problems with issue #4
181
182 0.13: Mar 29, 2012 "{{{1
183
184 - fix issue 3 (https://github.com/chrisbra/Recover.vim/issues/3 reported by
185   lyokha, thanks!)
186 - Ask the user to delete the swapfile (issue
187   https://github.com/chrisbra/Recover.vim/issues/4 reported by lyokha,
188   thanks!)
189
190 0.12: Mar 25, 2012 "{{{1
191
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,
197   thanks!)
198
199 0.11: Oct 19, 2010 "{{{1
200
201 - use confirm() instead of inputdialog() (suggested by D.Fishburn, thanks!)
202
203 0.9: Jun 02, 2010 "{{{1
204
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|
210
211 0.8: Jun 01, 2010 "{{{1
212
213 - make :FinishRecovery more robust
214
215 0.7: Jun 01, 2010 "{{{1
216
217 - |FinishRecovery| closes the diff-window and cleans everything up (suggestion
218   by David Fishburn)
219 - DeleteSwapFile is not needed anymore
220
221 0.6: May 31, 2010 "{{{1
222
223 - |recover-feedback|
224 - Ask to really open a diff buffer for a file (suggestion: David Fishburn,
225   thanks!)
226 - DeleteSwapFile to delete the swap file, that was used to create the diff
227   buffer
228 - change feedkeys(...,'t') to feedkeys('..') so that not every command appears
229   in the history.
230
231 0.5: May 04, 2010 "{{{1
232
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
236
237 0.4: Apr 26, 2010 "{{{1
238
239 - handle Windows and Unix path differently
240 - Code cleanup
241 - Enabled |:GLVS|
242
243 0.3: Apr 20, 2010 "{{{1
244
245 - first public verion
246 - put plugin on a public repository
247   (http://github.com/chrisbra/Recover.vim)
248
249 0.2: Apr 18, 2010 "{{{1
250
251 - Internal version, some cleanup, bugfixes for windows
252
253 0.1: Apr 17, 2010 "{{{1
254
255 - Internal version, First working version, using simple commands
256
257 ==============================================================================
258 Modeline: "{{{1
259 vim:tw=78:ts=8:ft=help:et:fdm=marker:fdl=0:norl