2012-06-29 78 views
5

我沒有看到Copy命令的菜單選項。下面是我在我的Windows 7計算機上看到的菜單:Windows 7中的NerdTree拷貝命令

NERDTree Menu. Use j/k/enter and the shortcuts indicated 
========================================================== 
> (a)dd a childnode 
    (m)ove the curent node 
    (d)elete the curent node 

據插件documentation,不支持在所有平臺上Copy命令。

A textual filesystem menu is provided which allows you to create/delete/move file 
and directory nodes as well as copy (for supported OSs) 

有沒有人設法讓它在Windows中工作?

+0

您是否已經嘗試在該提示處推送'c'? – mraaroncruz

+0

是的,按'c'不起作用。 –

+1

顯然,[其他人正面臨同樣的問題](https://github.com/scrooloose/nerdtree/issues/152),但似乎沒有人關心。另外,請參閱NERDTree作者的[本文](http://got-ravings.blogspot.fr/2008/07/windows-copying-commands-suck-giant.html)。 – romainl

回答

2

在這blog post(ht romainl)中詳細討論了問題的根本原因(相當鮮豔)。 我設法通過使用cp.exe附帶msygit找到解決方案。

確保cp.exe在路徑

cp.exe文件可以在<GIT_HOME>\bin目錄中找到。我的路徑並不包含``\ bin directory. So I copied cp.exe and msys-1.0.dll`到我的路徑中的一個目錄。

設置g:NERDTreeCopyCmd變量

加入線下到_vimrc文件

let g:NERDTreeCopyCmd= 'cp -r ' 

年底修復s:Path.copy功能的實現。

更換線~/vimfiles/bundle/nerdtree/plugin/NERD_tree.vim 2297年至2299年(假定使用病原體用於管理VIM插件)

  • 更換線2297至2299年

    let dest = s:Path.WinToUnixPath(a:dest) 
    
    let cmd = g:NERDTreeCopyCmd . " " . escape(self.str(), s:escape_chars) . " " . escape(dest, s:escape_chars) 
    
  • 隨着線下面

    let dest = a:dest 
    let cmd = 0 
    if s:running_windows 
        let cmd = g:NERDTreeCopyCmd . '"' . self.str() . '" "' . dest . '"' 
    else 
        let cmd = g:NERDTreeCopyCmd . " " . escape(self.str(), s:escape_chars) . " " . escape(dest, s:escape_chars) 
    endif 
    
+1

此提示不再適用。你必須在第166行左右編輯vimfiles/bundle/nerdtree/lib/nerdtree/path.vim。並且使用「nerdtree#runningWindows()」而不是「s:running_windows」 – tharibo