# Vim Help: User Manual: Chap 11: Recovering from a crash # Copyright (C) 2006 Bram Moolenaar. # Florian 'eix' Rehnisch , 2008. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: vimhelp 7.0\n" "POT-Creation-Date: 2008-03-05 23:38+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: German \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf8\n" "Content-Transfer-Encoding: 8bit" # type: Plain text #: usr_11.txt:2 #, no-wrap msgid "*usr_11.txt*\tFor Vim version 7.0. Last change: 2006 Apr 24\n" msgstr "" # type: Plain text #: usr_11.txt:4 #, no-wrap msgid "\t\t VIM USER MANUAL - by Bram Moolenaar\n" msgstr "" # type: Plain text #: usr_11.txt:6 #, no-wrap msgid "\t\t\t Recovering from a crash\n" msgstr "" # type: Plain text #: usr_11.txt:12 msgid "" "Did your computer crash? And you just spent hours editing? Don't panic! Vim " "keeps enough information on harddisk to be able to restore most of your " "work. This chapter shows you how to get your work back and explains how the " "swap file is used." msgstr "" # type: Plain text #: usr_11.txt:17 msgid "" "|11.1|\tBasic recovery |11.2|\tWhere is the swap file? |11.3|\tCrashed or " "not? |11.4|\tFurther reading" msgstr "" # type: Plain text #: usr_11.txt:21 #, no-wrap msgid "" " Next chapter: |usr_12.txt| Clever tricks\n" " Previous chapter: |usr_10.txt| Making big changes\n" "Table of contents: |usr_toc.txt|\n" msgstr "" # type: Plain text #: usr_11.txt:22 usr_11.txt:66 usr_11.txt:126 usr_11.txt:268 usr_11.txt:283 #, no-wrap msgid "==============================================================================\n" msgstr "" # type: Plain text #: usr_11.txt:24 #, no-wrap msgid "*11.1*\tBasic recovery\n" msgstr "" # type: Plain text #: usr_11.txt:28 msgid "" "In most cases recovering a file is quite simple, assuming you know which " "file you were editing (and the harddisk is still working). Start Vim on the " "file, with the \"-r\" argument added: >" msgstr "" # type: Plain text #: usr_11.txt:30 #, no-wrap msgid "\tvim -r help.txt\n" msgstr "" # type: Plain text #: usr_11.txt:34 msgid "" "Vim will read the swap file (used to store text you were editing) and may " "read bits and pieces of the original file. If all is well, you will see " "these messages (with different file names, of course):" msgstr "" # type: Plain text #: usr_11.txt:41 #, no-wrap msgid "" "\tUsing swap file \".help.txt.swp\" ~\n" "\tOriginal file \"~/vim/runtime/doc/help.txt\" ~\n" "\tRecovery completed. You should check if everything is OK. ~\n" "\t(You might want to write out this file under another name ~\n" "\tand run diff with the original file to check for changes) ~\n" "\tDelete the .swp file afterwards. ~\n" msgstr "" # type: Plain text #: usr_11.txt:43 msgid "To be on the safe side, write this file under another name: >" msgstr "" # type: Plain text #: usr_11.txt:45 #, no-wrap msgid "\t:write help.txt.recovered\n" msgstr "" # type: Plain text #: usr_11.txt:53 #, no-wrap msgid "" "Compare the file with the original file to check if you ended up with what " "you\n" "expected. Vimdiff is very useful for this |08.7|. Watch out for the " "original\n" "file to contain a more recent version (you saved the file just before the\n" "computer crashed). And check that no lines are missing (something went " "wrong\n" "that Vim could not recover).\n" " If Vim produces warning messages when recovering, read them carefully.\n" "This is rare though.\n" msgstr "" # type: Plain text #: usr_11.txt:59 msgid "" "It's normal that the last few changes can not be recovered. Vim flushes the " "changes to disk when you don't type for about four seconds, or after typing " "about two hundred characters. This is set with the 'updatetime' and " "'updatecount' options. Thus when Vim didn't get a chance to save itself " "when the system went down, the changes after the last flush will be lost." msgstr "" # type: Plain text #: usr_11.txt:61 msgid "If you were editing without a file name, give an empty string as argument: >" msgstr "" # type: Plain text #: usr_11.txt:63 #, no-wrap msgid "\tvim -r \"\"\n" msgstr "" # type: Plain text #: usr_11.txt:65 msgid "You must be in the right directory, otherwise Vim can't find the swap file." msgstr "" # type: Plain text #: usr_11.txt:68 #, no-wrap msgid "*11.2*\tWhere is the swap file?\n" msgstr "" # type: Plain text #: usr_11.txt:72 msgid "" "Vim can store the swap file in several places. Normally it is in the same " "directory as the original file. To find it, change to the directory of the " "file, and use: >" msgstr "" # type: Plain text #: usr_11.txt:74 #, no-wrap msgid "\tvim -r\n" msgstr "" # type: Plain text #: usr_11.txt:80 #, no-wrap msgid "" "Vim will list the swap files that it can find. It will also look in other\n" "directories where the swap file for files in the current directory may be\n" "located. It will not find swap files in any other directories though, it\n" "doesn't search the directory tree.\n" " The output could look like this:\n" msgstr "" # type: Plain text #: usr_11.txt:95 #, no-wrap msgid "" "\tSwap files found: ~\n" "\t In current directory: ~\n" "\t1. .main.c.swp ~\n" "\t\t owned by: mool dated: Tue May 29 21:00:25 2001 ~\n" "\t\t file name: ~mool/vim/vim6/src/main.c ~\n" "\t\t modified: YES ~\n" "\t\t user name: mool host name: masaka.moolenaar.net ~\n" "\t\tprocess ID: 12525 ~\n" "\t In directory ~/tmp: ~\n" "\t -- none -- ~\n" "\t In directory /var/tmp: ~\n" "\t -- none -- ~\n" "\t In directory /tmp: ~\n" "\t -- none -- ~\n" msgstr "" # type: Plain text #: usr_11.txt:102 #, no-wrap msgid "" "If there are several swap files that look like they may be the one you want " "to\n" "use, a list is given of these swap files and you are requested to enter " "the\n" "number of the one you want to use. Carefully look at the dates to decide\n" "which one you want to use.\n" " In case you don't know which one to use, just try them one by one and " "check\n" "the resulting files if they are what you expected.\n" msgstr "" # type: Plain text #: usr_11.txt:105 msgid "USING A SPECIFIC SWAP FILE" msgstr "" # type: Plain text #: usr_11.txt:109 msgid "" "If you know which swap file needs to be used, you can recover by giving the " "swap file name. Vim will then finds out the name of the original file from " "the swap file." msgstr "" # type: Plain text #: usr_11.txt:112 #, no-wrap msgid "" "Example: >\n" "\tvim -r .help.txt.swo\n" msgstr "" # type: Plain text #: usr_11.txt:117 msgid "" "This is also handy when the swap file is in another directory than " "expected. If this still does not work, see what file names Vim reports and " "rename the files accordingly. Check the 'directory' option to see where Vim " "may have put the swap file." msgstr "" # type: Plain text #: usr_11.txt:125 #, no-wrap msgid "" "\tNote:\n" "\tVim tries to find the swap file by searching the directories in the\n" "\t'dir' option, looking for files that match \"filename.sw?\". If\n" "\twildcard expansion doesn't work (e.g., when the 'shell' option is\n" "\tinvalid), Vim does a desperate try to find the file \"filename.swp\".\n" "\tIf that fails too, you will have to give the name of the swapfile\n" "\titself to be able to recover the file.\n" msgstr "" # type: Plain text #: usr_11.txt:128 #, no-wrap msgid "*11.3*\tCrashed or not?\t\t\t\t\t*ATTENTION* *E325*\n" msgstr "" # type: Plain text #: usr_11.txt:132 msgid "" "Vim tries to protect you from doing stupid things. Suppose you innocently " "start editing a file, expecting the contents of the file to show up. " "Instead, Vim produces a very long message:" msgstr "" # type: Plain text #: usr_11.txt:153 #, no-wrap msgid "" "\t\tE325: ATTENTION ~\n" "\tFound a swap file by the name \".main.c.swp\" ~\n" "\t\t owned by: mool dated: Tue May 29 21:09:28 2001 ~\n" "\t\t file name: ~mool/vim/vim6/src/main.c ~\n" "\t\t modified: no ~\n" "\t\t user name: mool host name: masaka.moolenaar.net ~\n" "\t\tprocess ID: 12559 (still running) ~\n" "\tWhile opening file \"main.c\" ~\n" "\t\t dated: Tue May 29 19:46:12 2001 ~\n" " ~\n" "\t(1) Another program may be editing the same file. ~\n" "\t If this is the case, be careful not to end up with two ~\n" "\t different instances of the same file when making changes. ~\n" "\t Quit, or continue with caution. ~\n" " ~\n" "\t(2) An edit session for this file crashed. ~\n" "\t If this is the case, use \":recover\" or \"vim -r main.c\" ~\n" "\t to recover the changes (see \":help recovery\"). ~\n" "\t If you did this already, delete the swap file \".main.c.swp\" ~\n" "\t to avoid this message. ~\n" msgstr "" # type: Plain text #: usr_11.txt:157 msgid "" "You get this message, because, when starting to edit a file, Vim checks if a " "swap file already exists for that file. If there is one, there must be " "something wrong. It may be one of these two situations." msgstr "" # type: Bullet: '1. ' #: usr_11.txt:160 msgid "" "Another edit session is active on this file. Look in the message for the " "line with \"process ID\". It might look like this:" msgstr "" # type: Plain text #: usr_11.txt:162 #, no-wrap msgid "\t\tprocess ID: 12559 (still running) ~\n" msgstr "" # type: Plain text #: usr_11.txt:172 #, no-wrap msgid "" " The text \"(still running)\" indicates that the process editing this " "file\n" " runs on the same computer. When working on a non-Unix system you will " "not\n" " get this extra hint. When editing a file over a network, you may not " "see\n" " the hint, because the process might be running on another computer. In\n" " those two cases you must find out what the situation is yourself.\n" " If there is another Vim editing the same file, continuing to edit " "will\n" " result in two versions of the same file. The one that is written last " "will\n" " overwrite the other one, resulting in loss of changes. You better quit\n" " this Vim.\n" msgstr "" # type: Bullet: '2. ' #: usr_11.txt:176 msgid "" "The swap file might be the result from a previous crash of Vim or the " "computer. Check the dates mentioned in the message. If the date of the " "swap file is newer than the file you were editing, and this line appears:" msgstr "" # type: Plain text #: usr_11.txt:178 #, no-wrap msgid "\t\tmodified: YES ~\n" msgstr "" # type: Plain text #: usr_11.txt:186 #, no-wrap msgid "" " Then you very likely have a crashed edit session that is worth " "recovering.\n" " If the date of the file is newer than the date of the swap file, " "then\n" " either it was changed after the crash (perhaps you recovered it " "earlier,\n" " but didn't delete the swap file?), or else the file was saved before " "the\n" " crash but after the last write of the swap file (then you're lucky: you\n" " don't even need that old swap file). Vim will warn you for this with " "this\n" " extra line:\n" msgstr "" # type: Plain text #: usr_11.txt:188 #, no-wrap msgid " NEWER than swap file! ~\n" msgstr "" # type: Plain text #: usr_11.txt:191 msgid "UNREADABLE SWAP FILE" msgstr "" # type: Plain text #: usr_11.txt:193 msgid "Sometimes the line" msgstr "" # type: Plain text #: usr_11.txt:195 #, no-wrap msgid "\t[cannot be read] ~\n" msgstr "" # type: Plain text #: usr_11.txt:198 msgid "" "will appear under the name of the swap file. This can be good or bad, " "depending on circumstances." msgstr "" # type: Plain text #: usr_11.txt:202 msgid "" "It is good if a previous editing session crashed without having made any " "changes to the file. Then a directory listing of the swap file will show " "that it has zero bytes. You may delete it and proceed." msgstr "" # type: Plain text #: usr_11.txt:209 msgid "" "It is slightly bad if you don't have read permission for the swap file. You " "may want to view the file read-only, or quit. On multi-user systems, if you " "yourself did the last changes under a different login name, a logout " "followed by a login under that other name might cure the \"read error\". Or " "else you might want to find out who last edited (or is editing) the file and " "have a talk with them." msgstr "" # type: Plain text #: usr_11.txt:215 msgid "" "It is very bad if it means there is a physical read error on the disk " "containing the swap file. Fortunately, this almost never happens. You may " "want to view the file read-only at first (if you can), to see the extent of " "the changes that were \"forgotten\". If you are the one in charge of that " "file, be prepared to redo your last changes." msgstr "" # type: Plain text #: usr_11.txt:218 msgid "WHAT TO DO?" msgstr "" # type: Plain text #: usr_11.txt:220 msgid "If dialogs are supported you will be asked to select one of five choices:" msgstr "" # type: Plain text #: usr_11.txt:223 #, no-wrap msgid "" " Swap file \".main.c.swp\" already exists! ~\n" " [O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort, (D)elete it: " "~\n" msgstr "" # type: Plain text #: usr_11.txt:228 #, no-wrap msgid "" "O Open the file readonly. Use this when you just want to view the file " "and\n" " don't need to recover it. You might want to use this when you know " "someone\n" " else is editing the file, but you just want to look in it and not make\n" " changes.\n" msgstr "" # type: Plain text #: usr_11.txt:232 #, no-wrap msgid "" "E Edit the file anyway. Use this with caution! If the file is being " "edited\n" " in another Vim, you might end up with two versions of the file. Vim " "will\n" " try to warn you when this happens, but better be safe then sorry.\n" msgstr "" # type: Plain text #: usr_11.txt:235 #, no-wrap msgid "" "R Recover the file from the swap file. Use this if you know that the " "swap\n" " file contains changes that you want to recover.\n" msgstr "" # type: Plain text #: usr_11.txt:242 #, no-wrap msgid "" "Q Quit. This avoids starting to edit the file. Use this if there is " "another\n" " Vim editing the same file.\n" " When you just started Vim, this will exit Vim. When starting Vim " "with\n" " files in several windows, Vim quits only if there is a swap file for " "the\n" " first one. When using an edit command, the file will not be loaded and " "you\n" " are taken back to the previously edited file.\n" msgstr "" # type: Plain text #: usr_11.txt:246 #, no-wrap msgid "" "A Abort. Like Quit, but also abort further commands. This is useful " "when\n" " loading a script that edits several files, such as a session with " "multiple\n" " windows.\n" msgstr "" # type: Plain text #: usr_11.txt:252 #, no-wrap msgid "" "D Delete the swap file. Use this when you are sure you no longer need " "it.\n" " For example, when it doesn't contain changes, or when the file itself " "is\n" " newer than the swap file.\n" " On Unix this choice is only offered when the process that created " "the\n" " swap file does not appear to be running.\n" msgstr "" # type: Plain text #: usr_11.txt:256 msgid "" "If you do not get the dialog (you are running a version of Vim that does not " "support it), you will have to do it manually. To recover the file, use this " "command: >" msgstr "" # type: Plain text #: usr_11.txt:258 #, no-wrap msgid "\t:recover\n" msgstr "" # type: Plain text #: usr_11.txt:264 msgid "" "Vim cannot always detect that a swap file already exists for a file. This " "is the case when the other edit session puts the swap files in another " "directory or when the path name for the file is different when editing it on " "different machines. Therefore, don't rely on Vim always warning you." msgstr "" # type: Plain text #: usr_11.txt:267 msgid "" "If you really don't want to see this message, you can add the 'A' flag to " "the 'shortmess' option. But it's very unusual that you need this." msgstr "" # type: Plain text #: usr_11.txt:270 #, no-wrap msgid "*11.4*\tFurther reading\n" msgstr "" # type: Plain text #: usr_11.txt:282 #, no-wrap msgid "" "|swap-file|\tAn explanation about where the swap file will be created and\n" "\t\twhat its name is.\n" "|:preserve|\tManually flushing the swap file to disk.\n" "|:swapname|\tSee the name of the swap file for the current file.\n" "'updatecount'\tNumber of key strokes after which the swap file is flushed " "to\n" "\t\tdisk.\n" "'updatetime'\tTimeout after which the swap file is flushed to disk.\n" "'swapsync'\tWhether the disk is synced when the swap file is flushed.\n" "'directory'\tList of directory names where to store the swap file.\n" "'maxmem'\tLimit for memory usage before writing text to the swap file.\n" "'maxmemtot'\tSame, but for all files in total.\n" msgstr "" # type: Plain text #: usr_11.txt:286 msgid "Next chapter: |usr_12.txt| Clever tricks" msgstr "" # type: Plain text #: usr_11.txt:287 msgid "Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:" msgstr ""