-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Cannot Open Files Whose Filename Includes a Dollar Sign #420
Comments
Note that in the given example, the same incorrect behavior happens with the
This will (maybe unexpectedly) start editing One can escaping each dollar sign to make the
|
Just a bump. Any progress on this issue? I'm encountering the same problem. |
Here's a quick hack: diff --git a/lib/nerdtree/path.vim b/lib/nerdtree/path.vim
index c0242d0..88149de 100644
--- a/lib/nerdtree/path.vim
+++ b/lib/nerdtree/path.vim
@@ -266,7 +266,9 @@ endfunction
"FUNCTION: Path.edit() {{{1
function! s:Path.edit()
- exec "edit " . self.str({'format': 'Edit'})
+ let edit_command = "edit " . self.str({'format': 'Edit'})
+ let edit_command = substitute(edit_command, '\$', '\\$', '')
+ exec edit_command
endfunction
"FUNCTION: Path.extractDriveLetter(fullpath) {{{1 With it, nerdtree opens files with '$' correctly while directories with '$' is still in problem. |
The above workaround needs a 'g' in substitute flags, otherwise it will only replace the first occurrence of '$'. |
This should be fixed by PR #649, which has been merged. |
Thanks! It's working now! |
If I try to use
nerdtree
to open a file whose file name includes a dollar sign, that file is not necessarily opened correctly. Consider the following example:When the first
.java
file in thenerdtree
view is opened (either in the previous window, a vertical split, or a horizontal split), that file is not opened in the expected window. Instead, that window opens the wrong file (potentially one which doesn't exist). As you can see in the status line in the example,type/Panini.java
was opened instead oftype/Panini$Duck$Array$Types.java
.In case it is helpful, I am running:
Vim
7.4.488tmux
1.9ascrooloose/nerdtree
commit 3b98a7f (installed viaVundle
)jistr/vim-nerdtree-tabs
commit 0decec122e9bb3e9328b01fa20a9650e79cc6ca7 (installed viaVundle
)Vundle
-installedVim
plugins, though they probably aren't relevant.The text was updated successfully, but these errors were encountered: