Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Windows 7: copy option unavailable #152

wizonesolutions opened this Issue · 2 comments

3 participants


I hit m next to the item I want to copy, but I only get
(a)dd a childnode
(m)ove the current node
(d)elete the current node

Windows limitation or NERDTree configured badly?


The root cause for the issue is discussed in detail(rather colorfully) at this blog post. I managed to find a solution by using the cp.exe shipped with msygit.

Ensure cp.exe is in your path

The cp.exe file can be found in <GIT_HOME>\bin directory. My path didn't not contain the `<GIT_HOME>\bin directory. So I copied cp.exe and msys-1.0.dll to a directory in my path.

Set the g:NERDTreeCopyCmd variable

Add the line below to the end of the _vimrc file

let g:NERDTreeCopyCmd= 'cp -r '

Fix the implementation of s:Path.copy function.

Replace the lines 2297-2299 of ~/vimfiles/bundle/nerdtree/plugin/NERD_tree.vim

  • Replace the lines 2297-2299

    let dest = s:Path.WinToUnixPath(a:dest)
    let cmd = g:NERDTreeCopyCmd . " " . escape(self.str(), s:escape_chars) . " " . escape(dest, s:escape_chars)
  • With the lines below

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

I had Gow installed, which provides command line interfaces for most of the basic Unix commands.

I only had to add

let g:NERDTreeCopyCmd= 'cp -r'

as suggested by @kandadaboggu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.