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

Add new variable g:NERDTreeRemoveFileCmd #816

Merged
merged 1 commit into from
Mar 13, 2018
Merged

Add new variable g:NERDTreeRemoveFileCmd #816

merged 1 commit into from
Mar 13, 2018

Conversation

kutsan
Copy link
Contributor

@kutsan kutsan commented Mar 13, 2018

let g:NERDTreeRemoveFileCmd = 'trash ' and everyone is happy.

@PhilRunninger
Copy link
Member

@kutsan What problem is this code solving? Does vim's delete() function not do what it's supposed to do?

@kutsan
Copy link
Contributor Author

kutsan commented Mar 13, 2018

@PhilRunninger vim's delete() function deletes given item like built-in rm command does, so it's not possible to recover since it's actually gone after invoking it. There are a lot of alternatives that adds functionality to move given item to trash. I use trash-cli for that. If you happen to delete a file with md by mistake, you can still recover from trash with let g:NERDTreeRemoveFileCmd = 'trash '.

@PhilRunninger
Copy link
Member

That's what I suspected. Add some text to the help file, and I'll merge this.

@kutsan
Copy link
Contributor Author

kutsan commented Mar 13, 2018

Thanks! Does it look good now?

Also there isn't any documentation for these variables:

https://github.com/scrooloose/nerdtree/blob/ed446e5cbe0733a8f98befc88d33e42edebb67d2/plugin/NERD_tree.vim#L108

@kutsan
Copy link
Contributor Author

kutsan commented Mar 13, 2018

And by the way, I really don't like having a need for a space character at the end of the command because we can do that programmatically but original author chose to not to and it's like that for 10 years. Now sadly, we can't go back for the sake of backwards compatibility.

@PhilRunninger
Copy link
Member

Thanks for the heads up on the missing doc. I'll add a sentence after I merge.

@PhilRunninger PhilRunninger merged commit b702500 into preservim:master Mar 13, 2018
@kutsan
Copy link
Contributor Author

kutsan commented Mar 13, 2018

@PhilRunninger
Copy link
Member

I'll add those too, soon. I'll also remove the need for the trailing space.

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

Successfully merging this pull request may close these issues.

2 participants