Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create, rename, duplicate files #1263

Closed
fcsonline opened this issue Sep 14, 2021 · 2 comments · Fixed by #1265
Closed

Unable to create, rename, duplicate files #1263

fcsonline opened this issue Sep 14, 2021 · 2 comments · Fixed by #1265
Labels

Comments

@fcsonline
Copy link

First, of all, thanks for this awesome plugin!! 👏

Since this commit 0e71462 I'm unable to create, rename or duplicate files with NerdTree. I get this error message:

Error detected while processing function nerdtree#ui_glue#invokeKeyMap
NERDTreeCopyNode:                              
E117: Unknown function: trim                                                                                                                                                 
E15: Invalid expression: trim(input(prompt, currentNode.path.str(), 'file'))                                                                                                                                                                                                            
E121: Undefined variable: newNodePath                                                                                                                                        
E15: Invalid expression: newNodePath !=# '

If I pick the previous commit it works as expected.

Self-Diagnosis

I think that since the mentioned commit, the code uses a trim function that is not available in that context.

Environment

  • Operating System: Ubuntu 18.
  • Vim/Neovim version :version: Vim 8.0
  • NERDTree version, found on first line of quickhelp ?: 6.10.13
  • Are you using any of these NERDTree-dependent plugins? Nope
  • Provide a minimal .vimrc file that will reproduce the issue.
call plug#begin('~/.vim/plugged')                                                                                                                                        
Plug 'preservim/nerdtree'   
call plug#end()

Steps to Reproduce the Issue

  1. Open nerdtree
  2. Try to copy, rename or create files
  3. You get the error

Expected Result

The file is duplicate, rename or create

@fcsonline
Copy link
Author

Thanks!

@PhilRunninger
Copy link
Member

You're welcome. Who could have imagined trim() was added so recently?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants