2017-10-15 2 views
0

vim에서 충돌 한 파일을 복구하는 데 문제가 있습니다. 나는 또한 읽을 수있는 라인을 포함하는 .test.py.swp 파일을 가지고 있는데, 그 중에는 문자열 choice도 포함되어있다. -r 옵션을 사용하거나 열기로 012im또는 E을 누르면 해당 test.py 파일을 vim과 함께 열려고 시도하면 문자열이 표시되지 않습니다.vim에서 복구가 실패합니다.

E325: ATTENTION 
Found a swap file by the name ".analyze_minima_results.py.swp" 
      owned by: sringe dated: Sun Oct 15 14:37:00 2017 
     file name: /scratch/users/sringe/MinimaHopping/analyze_minima_results.py 
      modified: YES 
     user name: sringe host name: sherlock-ln01.stanford.edu 
     process ID: 22589 
While opening file "analyze_minima_results.py" 
      dated: Sun Oct 15 12:32:49 2017 

(1) Another program may be editing the same file. If this is the case, 
    be careful not to end up with two different instances of the same 
    file when making changes. Quit, or continue with caution. 
(2) An edit session for this file crashed. 
    If this is the case, use ":recover" or "vim -r analyze_minima_results.py" 
    to recover the changes (see ":help recovery"). 
    If you did this already, delete the swap file ".analyze_minima_results.py.swp" 
    to avoid this message. 

Swap file ".analyze_minima_results.py.swp" already exists! 
"analyze_minima_results.py" 382L, 11693C 
Using swap file ".analyze_minima_results.py.swp" 
Original file "/scratch/users/sringe/MinimaHopping/analyze_minima_results.py" 
E308: Warning: Original file may have been changed 
Recovery completed. You should check if everything is OK. 
(You might want to write out this file under another name 
and run diff with the original file to check for changes) 
You may want to delete the .swp file now. 

복구 된 파일이 문자열 choice 포함되어 있지 않기 때문에 뭔가, 잘못된 것 같다 : 그것은 나에게 메시지를 제공합니다. .swp 파일을 완전히 복구 할 수있는 다른 옵션이 있습니까? 파일에 코드가 정말 필요합니다 ...

실제로 파일을 .nfsxxxxxxx 백업 파일에서 복구 할 수 있습니다. 어쨌든 이런 문제를 다루는 것이 좋을까요

답변

0

방금 ​​.py 파일에 .py.swp 파일이 들어 맞지 않아서 vim이 항상 .py 파일을 다시 열었습니다. .py 파일을 제거하고 vim -r을 통해 .py.swp을 열면이 문제가 해결됩니다.

관련 문제