zeroday
V2EX  ›  问与答

不知道是 vim 还是 git 的 bug,保存后的文本文件,重启后消失

  •  
  •   zeroday · Aug 29, 2014 · 2383 views
    This topic created in 4365 days ago, the information mentioned may be changed or developed.

    最近换 Mac 写代码,发现最近写的代码,每次重启后就消失,目前的写代码模式是 vim + git.

    This is my .vimrc.

    https://github.com/arcticlion/dotfile/blob/master/.vimrc

    My git configure.

    ➜ ~ git config --list
    color.ui=true
    alias.lg=log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
    alias.unstage=reset HEAD
    alias.last=log -1
    color.diff.meta=blue black bold
    user.name=arcticlion
    [email protected]
    core.excludesfile=/Users/MasterMac/.gitignore_global
    difftool.sourcetree.cmd=opendiff "$LOCAL" "$REMOTE"
    difftool.sourcetree.path=
    mergetool.sourcetree.cmd=/opt/homebrew-cask/Caskroom/sourcetree/1.9.4.1/SourceTree.app/Contents/Resources/opendiff-w.sh "$LOCAL" "$REMOTE" -ancestor "$BASE" -merge "$MERGED"
    mergetool.sourcetree.trustexitcode=true
    push.default=simple

    Supplement 1  ·  Aug 29, 2014
    奇怪,文件又无缘无故出现,怎么回事呢?
    2 replies    2014-08-29 10:03:26 +08:00
    KDr2
        1
    KDr2  
       Aug 29, 2014
    不是在 /tmp 下保存的吧 :D
    zeroday
        2
    zeroday  
    OP
       Aug 29, 2014
    @KDr2 不是的,保存在 ~/iCode 中.
    倒是 .vimrc 设置了 set dir=/var/tmp,将 swp 文件放在这个目录,不知道是不是这个原因。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1503 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 16:36 · PVG 00:36 · LAX 09:36 · JFK 12:36
    ♥ Do have faith in what you're doing.