新手问题 使用 MacVim 在 Octopress 写博客遇到的问题

stephentseng · April 28, 2013 · Last by jinleileiking replied at April 29, 2013 · 2810 hits

用 MacVim 编辑 Octopress 的文章,在rake deploy的时候 MacVim 的.swap 档会导致错误,报错信息如下

[email protected]~/octopress]$ rake deploy
cp -r source/_posts/.2013-04-28-test.markdown.swp public/_posts/.2013-04-28-test.markdown.swp
rake aborted!
No such file or directory - public/_posts/.2013-04-28-test.markdown.swp
/Users/Stephen/octopress/Rakefile:229:in `block (2 levels) in <top (required)>'
/Users/Stephen/octopress/Rakefile:228:in `block in <top (required)>'
/Users/Stephen/octopress/Rakefile:218:in `block in <top (required)>'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
/Users/Stephen/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => copydot
(See full trace by running task with --trace)

查了 Google 和 Baidu,都没找到可行的解决方案,每次都要手工把.swap 档删掉才能rake deploy,不知道有没有人遇到类似的问题,有顺利解决的,谢谢。

那你把手工删.swap 档 写进 deploy 里面。就自动化了

Vim 可以配置不生成 swap 的,查一下手册::h swap

已经把 Vim 配置成不生成 swap 了,非常感谢。

一个 bug,我提过 issue。好像要在最新分支搞定。你改一下 rakefile 就行了

You need to Sign in before reply, if you don't have an account, please Sign up first.