2012-11-24 63 views
0

如果我用下面的內容創建一個文件test.vim並運行:so %然後filereadable返回true,並且foo,bar被追加到文件中。Vim filereadable對用戶腳本返回true,對插件返回false

let lines = ["foo", "bar"] 
let g:neobundle#log_filename=expand('~/.vim/plugin_install.log') 
if filereadable(g:neobundle#log_filename) 
    let lines = readfile(g:neobundle#log_filename) + lines 
endif 
call writefile(lines, g:neobundle#log_filename) 


但是,如果我從neobundle.vim運行完全相同的代碼(代碼突出here)然後filereadable返回false,並且文件被覆蓋。即使我chmod 777的文件。


什麼可能導致這種filereadable行爲的變化,我該如何解決?

回答

0

neobundle的日誌在安裝之前被清除。 (代碼是here

+0

謝謝!我打開了一個pull請求來清除日誌文件可選https://github.com/Shougo/neobundle.vim/pull/47 –

相關問題